added /countdown command

This commit is contained in:
2019-09-07 19:48:07 +02:00
parent f1c3341cac
commit bac142bf1b
2 changed files with 51 additions and 1 deletions

View File

@@ -353,6 +353,24 @@ namespace ReallifeGamemode.Server.Commands
#endregion
#region ALevel1
[Command("countdown", "~m~Benutzung: ~s~/countdown [Zeit] [Text]")]
public void CmdCountdown(Client player, string timer_string, string text)
{
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
int timer = int.Parse(timer_string);
foreach (Client c in NAPI.Pools.GetAllPlayers())
{
c.TriggerEvent("countdown", timer, text);
}
}
[Command("aunjail", "~m~Benutzung: ~s~/aunjail [Spieler]", GreedyArg = true)]
public void CmdAdminAunjai(Client player, string targetname)
{
@@ -360,6 +378,12 @@ namespace ReallifeGamemode.Server.Commands
if (target == null)
return;
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
ReallifeGamemode.Server.Wanted.Jail.Release_Jail_Admin(player, target);
}