EdoKing

EDWARD ROSE ™️

Dec 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. //============================
  2. // Created by Edward Rose |
  3. //============================
  4.  
  5. #include <a_samp>
  6.  
  7. #define DGREEN "{004000}"
  8. #define GREY "{808080}"
  9. #define WHITE "{FFFFFF}"
  10. #define SC "{494EF5}"
  11. #define RED "{FF0000}"
  12. #define Edward "{B8B8B8}"
  13. #define Rose "{37F906}"
  14.  
  15. #if !defined Loop
  16. #define Loop(%0,%1) for(new %0 = 0; %0 != %1; %0++)
  17.  
  18. #endif
  19.  
  20. #if !defined function
  21. #define function%0(%1) forward%0(%1); public%0(%1)
  22.  
  23. #endif
  24.  
  25. #if !defined TIME
  26. #define TIME 180000
  27.  
  28. #endif
  29.  
  30. new xCharacters[][] =
  31. {
  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. "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
  35. "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  36. "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  37. },
  38. xChars[16] = "",
  39. xReactionTimer,
  40. xCash,
  41. xScore,
  42. bool: xTestBusy;
  43.  
  44. public OnFilterScriptInit()
  45. {
  46. xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  47. return 1;
  48. }
  49.  
  50. public OnFilterScriptExit()
  51. {
  52.  
  53. KillTimer(xReactionTimer);
  54. return 1;
  55. }
  56.  
  57. public OnPlayerText(playerid, text[])
  58. {
  59.  
  60. switch(xTestBusy) {
  61. case true: {
  62. if(!strcmp(xChars, text, false)) {
  63. new string[256], pName[MAX_PLAYER_NAME];
  64. GetPlayerName(playerid, pName, sizeof(pName));
  65. format(string, sizeof(string), "{FF0000}[REAKCIJA]:{FFFFFF} Igracot {B8B8B8}%s{FFFFFF} beshe najbrz, toj osvoi odreden broj na pari.", pName);
  66. SendClientMessageToAll(-1, string);
  67. format(string, sizeof(string), "{FFFFFF}[REAKCIJA]:{FF0000} Cestitki! Bese najbrz i osvoi{FFFFFF} %d$", xCash);
  68. SendClientMessage(playerid, -1, string);
  69. GivePlayerMoney(playerid, xCash);
  70. xReactionTimer = SetTimer("xReactionTest", TIME, 1);
  71. xTestBusy = false; } } }
  72.  
  73. return 1; }
  74.  
  75. function xReactionProgress() {
  76.  
  77. switch(xTestBusy) {
  78. case true: {
  79. new string[128] ;
  80. format(string, sizeof(string), "{004000}[REAKCIJA]: Nikoj ne go napisa zborot kako sto treba!", (TIME/60000));
  81. SendClientMessageToAll(-1, string);
  82. xReactionTimer = SetTimer("xReactionTest", TIME, 1); } }
  83.  
  84. return 1; }
  85.  
  86. function xReactionTest() {
  87.  
  88. new xLength = (random(8) + 2), string[256] ;
  89. xCash = (random(10000) + 20000);
  90. xScore = (random(2)+1);
  91. format(xChars, sizeof(xChars), "");
  92. Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
  93. format(string, sizeof(string), "{FFFFFF}[REAKCIJA]: Igrata zapocna! Koj prv ke napise {004000}%s{FFFFFF} osvojuva {FF0000}%d$", xChars, xCash);
  94. SendClientMessageToAll(-1, string);
  95. KillTimer(xReactionTimer);
  96. xTestBusy = true;
  97. SetTimer("xReactionProgress", 30000, 0);
  98.  
  99. return 1; }
Add Comment
Please, Sign In to add comment