frak braucht mindestens 6 autos

This commit is contained in:
hydrant
2020-05-06 23:02:35 +02:00
parent 89e341a4cd
commit 9a76840287

View File

@@ -398,6 +398,12 @@ namespace ReallifeGamemode.Server.Managers
}
else if (selection == "Verkaufen")
{
if (dbContext.FactionVehicles.ToList().Where(f => f.GetOwners().Contains(user.FactionId.Value)).Count() <= 6)
{
ChatService.ErrorMessage(player, "Die Fraktion muss mindestens 6 Fahrzeuge besitzen");
return;
}
var backPrice = factionVehicle.BuyPrice;
user.Faction.BankAccount.Balance += backPrice;