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

@@ -784,6 +784,14 @@ namespace reallife_gamemode.Server.Commands
#region ALevel3
Vehicle testV;
[Command]
public void Testveh(Client player)
{
player.SendChatMessage(VehicleStreaming.GetEngineState(player.Vehicle).ToString());
}
[Command("veh", "~m~Benutzung: ~s~/veh [Fahrzeug] (Farbe 1) (Farbe 2)")]
public void CmdAdminVeh(Client player, string hash, int color1 = 111, int color2 = 111)
{
@@ -808,7 +816,9 @@ namespace reallife_gamemode.Server.Commands
return;
}
Vehicle v = NAPI.Vehicle.CreateVehicle(uHash, player.Position, player.Rotation.Z, color1, color2);
Vehicle v = testV = NAPI.Vehicle.CreateVehicle(uHash, player.Position, player.Rotation.Z, color1, color2, engine: false);
VehicleStreaming.SetEngineState(v, true);
VehicleStreaming.SetLockStatus(v, false);
player.SetIntoVehicle(v.Handle, -1);
}