Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. // Public new EventCountDownTimer;
  2.  
  3.  
  4.  
  5. Function EventStartenJetzt()
  6. {
  7. if(Event[EventActive] == 1)
  8. {
  9. Event[EventGestartet] = 1;
  10. for(new i = 0; i<MAX_PLAYERS; i++)
  11. {
  12. if(PlayerInfo[i][AktivImEvent] == 1 || PlayerInfo[i][pAdmin]>4)
  13. {
  14.  
  15. Event[EvCountDown] = 10;
  16. EventCountDownTimer = SetTimer("EventCountDown",1000,true);
  17. SetTimer("EventFinalStart",10000,0); // läuft eh nur 10 sek aber egal
  18. }
  19. }
  20. }
  21. }
  22.  
  23.  
  24. forward EventCountDown();
  25. public EventCountDown()
  26. {
  27. new str[100];
  28. if(Event[EventActive] == 1)
  29. {
  30. Event[EvCountDown]--;
  31. if(Event[EvCountDown] > 0)
  32. {
  33. format(str, sizeof(str), "Count Down: %d",Event[EvCountDown]);
  34. SendEventGameText(str,1000);
  35.  
  36. }
  37. else
  38. {
  39. SendEventGameText("~r~GO ~b~GO ~p~GO",1000);
  40. Event[EvCountDown] = 0;
  41. KillTimer(EventCountDownTimer); // keine weiteren publics ausgeführt, da man EventCountDown so allgemeiner und nicht nur für den start nutzen kann
  42. }
  43.  
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement