Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace GrenadeEvent
- {
- class RoundEventHandler : IEventHandlerUpdate
- {
- private readonly Plugin _plugin;
- public RoundEventHandler(Plugin plugin)
- {
- this._plugin = plugin;
- }
- public void OnUpdate(UpdateEvent ev)
- {
- _plugin.Info("update");
- if (StaticVars.sw == true)
- {
- if (StaticVars.timer == 0)
- {
- var onlinePlayers = PluginManager.Manager.Server.GetPlayers();
- foreach (var player in onlinePlayers)
- {
- player.ThrowGrenade(Smod2.API.ItemType.FRAG_GRENADE, false, Smod2.API.Vector.Forward, false, Smod2.API.Vector.Zero, false, 0, false);
- }
- StaticVars.timer = 300;
- }
- else
- {
- _plugin.Info(StaticVars.timer.ToString());
- StaticVars.timer--;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement