diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 0dd31fcc..e5bcb93c 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -363,7 +363,22 @@ namespace ReallifeGamemode.Server.Commands return; } - if (timer_string == "clear") + 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") { foreach (Client c in NAPI.Pools.GetAllPlayers()) { @@ -371,11 +386,11 @@ namespace ReallifeGamemode.Server.Commands } } - int timer = int.Parse(timer_string); - + int timer = int.Parse(text); + foreach (Client c in NAPI.Pools.GetAllPlayers()) { - c.TriggerEvent("countdown", timer, text); + c.TriggerEvent("countdown", timer, ""); } }