Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Handle roundStartTimer;
  2.  
  3. public OnPluginStart()
  4. {
  5. HookEvent("arena_round_start", Event_arena_round_start);
  6. }
  7.  
  8. public Action Event_arena_round_start(Handle:event, const String:name[], bool:dontBroadcast)
  9. {
  10. if (roundStartTimer != INVALID_HANDLE)
  11. KillTimer(roundStartTimer);
  12.  
  13. roundStartTimer = CreateTimer(30.0, sometimerfunction,_,TIMER_FLAG_NO_MAPCHANGE);
  14. }
  15.  
  16. public OnMapEnd()
  17. {
  18. roundStartTimer=INVALID_HANDLE;
  19. }
  20.  
  21. public Action sometimerfunction(...)
  22. {
  23. //do whatever you want here but just make sure roundStartTimer is set to INVALID_HANDLE if you need to return early or something
  24.  
  25. roundStartTimer=INVALID_HANDLE;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement