Advertisement
Klapek

Untitled

Dec 26th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. public void OnUpdate(UpdateEvent ev)
  2.         {
  3.             _plugin.Info("update");
  4.             if (StaticVars.sw == true)
  5.             {
  6.                
  7.  
  8.                 if (StaticVars.timer == 0)
  9.                 {
  10.                     var onlinePlayers = PluginManager.Manager.Server.GetPlayers();
  11.  
  12.                     foreach (var player in onlinePlayers)
  13.                     {
  14.                         player.ThrowGrenade(Smod2.API.ItemType.FRAG_GRENADE, true, Smod2.API.Vector.Down, false, Smod2.API.Vector.Zero, false, 0, false);
  15.                     }
  16.  
  17.                     StaticVars.timer = 60;
  18.                 }
  19.                 else
  20.                 {
  21.                     _plugin.Info(StaticVars.timer.ToString());
  22.                     StaticVars.timer--;
  23.                 }
  24.                
  25.             }          
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement