diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 20a79134..a04dad50 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -363,34 +363,20 @@ namespace ReallifeGamemode.Server.Commands return; } - int timer = int.Parse(timer_string); - - foreach (Client c in NAPI.Pools.GetAllPlayers()) - { - c.TriggerEvent("countdown", timer, text); - } - } - public void CmdCountdown(Client player, string text) - { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - - if (text == "clear") + if (timer_string == "clear") { foreach (Client c in NAPI.Pools.GetAllPlayers()) { c.TriggerEvent("countdown", 0, "ich liebe balbo"); } + return; } - int timer = int.Parse(text); - + int timer = int.Parse(timer_string); + foreach (Client c in NAPI.Pools.GetAllPlayers()) { - c.TriggerEvent("countdown", timer, ""); + c.TriggerEvent("countdown", timer, text); } }