vlt fix kfz id bug??
This commit is contained in:
@@ -168,13 +168,13 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
player.TriggerEvent("SERVER:Util_setWaypoint", spawnPos.X, spawnPos.Y);
|
||||
|
||||
User u = player.GetUser(dbContext);
|
||||
User user = player.GetUser(dbContext);
|
||||
|
||||
ServerVehicle newVeh = null;
|
||||
|
||||
if (target == "Spieler")
|
||||
{
|
||||
TransactionResult result = BankManager.TransferMoney(u, business, price, "Auto gekauft", dbContext);
|
||||
TransactionResult result = BankManager.TransferMoney(user, business, price, "Auto gekauft", dbContext);
|
||||
if (result == TransactionResult.SENDER_NOT_ENOUGH_MONEY)
|
||||
{
|
||||
player.SendNotification("~r~Du hast nicht genug Geld: " + price.ToMoneyString());
|
||||
@@ -190,7 +190,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
PositionY = spawnPos.Y,
|
||||
PositionZ = spawnPos.Z,
|
||||
Locked = false,
|
||||
UserId = player.GetUser().Id,
|
||||
UserId = user.Id,
|
||||
Model = shopVehicle.Model,
|
||||
PrimaryColor = 111,
|
||||
SecondaryColor = 111,
|
||||
@@ -200,7 +200,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
}
|
||||
else if (target == "Fraktion")
|
||||
{
|
||||
var faction = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == u.FactionId).First();
|
||||
var faction = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == user.FactionId).First();
|
||||
TransactionResult result = BankManager.TransferMoney(faction, business, (int)(price * FACTION_CAR_MULTIPLIER), "Auto gekauft", dbContext);
|
||||
if (result == TransactionResult.SENDER_NOT_ENOUGH_MONEY)
|
||||
{
|
||||
@@ -216,7 +216,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
PositionY = spawnPos.Y,
|
||||
PositionZ = spawnPos.Z,
|
||||
Locked = false,
|
||||
Owners = JsonConvert.SerializeObject(new int[] { player.GetUser(dbContext).FactionId.Value }),
|
||||
Owners = JsonConvert.SerializeObject(new int[] { user.FactionId.Value }),
|
||||
Model = shopVehicle.Model,
|
||||
PrimaryColor = 111,
|
||||
SecondaryColor = 111,
|
||||
@@ -243,7 +243,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
dbContext.ServerVehicles.Add(newVeh);
|
||||
dbContext.SaveChanges();
|
||||
|
||||
newVeh.Spawn();
|
||||
newVeh.Spawn(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user