Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
VegaZ
2018-12-23 20:42:28 +01:00
19 changed files with 236 additions and 77 deletions

View File

@@ -204,10 +204,26 @@ namespace reallife_gamemode.Server.Events
{
Vehicle v = player.Vehicle;
bool state = VehicleStreaming.GetEngineState(v);
NAPI.Util.ConsoleOutput("changing engine state: " + state.ToString());
ServerVehicle sV = v.GetServerVehicle();
if (sV != null)
{
if (sV is ShopVehicle)
{
VehicleStreaming.SetEngineState(v, false);
return;
}
else if(sV is FactionVehicle fV)
{
if(fV.FactionId != player.GetUser().FactionId && !state)
{
return;
}
}
}
VehicleStreaming.SetEngineState(v, !state);
}
}
[RemoteEvent("keyPress:X")]
public void KeyPressX(Client player)
{