Vehicle tuning is saved now

This commit is contained in:
hydrant
2018-11-29 20:55:35 +01:00
parent fab3f05575
commit 3851d404b9
4 changed files with 71 additions and 6 deletions

View File

@@ -36,13 +36,9 @@ namespace reallife_gamemode.Server.Managers
if (!veh.Active) continue;
Vehicle current = veh.Spawn();
TuningManager.ApplyTuningToServerVehicle(veh);
if (veh is Saves.SavedVehicle savedV)
{
NAPI.Vehicle.CreateVehicle((uint)savedV.Model, new Vector3(savedV.PositionX, savedV.PositionY, savedV.PositionZ), savedV.Heading, savedV.PrimaryColor,
savedV.SecondaryColor, savedV.NumberPlate, 255, savedV.Locked);
}
else if (veh is ShopVehicle shopV)
if (veh is ShopVehicle shopV)
{
string displayName = NAPI.Vehicle.GetVehicleDisplayName(shopV.Model);
NAPI.Vehicle.SetVehicleEngineHealth(current, 0);