[+] Add SchoolVehicle Class for Driving and Flight School
[*] Fixed and Improved Flight School
This commit is contained in:
@@ -104,6 +104,34 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public static Vehicle SaveSchoolVehicleData(Vehicle veh, VehicleHash vehicleModel, Vector3 vehiclePosition, float vehicleHeading,
|
||||
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, bool vehicleLocked, bool vehicleEngine, int schoolId)
|
||||
{
|
||||
using (var saveData = new DatabaseContext())
|
||||
{
|
||||
var dataSet = new SchoolVehicle
|
||||
{
|
||||
Model = vehicleModel,
|
||||
SchoolId = schoolId,
|
||||
PositionX = vehiclePosition.X,
|
||||
PositionY = vehiclePosition.Y,
|
||||
PositionZ = vehiclePosition.Z,
|
||||
Heading = vehicleHeading,
|
||||
NumberPlate = vehicleNumberPlate,
|
||||
PrimaryColor = vehiclePrimaryColor,
|
||||
SecondaryColor = vehicleSecondaryColor,
|
||||
Locked = vehicleLocked,
|
||||
Active = true
|
||||
};
|
||||
saveData.SchoolVehicles.Add(dataSet);
|
||||
saveData.SaveChanges();
|
||||
|
||||
return dataSet.Spawn(veh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Vehicle SaveFactionVehicleData(Vehicle veh, VehicleHash vehicleModel, Vector3 vehiclePosition, float vehicleHeading,
|
||||
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, bool vehicleLocked, bool vehicleEngine, int factionId, int livery)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user