Finished carshops

This commit is contained in:
hydrant
2018-12-22 15:02:05 +01:00
parent 315cd2b3ec
commit 60ff2bc195
8 changed files with 67 additions and 5 deletions

View File

@@ -35,7 +35,13 @@ namespace reallife_gamemode.Server.Entities
public Vehicle Spawn(Vehicle currentVeh = null)
{
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);
Vector3 position = this.Position;
uint model = (uint)this.Model;
float heading = this.Heading;
int c1 = this.PrimaryColor;
int c2 = this.SecondaryColor;
string np = this.NumberPlate;
Vehicle veh = NAPI.Vehicle.CreateVehicle(Model, position, heading, c1, c2, "", 255, false, false);
VehicleStreaming.SetEngineState(veh, false);
VehicleStreaming.SetLockStatus(veh, this.Locked);
VehicleManager.AddVehicle(this, veh);