diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index a60d05ed..d9868c11 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -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;