Advertisement
Guest User

CountDown system

a guest
Jun 6th, 2011
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. /*
  2. CountDown system by: aleluja & Paradox
  3. Credits: aleluja & Paradox
  4. */
  5. //==============================================================================
  6. #include <a_samp>
  7. #include <zcmd>
  8. //==============================================================================
  9. #define FILTERSCRIPT
  10. #define SCM SendClientMessage
  11. //==============================================================================
  12. #define bijela 0xFFFFFFFF
  13. //==============================================================================
  14. #pragma tabsize 0
  15. //==============================================================================
  16. new
  17. CDTimer,
  18. CDBroj = -1;
  19. //==============================================================================
  20. public OnFilterScriptInit()
  21. {
  22. print("\n--------------------------------------");
  23. print(" CountDown system učitan!");
  24. print("--------------------------------------\n");
  25. return 1;
  26. }
  27. //==============================================================================
  28. public OnFilterScriptExit()
  29. {
  30. return 1;
  31. }
  32. //==============================================================================
  33. public OnPlayerConnect(playerid)
  34. {
  35. SCM(playerid, bijela, "Ovaj server koristi CountDown system by: aleluja & Paradox");
  36. return 1;
  37. }
  38. //==============================================================================
  39. public OnPlayerDisconnect(playerid, reason)
  40. {
  41. return 1;
  42. }
  43. //==============================================================================
  44. CMD:count(playerid, params[])
  45. {
  46. CDBroj = 3;
  47. CDTimer = SetTimer("CountDown", 1000, true);
  48. new string[128];
  49. new ImeIgraca[MAX_PLAYER_NAME];
  50. GetPlayerName(playerid, ImeIgraca, sizeof(ImeIgraca));
  51. format(string, sizeof(string), "{FF00FF}%s {FFFFFF}je pokrenuo odbrojavanje!", ImeIgraca);
  52. SCM(playerid, bijela, string);
  53. return 1;
  54. }
  55. //==============================================================================
  56. forward CountDown();
  57. public CountDown()
  58. {
  59. switch(CDBroj)
  60. {
  61. case 0:
  62. {
  63. GameTextForAll("~n~~n~~n~~n~~b~[~y~ Go Go Go!!! ~b~]", 1000, 3);
  64. CDBroj = -1;
  65. KillTimer(CDTimer);
  66. }
  67. case 1:
  68. {
  69. GameTextForAll("~n~~n~~n~~n~~b~[~y~ 1 ~b~]", 1000, 3);
  70. CDBroj = 0;
  71. }
  72. case 2:
  73. {
  74. GameTextForAll("~n~~n~~n~~n~~b~[~y~ 2 ~b~]", 1000, 3);
  75. CDBroj = 1;
  76. }
  77. case 3:
  78. {
  79. GameTextForAll("~n~~n~~n~~n~~b~[~y~ 3 ~b~]", 1000, 3);
  80. CDBroj = 2;
  81. }
  82. }
  83. return 1;
  84. }
  85. //==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement