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

@@ -105,7 +105,7 @@ namespace ReallifeGamemode.Server.Managers
}
public static Vehicle SaveFactionVehicleData(Vehicle veh, VehicleHash vehicleModel, Vector3 vehiclePosition, float vehicleHeading,
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, bool vehicleLocked, bool vehicleEngine, int factionId)
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, bool vehicleLocked, bool vehicleEngine, int factionId, int livery)
{
using (var saveData = new DatabaseContext())
{
@@ -121,7 +121,8 @@ namespace ReallifeGamemode.Server.Managers
PrimaryColor = vehiclePrimaryColor,
SecondaryColor = vehicleSecondaryColor,
Locked = vehicleLocked,
Active = true
Active = true,
Livery = livery
};
saveData.FactionVehicles.Add(dataSet);
saveData.SaveChanges();