From 034bc51a10287efc28d1590d85fa701c03e5b10a Mon Sep 17 00:00:00 2001 From: Mac_Slash Date: Tue, 21 Apr 2020 15:17:34 +0200 Subject: [PATCH] Refresh ADutySystem --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 1 + .../Events/EnterVehicleAttempt.cs | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 5fe7f63e..ca625ad6 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -248,6 +248,7 @@ namespace ReallifeGamemode.Server.Commands if(!player.IsAdminDuty()) { ChatService.SendMessage(player, "~r~ Du bist nicht im Admin-Duty-Modus!"); + return; } if (!GlobalHelper.tsupAdmins.Contains(player)) { diff --git a/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs b/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs index 6a191b8e..eeeba2b5 100644 --- a/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs +++ b/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs @@ -58,11 +58,18 @@ namespace ReallifeGamemode.Server.Events } if (vehicle.GetServerVehicle() is NoobVehicle nVeh) { - if (player.GetUser().PlayedMinutes > 1800 && !player.IsAdminDuty()) + if (!player.IsAdminDuty()) { - player.StopAnimation(); - player.SendNotification("~r~Du hast schon über 30 Spielstunden!", true); - return; + if (player.GetUser().PlayedMinutes > 1800) + { + player.StopAnimation(); + player.SendNotification("~r~Du hast schon über 30 Spielstunden!", true); + return; + } + } + else if (player.IsAdminDuty()) + { + player.SendNotification("~g~Freie Fahrt!", true); } } }