Advertisement
MacBack

Nahodny Text 1.0

Nov 30th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. Nahodný text
  2.  
  3. #include <a_samp>
  4.  
  5. new slovo[MAX_PLAYERS];
  6. new txt[MAX_PLAYERS];
  7. new pawn[MAX_PLAYERS];
  8. new prachy[MAX_PLAYERS];
  9.  
  10.  
  11. public OnPlayerConnect(playerid)
  12. {
  13. SendClientMessage(playerid, -1,"{0099FF}[ Mini - Event ] {00FF00}Server {FFFFFF}Používa {00FF00}Mini - Event 2.0 {FFFFFF}Upravil {00FF00}MacBack{FFFFFF}! {0099FF}/meinfo");
  14. return 1;
  15. }
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. AntiDeAMX();
  20. SetTimer("tojejedno",50000,true);
  21. return 1;
  22. }
  23.  
  24. public OnPlayerCommandText(playerid, cmdtext[])
  25. {
  26. if(strcmp("/meinfo",cmdtext,true, 10) == 0)
  27. {
  28. new string[1000];
  29. strcat(string,"{00FF00}Nahodny - Text\n");
  30. strcat(string,"{33CC33}Upravil {FFFFFF}: MacBack\n");
  31. strcat(string,"{33CC33}Skype {FFFFFF}: koskos1787\n");
  32. strcat(string,"{33CC33}Web Stránka {FFFFFF}: www.ptak1.webnode.cz/\n");
  33. strcat(string,"\n");
  34. strcat(string,"{00FF00}Jisi tento soubor chceš vylepšit napiš na skypu ;)\n");
  35. ShowPlayerDialog(playerid,343,DIALOG_STYLE_MSGBOX,"Nahodny Text - {00FF00}/meinfo",string,"Okay","");
  36. return 1;
  37. }
  38. return 0;
  39. }
  40.  
  41. public OnPlayerText(playerid, text[])
  42. {
  43. for (new i = 0; i < MAX_PLAYERS; i++)
  44. {
  45. new id,string[1000];
  46.  
  47. if(prachy[i] == 1)
  48. {
  49.  
  50. if(strcmp(text, "sFgO6ADSgHA",true) == 0)
  51. {
  52.  
  53. GivePlayerMoney(playerid,50000);
  54.  
  55. format(string,sizeof(string),"{0099FF}[ Nahodny Text ] {0044FF}Hráč %s napísal ako prvý nahodný text{0044FF} vyhral $5.0000",Jmeno(playerid));
  56. SendClientMessageToAll(-1,string);
  57. prachy[i] = 0;
  58. return 1;
  59. }
  60. }
  61.  
  62. if(pawn[i] == 1)
  63. {
  64.  
  65. if(strcmp(text, "GrMrKKz/TnKdLbL",true) == 0)
  66. {
  67. GivePlayerMoney(playerid, 1000);
  68.  
  69. format(string,sizeof(string),"{0099FF}[ Nahodny Text ] {0044FF}Hráč %s napísal ako prvý nahodný text dostal 1000$",Jmeno(playerid));
  70. SendClientMessageToAll(-1,string);
  71. pawn[i] = 0;
  72. return 1;
  73. }
  74. }
  75.  
  76. if(slovo[i] == 1)
  77. {
  78. if(strcmp(text, "zGsjszgHHHl",true) == 0)
  79. {
  80. GivePlayerWeapon(id,26,100);
  81.  
  82. format(string,sizeof(string),"{0099FF}[ Nahodny Text ] {0044FF}Hráč %s napísal ako prvý nahodný text {0044FF} dostal sawny",Jmeno(playerid));
  83. SendClientMessageToAll(-1,string);
  84. slovo[i] = 0;
  85. return 1;
  86. }
  87. }
  88.  
  89. if(txt[i] == 1)
  90. {
  91. if(strcmp(text, "gRZJfsfI",true) == 0)
  92. {
  93.  
  94. SetPlayerHealth(id, 100);
  95. SetPlayerArmour(id, 100);
  96. GivePlayerMoney(playerid,100000000);
  97.  
  98. format(string,sizeof(string),"{0099FF}[ Nahodny Text ] {0044FF}Hráč %s napísal ako prvý nahodný text {0044FF}dostal money",Jmeno(playerid));
  99. SendClientMessageToAll(-1,string);
  100. txt[i] = 0;
  101. return 1;
  102. }
  103. }
  104. }
  105. return 1;
  106. }
  107.  
  108. forward tojejedno(playerid);
  109. public tojejedno(playerid)
  110. {
  111. {
  112. switch(random(5))
  113. {
  114. case 0:
  115. {
  116. SendClientMessageToAll(0x1705FAFF, "{0099FF}[ Nahodny Text ] {0044FF}Kto napíše ako prvý {00FF00}' GrMrKKz/TnKdLbL ' {0044FF}dostane 1000$");
  117. for (new i = 0; i < MAX_PLAYERS; i++)
  118. {
  119. prachy[i] = 1;
  120. }
  121. }
  122. case 1:
  123. {
  124. SendClientMessageToAll(0xFF0000AA, "{0099FF}[ Nahodny Text ] {0044FF}Kto napíše ako prvý {00FF00}' gRZJfsfI ' {0044FF}dostanes HP + VESTU + MONEY");
  125. for (new i = 0; i < MAX_PLAYERS; i++)
  126. {
  127. slovo[i] = 1;
  128. }
  129. }
  130. case 2:
  131. {
  132. SendClientMessageToAll(0x1705FAFF, "{0099FF}[ Nahodny Text ] {0044FF}Kto napíše ako prvý {00FF00}' goJZCvo5 ' {0044FF}dostane HP + Vesta");
  133. for (new i = 0; i < MAX_PLAYERS; i++)
  134. {
  135. txt[i] = 1;
  136. }
  137. }
  138. case 3:
  139. {
  140. SendClientMessageToAll(0xFF0000AA, "{0099FF}[ Nahodny Text ] {00FF00}Kto napíše ako prvý {00FF00}' sFgO6ADSgHA ' {0044FF}dostane 50000Money");
  141. for (new i = 0; i < MAX_PLAYERS; i++)
  142. {
  143. pawn[i] = 1;
  144. }
  145. }
  146. }
  147. }
  148. return 1;
  149. }
  150.  
  151.  
  152. stock Jmeno(playerid)
  153. {
  154. new n[256];
  155. GetPlayerName(playerid, n, sizeof(n));
  156. return n;
  157. }
  158.  
  159. AntiDeAMX()
  160. {
  161. new a[][] =
  162. {
  163. "Unarmed (Fist)",
  164. "Brass K"
  165. };
  166. #pragma unused a
  167. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement