Save Livery for Faction Vehicles

This commit is contained in:
hydrant
2019-07-22 22:05:07 +02:00
parent 28025ebb60
commit 0a5dbb12d6
3 changed files with 11 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ namespace ReallifeGamemode.Server.Entities
public bool Active { get; set; }
public float DistanceDriven { get; set; }
public float TankAmount { get; set; }
public int Livery { get; set; }
[NotMapped]
public Vector3 Position => new Vector3(PositionX, PositionY, PositionZ);
@@ -43,6 +44,7 @@ namespace ReallifeGamemode.Server.Entities
int c2 = this.SecondaryColor;
string np = this.NumberPlate;
Vehicle veh = NAPI.Vehicle.CreateVehicle(Model, position, heading, c1, c2, "", 255, false, false);
veh.Livery = Livery;
VehicleStreaming.SetEngineState(veh, false);
VehicleStreaming.SetLockStatus(veh, this.Locked);
VehicleManager.AddVehicle(this, veh);