Aded vehicle sync system (engines now have to be tuned on /off with N key)

This commit is contained in:
hydrant
2018-12-09 20:35:30 +01:00
parent 01bd291e81
commit d50ffa0556
7 changed files with 1005 additions and 6 deletions

View File

@@ -112,10 +112,12 @@ namespace reallife_gamemode.Server.Events
foreach(Client listPlayer in players)
{
var lPlayer = new ListPlayer();
lPlayer.Id = listPlayer.Handle.Value;
lPlayer.Name = listPlayer.Name;
lPlayer.Ping = listPlayer.Ping;
var lPlayer = new ListPlayer
{
Id = listPlayer.Handle.Value,
Name = listPlayer.Name,
Ping = listPlayer.Ping
};
ListPlayers.Add(lPlayer);
}
@@ -183,7 +185,8 @@ namespace reallife_gamemode.Server.Events
{
if (player.IsInVehicle && player.VehicleSeat == -1)
{
player.Vehicle.EngineStatus = !player.Vehicle.EngineStatus;
Vehicle v = player.Vehicle;
VehicleStreaming.SetEngineState(v, !VehicleStreaming.GetEngineState(v));
}
}
[RemoteEvent("keyPress:X")]