Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1.  
  2. public void OnMapStart()
  3. {
  4. new timeleft = 0;
  5. AddFileToDownloadsTable("mapvote/mapvoteinc.mp3");
  6. PrecacheSoundAny("mapvote/mapvoteinc.mp3");
  7. GetMapTimeLeft(timeleft);
  8. CreateTimer(timeleft - 210.0, TimerCallBack, INVALID_HANDLE, TIMER_HNDL_CLOSE);
  9. GetMapTimeLeft(timeleft);
  10. CreateTimer(timeleft - 210.0, TimerCallBackExt, INVALID_HANDLE, TIMER_REPEAT);
  11. }
  12.  
  13. public Action:TimerCallBack(Handle:timer, any:client)
  14. {
  15. new timeleft = 0;
  16. EmitSoundToAllAny("mapvote/mapvoteinc.mp3");
  17. PrintToChatAll("[JoinSG] Mapvote in 30 seconds.");
  18. CreateTimer(40.0, CheckForExtend, INVALID_HANDLE, TIMER_HNDL_CLOSE);
  19. GetMapTimeLeft(timeleft);
  20. if (timeleft <= 200)
  21. {
  22. return Plugin_Stop;
  23. }
  24. else
  25. {
  26. return Plugin_Continue;
  27. }
  28. }
  29.  
  30. public Action:TimerCallBackExt(Handle:timer, any:client)
  31. {
  32. new timeleft = 0;
  33. EmitSoundToAllAny("mapvote/mapvoteinc.mp3");
  34. PrintToChatAll("[JoinSG] Mapvote in 30 seconds.");
  35. CreateTimer(40.0, CheckForExtend, INVALID_HANDLE, TIMER_HNDL_CLOSE);
  36. GetMapTimeLeft(timeleft);
  37. if (timeleft <= 200)
  38. {
  39. return Plugin_Stop;
  40. }
  41. else
  42. {
  43. return Plugin_Continue;
  44. }
  45. }
  46. public Action:CheckForExtend(Handle:timer, any:client)
  47. {
  48. return Plugin_Continue;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement