Added repair option in tuning

This commit is contained in:
hydrant
2018-12-03 14:01:11 +01:00
parent 2c64fbf5f6
commit e5ae1351c4
3 changed files with 42 additions and 1 deletions

View File

@@ -36,11 +36,20 @@ namespace reallife_gamemode.Server.Entities
Vehicle veh = NAPI.Vehicle.CreateVehicle(this.Model, this.Position, this.Heading, this.PrimaryColor, this.SecondaryColor, this.NumberPlate, locked: this.Locked, engine: false);
VehicleManager.AddVehicle(this, veh);
string numberplate = $"{this.Id}";
if(this is FactionVehicle fV)
{
veh.NumberPlate = fV.GetFaction().Name;
numberplate = $"F{fV.FactionId} " + numberplate;
}
if (this is UserVehicle uV)
{
numberplate = $"U{uV.UserId} " + numberplate;
}
veh.NumberPlate = numberplate;
return veh;
}
}