diff --git a/ReallifeGamemode.Server/Bank/bank.cs b/ReallifeGamemode.Server/Bank/bank.cs index 145b97ce..a17e81c6 100644 --- a/ReallifeGamemode.Server/Bank/bank.cs +++ b/ReallifeGamemode.Server/Bank/bank.cs @@ -132,6 +132,11 @@ namespace ReallifeGamemode.Server.Bank using (var dbContext = new DatabaseContext()) { + if (player.GetUser().PlayedMinutes < 180) + { + player.SendNotification("~r~Du kannst Geld erst ab 3 Spielstunden vergeben"); + return; + } if (player.GetUser(dbContext) == target.GetUser(dbContext)) { player.SendNotification($"~r~Du kannst dir selber kein Geld überweisen."); diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index ce438abe..78983665 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -752,6 +752,12 @@ namespace ReallifeGamemode.Server.Managers [RemoteEvent("CLIENT:InteractionMenu_Pay")] public void InteractionMenu_Pay(Player player, string jsonNameOrId, string stringAmount) { + if (player.GetUser().PlayedMinutes < 180) + { + player.SendNotification("~r~Du kannst Geld erst ab 3 Spielstunden vergeben"); + return; + } + string nameOrId = (string)JsonConvert.DeserializeObject(jsonNameOrId); int amount; try