Vehicle system
This commit is contained in:
@@ -37,7 +37,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
if (currentVeh != null) VehicleManager.DeleteVehicle(currentVeh);
|
||||
Vehicle veh = NAPI.Vehicle.CreateVehicle(this.Model, this.Position, this.Heading, this.PrimaryColor, this.SecondaryColor, this.NumberPlate, locked: this.Locked, engine: false);
|
||||
VehicleStreaming.SetEngineState(veh, false);
|
||||
VehicleStreaming.SetLockStatus(veh, false);
|
||||
VehicleStreaming.SetLockStatus(veh, this.Locked);
|
||||
VehicleManager.AddVehicle(this, veh);
|
||||
|
||||
string numberplate = $"{this.Id}";
|
||||
@@ -52,6 +52,13 @@ namespace reallife_gamemode.Server.Entities
|
||||
numberplate = $"U{uV.UserId} " + numberplate;
|
||||
}
|
||||
|
||||
if(this is ShopVehicle sV)
|
||||
{
|
||||
numberplate = "Shop";
|
||||
VehicleStreaming.SetLockStatus(veh, false);
|
||||
Array.ForEach((WindowID[])Enum.GetValues(typeof(WindowID)), x => VehicleStreaming.SetVehicleWindowState(veh, x, WindowState.WindowDown));
|
||||
}
|
||||
|
||||
veh.NumberPlate = numberplate;
|
||||
|
||||
return veh;
|
||||
|
||||
Reference in New Issue
Block a user