diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 5a28878b..20a79134 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -370,6 +370,29 @@ namespace ReallifeGamemode.Server.Commands 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()) + { + c.TriggerEvent("countdown", 0, "ich liebe balbo"); + } + } + + int timer = int.Parse(text); + + foreach (Client c in NAPI.Pools.GetAllPlayers()) + { + c.TriggerEvent("countdown", timer, ""); + } + } [Command("aunjail", "~m~Benutzung: ~s~/aunjail [Spieler]", GreedyArg = true)] public void CmdAdminAunjai(Client player, string targetname)