added more countdown functionality
This commit is contained in:
@@ -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, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user