From f56a9340e80ad9c30a85f4ec0bbbe89db63468be Mon Sep 17 00:00:00 2001 From: VegaZ Date: Mon, 3 May 2021 23:09:09 +0200 Subject: [PATCH] =?UTF-8?q?Pay=20/=20=C3=9Cberweisung=20erst=20ab=203=20Sp?= =?UTF-8?q?ielstunden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Bank/bank.cs | 5 +++++ ReallifeGamemode.Server/Managers/InteractionManager.cs | 6 ++++++ 2 files changed, 11 insertions(+) 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