Exemplo n.º 1
0
        public void StartWarmup(int length)
        {
            Enabled = true;
            Timeout = length;

            foreach (var player in Player.Players)
            {
                ClearPlayer(player);
            }

            SetArmouryVisibility(armvis.Bool(), armpick.Bool());

            messageWatcher.Start(TimeSpan.FromSeconds(1), () => {
                if (Timeout == 0)
                {
                    EndWarmup();
                }
                else
                {
                    if (message.Bool())
                    {
                        foreach (var player in Player.Players)
                        {
                            SendMessage(player, Timeout);
                        }
                    }
                    Timeout--;
                }
            });
        }
Exemplo n.º 2
0
 public void ClearPlayer(Player player)
 {
     if (knifeonly.Bool())
     {
         player.StripUserWeapons();
         player.GiveItem("weapon_knife");
         player.SetMoney(0);
     }
 }
Exemplo n.º 3
0
 private void EventGameStart(string str1, string str2)
 {
     if (str2 == "#Game_Commencing")
     {
         if (warmup.Bool())
         {
             StartWarmup(time.GetInt());
         }
     }
 }