Guest User

Untitled

a guest
Nov 17th, 2013
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. //============================================================================//
  2. //===================== [FS] Fast Reactions by RyDeR =========================//
  3. //========================= Preveo i uredio: nikolla =========================//
  4. //============================================================================//
  5. //-------------------- includes --------------------//
  6. #include <a_samp>
  7. //----------------------------------------------------------------------------//
  8. #define DGREEN "{004000}"
  9. #define GREY "{808080}"
  10. #define WHITE "{FFFFFF}"
  11. #define SC "{494EF5}"
  12. //----------------------------------------------------------------------------//
  13. #if !defined Loop
  14. #define Loop(%0,%1) for(new %0 = 0; %0 != %1; %0++)
  15.  
  16. #endif
  17. //----------------------------------------------------------------------------//
  18. #if !defined function
  19. #define function%0(%1) forward%0(%1); public%0(%1)
  20.  
  21. #endif
  22. //----------------------------------------------------------------------------//
  23. #if !defined TIME
  24. #define TIME 180000
  25.  
  26. #endif
  27. //----------------------------------------------------------------------------//
  28. new xCharacters[][] =
  29. {
  30. "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
  31. "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
  32. "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
  33. "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  34. "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  35. },
  36. xChars[16] = "",
  37. xReactionTimer,
  38. xCash,
  39. xScore,
  40. bool: xTestBusy;
  41. //----------------------------------------------------------------------------//
  42. public OnFilterScriptInit() {
  43. //----------------------------------------------------------------------------//
  44. xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  45. //----------------------------------------------------------------------------//
  46. print(" ");
  47. print(" [FS] Fast Reactions by RyDeR` ");
  48. print(" ");
  49. //----------------------------------------------------------------------------//
  50. return 1; }
  51. //----------------------------------------------------------------------------//
  52. public OnFilterScriptExit() {
  53.  
  54. KillTimer(xReactionTimer);
  55.  
  56. return 1; }
  57.  
  58. //----------------------------------------------------------------------------//
  59. public OnPlayerText(playerid, text[]) {
  60.  
  61. switch(xTestBusy) {
  62. case true: {
  63. if(!strcmp(xChars, text, false)) {
  64. new string[256], pName[MAX_PLAYER_NAME];
  65. GetPlayerName(playerid, pName, sizeof(pName));
  66. format(string, sizeof(string), ""SC"Reaciont-BOT: "GREY"Igrac "WHITE"%s "GREY"je bio najbrzi i osvojio odredjenu svotu novca i Reaction Poena.", pName);
  67. SendClientMessageToAll(-1, string);
  68. format(string, sizeof(string), ""SC"Reaction-BOT: "DGREEN"Cestitam! "GREY"Bio si najbrzi i osvojio "DGREEN"%d$ "GREY"i "WHITE"%d "GREY"Reaction Poena.", xCash, xScore);
  69. SendClientMessage(playerid, -1, string);
  70. GivePlayerMoney(playerid, xCash);
  71. SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
  72. xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  73. xTestBusy = false; } } }
  74.  
  75. return 1; }
  76.  
  77. //----------------------------------------------------------------------------//
  78. function xReactionProgress() {
  79.  
  80. switch(xTestBusy) {
  81. case true: {
  82. new string[128] ;
  83. format(string, sizeof(string), ""SC"Reaction-BOT: "GREY"Niko nije napisao rec kako treba!", (TIME/60000));
  84. SendClientMessageToAll(-1, string);
  85. xReactionTimer = SetTimer("xReactionTest", TIME, 1); } }
  86.  
  87. return 1; }
  88.  
  89. //----------------------------------------------------------------------------//
  90. function xReactionTest() {
  91.  
  92. new xLength = (random(8) + 2), string[256] ;
  93. xCash = (random(10000) + 20000);
  94. xScore = (random(2)+1);
  95. format(xChars, sizeof(xChars), "");
  96. Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
  97. format(string, sizeof(string), ""SC"Reaction-BOT: "GREY"Igra je pocela! Ko prvi upise "WHITE"%s "GREY"osvaja "DGREEN"%d$ "GREY"i "WHITE"1 "GREY"Reaction Poen.", xChars, xCash, xScore);
  98. SendClientMessageToAll(-1, string);
  99. KillTimer(xReactionTimer);
  100. xTestBusy = true;
  101. SetTimer("xReactionProgress", 30000, 0);
  102.  
  103. return 1; }
Advertisement
Add Comment
Please, Sign In to add comment