gruppe kosten

This commit is contained in:
2020-08-02 20:28:14 +02:00
parent 3cf4cc33fa
commit f19d79d968
3 changed files with 13 additions and 2 deletions

View File

@@ -57,6 +57,13 @@ namespace ReallifeGamemode.Server.Managers
u.Group = group;
u.GroupRank = GroupRank.OWNER;
if (player.GetUser(dbContext).BankAccount.Balance < 50000)
{
ChatService.ErrorMessage(player, "Du hast nicht genug Geld");
return;
}
player.GetUser(dbContext).BankAccount.Balance -= 50000;
dbContext.SaveChanges();
ChatService.BroadcastGroup($"Die Gruppe \"{name}\" wurde erfolgreich erstellt.", group);