add /save jvehicle [job id]
This commit is contained in:
@@ -77,8 +77,35 @@ namespace ReallifeGamemode.Server.Managers
|
||||
return dataSet.Spawn(veh);
|
||||
}
|
||||
}
|
||||
|
||||
public static Vehicle SaveJobVehicleData(Vehicle veh, VehicleHash vehicleModel, Vector3 vehiclePosition, float vehicleHeading,
|
||||
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, bool vehicleLocked, bool vehicleEngine, int jobId)
|
||||
{
|
||||
using (var saveData = new DatabaseContext())
|
||||
{
|
||||
var dataSet = new JobVehicle
|
||||
{
|
||||
Model = vehicleModel,
|
||||
JobId = jobId,
|
||||
PositionX = vehiclePosition.X,
|
||||
PositionY = vehiclePosition.Y,
|
||||
PositionZ = vehiclePosition.Z,
|
||||
Heading = vehicleHeading,
|
||||
NumberPlate = vehicleNumberPlate,
|
||||
PrimaryColor = vehiclePrimaryColor,
|
||||
SecondaryColor = vehicleSecondaryColor,
|
||||
Locked = vehicleLocked,
|
||||
Active = true
|
||||
};
|
||||
saveData.JobVehicles.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)
|
||||
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, bool vehicleLocked, bool vehicleEngine, int factionId)
|
||||
{
|
||||
using (var saveData = new DatabaseContext())
|
||||
{
|
||||
@@ -102,6 +129,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
return dataSet.Spawn(veh);
|
||||
}
|
||||
}
|
||||
|
||||
public static Vehicle SaveShopVehicleData(Vehicle veh, VehicleHash vehicleModel, string vehicleModelName, Vector3 vehiclePosition, float vehicleHeading,
|
||||
string vehicleNumberPlate, int vehiclePrimaryColor, int vehicleSecondaryColor, BusinessBase business, int price)
|
||||
{
|
||||
@@ -132,7 +160,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
using (var saveData = new DatabaseContext())
|
||||
{
|
||||
var dataSet = new Entities.GotoPoint
|
||||
var dataSet = new GotoPoint
|
||||
{
|
||||
Description = description,
|
||||
X = player.Position.X,
|
||||
@@ -144,9 +172,9 @@ namespace ReallifeGamemode.Server.Managers
|
||||
saveData.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SaveAllOnSave()
|
||||
{
|
||||
// Alle Fahrzeuge
|
||||
using (var saveAll = new DatabaseContext())
|
||||
{
|
||||
//Alle Spieler
|
||||
|
||||
Reference in New Issue
Block a user