Advertisement
Guest User

[GM] Guerra No Samp [v3.0] [0.3x] (Equipe Divulga Samp)

a guest
May 13th, 2013
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.17 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <Dini>
  4.  
  5. #pragma tabsize 0
  6.  
  7.  
  8. #define DIALOG_REGISTRO 2000
  9. #define DIALOG_LOGAR 2001
  10. #define BRANCO "{FFFFFF}"
  11. #define VERMELHO "{F81414}"
  12. #define VERDE 0x00FF00AA
  13. #define AZUL_CLARO "{00CED1}"
  14. #define VERDE_EXERCITO 0x007D2CFF
  15. #define MARROM_TERRORISTA 0x54292BFF
  16. #define BRANCO_CIVIL 0xFFFFFFFF
  17. #define VERMELHO_MORTO 0xF20006FF
  18. #define COLOR_WHITE 0xFFFFFFAA
  19. #define AMARELO 0xFFFF00AA
  20. #define Verde 0x00FF00AA
  21.  
  22. #define FILTERSCRIPT
  23. #define CINZA 0xAFAFAFAA
  24. #define VERMELHA 0xAA3333AA
  25. #define BISQUE 0xFFE4C4AA
  26. #define AMARELO 0xFFFF00AA
  27. #define AZUL 0x0000BBAA
  28. #define AZULCLARO 0x33CCFFAA
  29. #define LARANJA 0xFF9900AA
  30. #define VERDECLARO 0x33FF33AA
  31. #define MAGENTA 0xFF00FFFF
  32. #define AZULMARINHO 0x000080AA
  33. #define AQUA 0xF0F8FFAA
  34. #define MOSCAAZUL 0x6495EDAA
  35. #define PRETO 0x000000AA
  36. #define CORAL 0xFF7F50AA
  37. #define VERDEMEDIO 0x38FF06FF
  38. #define CONTAS "CAdmin/Players/%s.ini"
  39. #define log "CAdmin/Admin/Administração.txt"
  40. #define REGISTRO 1
  41. #define LOGIN 2
  42.  
  43. new Matou[MAX_PLAYERS];
  44. new Morreu[MAX_PLAYERS];
  45. new bool:VeiculoOcupado[MAX_VEHICLES];
  46. new carroadm;
  47. new god[MAX_PLAYERS];
  48. new Float:p[MAX_PLAYERS][3];
  49. new medalhas[MAX_PLAYERS];
  50. new bool:calado[MAX_PLAYERS];
  51. new bool:tv[MAX_PLAYERS];
  52.  
  53. enum cInfo
  54. {
  55. cAdmin,
  56. cHelper
  57. }
  58. new PlayerInfo[MAX_PLAYERS][cInfo];
  59.  
  60.  
  61. new strinx[128];
  62. new pname[MAX_PLAYERS];
  63. new Text:ScoreTextDraw[MAX_PLAYERS];
  64. new Text:TempoRoYal;
  65. new HoraRoYal, MinutosRoYal;
  66. new StringRoYalTempo[32];
  67. new Text:textdraw;
  68. new pClass[MAX_PLAYERS];
  69. new playername[MAX_PLAYER_NAME];
  70. new AFK[MAX_PLAYERS];
  71. new Text:AfkText;
  72. new Text:AfkBackText;
  73. new ESTILOS;
  74.  
  75. main()
  76. {
  77. print("----------------------------------");
  78. print(" Brasil Guerra no Samp [v3.0] ");
  79. print(" By : Leo_Gangster ");
  80. print("----------------------------------");
  81. }
  82.  
  83. new count1 = 0;
  84. new ServidorNome[4][128] = {
  85. "Brasil Guerra no Samp *|* [v3.0]",
  86. "Servidor • Original",
  87. "Melhor servidor de Guerra!",
  88. "Venha jogar Conosco ===>"
  89. };
  90. forward NomeServer();
  91. public NomeServer()
  92. {
  93. new string[256];
  94. count1++; if(count1 > 4)count1 = 0;
  95. format(string, sizeof(string), "hostname %s", ServidorNome[count1]);
  96. SendRconCommand(string);
  97. }
  98.  
  99. public OnGameModeInit()
  100. {
  101. UsePlayerPedAnims();
  102. SetTimer("NomeServer", 4000,1);
  103.  
  104.  
  105. //afk
  106. AfkText = TextDrawCreate(168.000000,319.000000,"Voce esta ausente ~p~/afk");
  107. TextDrawAlignment(AfkText,0);
  108. TextDrawBackgroundColor(AfkText,0x000000ff);
  109. TextDrawFont(AfkText,1);
  110. TextDrawLetterSize(AfkText,1.000000,2.699999);
  111. TextDrawColor(AfkText,0xffffffff);
  112. TextDrawSetOutline(AfkText,1);
  113. TextDrawSetProportional(AfkText,1);
  114. TextDrawSetShadow(AfkText,1);
  115. AfkBackText = TextDrawCreate(248.000000,351.000000,"Para voltar ao jogo digite ~p~/on");
  116. TextDrawAlignment(AfkBackText,0);
  117. TextDrawBackgroundColor(AfkBackText,0x000000ff);
  118. TextDrawFont(AfkBackText,1);
  119. TextDrawLetterSize(AfkBackText,0.299999,1.100000);
  120. TextDrawColor(AfkBackText,0xffffffff);
  121. TextDrawSetOutline(AfkBackText,1);
  122. TextDrawSetProportional(AfkBackText,1);
  123. TextDrawSetShadow(AfkBackText,1);
  124.  
  125. TempoRoYal = TextDrawCreate(605.0,25.0,"00:00");
  126. TextDrawUseBox(TempoRoYal, 0);
  127. TextDrawFont(TempoRoYal, 1);
  128. TextDrawSetShadow(TempoRoYal,0);
  129. TextDrawSetOutline(TempoRoYal,2);
  130. TextDrawBackgroundColor(TempoRoYal,0x000000FF);
  131. TextDrawColor(TempoRoYal,0xFFFFFFFF);
  132. TextDrawAlignment(TempoRoYal,3);
  133. TextDrawLetterSize(TempoRoYal,0.5,1.5);
  134.  
  135. Atualizartempo();
  136. SetTimer("Atualizartempo",1000 * 60,1);
  137.  
  138. SetTimer("AtualizarScore", 1000, true);
  139. for(new x = 0; x < MAX_PLAYERS; x++)
  140. {
  141. ScoreTextDraw[x] = TextDrawCreate(32.000000, 317.000000, "Voce Matou : 0");
  142. TextDrawBackgroundColor(ScoreTextDraw[x], 255);
  143. TextDrawFont(ScoreTextDraw[x], 1);
  144. TextDrawLetterSize(ScoreTextDraw[x], 0.440000, 1.500000);
  145. TextDrawColor(ScoreTextDraw[x], -1);
  146. TextDrawSetOutline(ScoreTextDraw[x], 0);
  147. TextDrawSetProportional(ScoreTextDraw[x], 1);
  148. TextDrawSetShadow(ScoreTextDraw[x], 1);
  149. }
  150.  
  151. textdraw = TextDrawCreate(4.000000,435.000000,"Guerra no samp v3.0");
  152. TextDrawFont(textdraw,3);
  153. TextDrawColor(textdraw,0x00FFFFFF);
  154. TextDrawLetterSize(textdraw,0.599999,1.000003);
  155. TextDrawSetOutline(textdraw,1);
  156. TextDrawSetShadow(textdraw,1);
  157. TextDrawSetProportional(textdraw,1);
  158. TextDrawBackgroundColor(textdraw,0x000000ff);
  159.  
  160. AddStaticVehicleEx(601,-49.6000000,2350.1001000,24.1000000,180.0000000,245,245,15); //S.W.A.T. Van
  161. AddStaticVehicleEx(601,-45.6992200,2350.0000000,24.1000000,180.0000000,245,245,15); //S.W.A.T. Van
  162. AddStaticVehicleEx(432,-34.4000000,2323.0000000,24.2000000,2.0000000,95,10,15); //Rhino
  163. AddStaticVehicleEx(433,-41.5000000,2322.1999500,24.7000000,0.0000000,95,10,15); //Barracks
  164. AddStaticVehicleEx(520,-21.7000000,2330.3999000,25.1000000,80.0000000,-1,-1,15); //Hydra
  165. AddStaticVehicleEx(470,-47.2000000,2332.8000500,24.0000000,266.0000000,95,10,15); //Patriot
  166. AddStaticVehicleEx(470,-47.4000000,2337.3999000,24.3000000,265.9950000,95,10,15); //Patriot
  167. AddStaticVehicleEx(470,419.7000100,2466.1001000,16.6000000,88.0000000,95,10,15); //Patriot
  168. AddStaticVehicleEx(470,419.7000100,2460.6001000,16.6000000,87.9950000,95,10,15); //Patriot
  169. AddStaticVehicleEx(500,390.3999900,2461.8999000,16.7000000,266.0000000,32,32,15); //Mesa
  170. AddStaticVehicleEx(500,390.1992200,2458.5000000,16.7000000,265.9950000,32,32,15); //Mesa
  171. AddStaticVehicleEx(432,418.3999900,2448.8000500,16.6000000,92.0000000,95,10,15); //Rhino
  172. AddStaticVehicleEx(433,391.3999900,2445.1999500,17.1000000,312.0000000,95,10,15); //Barracks
  173. AddStaticVehicleEx(520,407.3999900,2503.5000000,17.4000000,88.0000000,-1,-1,15); //Hydra
  174. CreateObject(989,217.6000100,1876.0999800,14.0000000,0.0000000,0.0000000,286.0000000); //object(ac_apgate) (1)
  175. CreateObject(989,212.0996100,1876.1992200,14.0000000,0.0000000,0.0000000,285.9960000); //object(ac_apgate) (2)
  176. CreateObject(987,1994.6999500,-1309.9000200,20.0000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (1)
  177. CreateObject(987,2037.7998000,-1271.0996100,20.3000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (2)
  178. CreateObject(987,1972.4000200,-1308.9000200,22.8000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (3)
  179. CreateObject(987,-49.8000000,2048.3999000,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (4)
  180. CreateObject(987,-2.7000000,2048.6999500,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (9)
  181. CreateObject(987,-14.6000000,2048.8999000,16.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (10)
  182. CreateObject(987,-26.4000000,2048.6001000,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (11)
  183. CreateObject(987,-38.2000000,2048.6999500,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (12)
  184. CreateObject(987,-49.8000000,2036.8000500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (13)
  185. CreateObject(987,9.3000000,2048.5000000,16.8000000,0.0000000,0.0000000,266.0000000); //object(elecfence_bar) (18)
  186. CreateObject(987,-44.7000000,1858.6999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (19)
  187. CreateObject(987,-45.0000000,1868.5000000,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (20)
  188. CreateObject(987,-45.3000000,1879.1999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (21)
  189. CreateObject(987,-45.8000000,1889.0999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (22)
  190. CreateObject(987,-46.2000000,1899.5999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (23)
  191. CreateObject(987,-46.6000000,1911.1999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (24)
  192. CreateObject(987,-47.0000000,1922.6999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (25)
  193. CreateObject(987,-47.1000000,1933.8000500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (26)
  194. CreateObject(987,-47.6000000,1943.9000200,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (27)
  195. CreateObject(987,-48.2000000,1966.0999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (28)
  196. CreateObject(987,-49.0000000,1989.5999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (29)
  197. CreateObject(987,-49.2000000,2001.4000200,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (30)
  198. CreateObject(987,-49.7000000,2025.1999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (31)
  199. CreateObject(987,-49.5000000,2013.0000000,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (32)
  200. CreateObject(987,-48.9000000,1978.0999800,16.2000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (33)
  201. CreateObject(987,-47.8000000,1954.8000500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (34)
  202. CreateObject(987,8.8000000,2036.9000200,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (35)
  203. CreateObject(987,6.0000000,2001.4000200,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (38)
  204. CreateObject(987,6.9000000,2013.1999500,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (39)
  205. CreateObject(987,7.7000000,2025.0000000,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (40)
  206. CreateObject(987,17.8000000,2001.0000000,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (41)
  207. CreateObject(987,29.7000000,2000.5000000,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (42)
  208. CreateObject(987,41.4000000,1999.9000200,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (43)
  209. CreateObject(987,53.4000000,1999.3000500,16.6000000,0.0000000,0.0000000,266.0000000); //object(elecfence_bar) (44)
  210. CreateObject(987,49.6000000,1952.4000200,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (45)
  211. CreateObject(987,50.6000000,1963.9000200,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (46)
  212. CreateObject(987,51.6000000,1975.8000500,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (47)
  213. CreateObject(987,52.5000000,1987.5000000,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (48)
  214. CreateObject(987,48.7000000,1940.5999800,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (49)
  215. CreateObject(987,57.6000000,1922.5999800,16.6000000,0.0000000,0.0000000,327.9950000); //object(elecfence_bar) (50)
  216. CreateObject(987,47.6992200,1928.8994100,16.6000000,0.0000000,0.0000000,327.9910000); //object(elecfence_bar) (51)
  217. CreateObject(987,67.8000000,1916.0000000,16.6000000,0.0000000,0.0000000,225.9910000); //object(elecfence_bar) (52)
  218. CreateObject(987,53.5000000,1873.0000000,16.6000000,0.0000000,0.0000000,259.9890000); //object(elecfence_bar) (53)
  219. CreateObject(987,59.6992200,1907.5996100,16.6000000,0.0000000,0.0000000,259.9860000); //object(elecfence_bar) (54)
  220. CreateObject(987,51.4000000,1861.4000200,16.6000000,0.0000000,0.0000000,225.9860000); //object(elecfence_bar) (56)
  221. CreateObject(987,55.7000000,1884.5999800,16.6000000,0.0000000,0.0000000,259.9860000); //object(elecfence_bar) (57)
  222. CreateObject(987,57.8000000,1896.0999800,16.6000000,0.0000000,0.0000000,259.9860000); //object(elecfence_bar) (58)
  223. CreateObject(987,-44.7000000,1858.5999800,16.7000000,0.0000000,0.0000000,306.0000000); //object(elecfence_bar) (59)
  224. CreateObject(987,-26.3000000,1830.9000200,16.6000000,0.0000000,0.0000000,305.9970000); //object(elecfence_bar) (60)
  225. CreateObject(987,-32.8000000,1840.6999500,16.6000000,0.0000000,0.0000000,305.9970000); //object(elecfence_bar) (61)
  226. CreateObject(987,-38.1000000,1848.6999500,16.6000000,0.0000000,0.0000000,305.9970000); //object(elecfence_bar) (62)
  227. CreateObject(987,42.9000000,1852.9000200,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (63)
  228. CreateObject(987,34.4000000,1844.6999500,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (64)
  229. CreateObject(987,25.9000000,1836.4000200,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (65)
  230. CreateObject(987,17.4000000,1828.3000500,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (66)
  231. CreateObject(987,8.9000000,1820.3000500,16.6000000,0.0000000,0.0000000,195.9830000); //object(elecfence_bar) (67)
  232. CreateObject(987,-14.1000000,1818.0999800,16.6000000,0.0000000,0.0000000,137.9800000); //object(elecfence_bar) (68)
  233. CreateObject(987,-2.5000000,1817.0996100,16.6000000,0.0000000,0.0000000,175.9790000); //object(elecfence_bar) (69)
  234. CreateObject(17059,15.2000000,1979.6999500,16.6000000,0.0000000,0.0000000,0.0000000); //object(cw_haypile05) (1)
  235. CreateObject(12918,-22.5000000,1960.8000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (1)
  236. CreateObject(12918,-7.6000000,2038.5999800,17.2000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (2)
  237. CreateObject(12918,-23.4000000,2038.0999800,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (3)
  238. CreateObject(12918,-36.2000000,2038.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (4)
  239. CreateObject(12918,-11.0996100,2038.3994100,16.3000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (5)
  240. CreateObject(12918,-6.0000000,2005.8000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (6)
  241. CreateObject(12918,-23.5996100,2017.5996100,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (7)
  242. CreateObject(12918,-5.7000000,1934.1999500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (8)
  243. CreateObject(12918,14.6992200,1957.3994100,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (9)
  244. CreateObject(12918,-15.7000000,1843.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (10)
  245. CreateObject(12918,-4.0000000,1842.5000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (11)
  246. CreateObject(12918,8.8000000,1841.5000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (12)
  247. CreateObject(12918,-18.8000000,1868.3000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (13)
  248. CreateObject(12918,2.7000000,1892.9000200,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (14)
  249. CreateObject(12918,24.4000000,1867.5000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (15)
  250. CreateObject(12918,42.6000000,1907.6999500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (16)
  251. CreateObject(12918,-32.0000000,1899.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (17)
  252. CreateObject(17059,39.1000000,1990.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(cw_haypile05) (2)
  253. CreateObject(12918,36.6000000,1933.8000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (18)
  254.  
  255. SetGameModeText("v3.0 | TDM/DM/STUNT");
  256. AddPlayerClass(287,-20.9999,2043.9071,17.7070,179.2678,31,999,999,0,0,0); // Militares
  257. AddPlayerClass(123,3.6781,1827.8041,17.6476,5.8211,30,999,999,0,0,0); // Terroristas
  258.  
  259.  
  260. return 1;
  261. }
  262.  
  263.  
  264. public OnGameModeExit()
  265. {
  266. return 1;
  267. }
  268.  
  269. public OnPlayerRequestClass(playerid, classid)
  270. {
  271. if(classid == 0)
  272. {
  273. GameTextForPlayer(playerid,"~w~Time dos ~g~Militares",5000,3);
  274. pClass[playerid] = 1;
  275. }
  276. if(classid == 1)
  277. {
  278. GameTextForPlayer(playerid,"~w~Time dos ~g~Terroristas",5000,3);
  279. pClass[playerid] = 2;
  280. }
  281. SetPlayerPos(playerid, 301.4348,2024.7008,17.6406);
  282. SetPlayerCameraPos(playerid, 290.9778,2024.1334,17.6406);
  283. SetPlayerCameraLookAt(playerid, 296.0461,2024.3499,17.6406);
  284. return 1;
  285. }
  286.  
  287. public OnPlayerConnect(playerid)
  288. {
  289. gettime(HoraRoYal, MinutosRoYal);
  290. SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
  291. TextDrawShowForPlayer(playerid, textdraw);
  292. SendClientMessage(playerid,0xFF8000AA,"~-~-~-~-~-~-~-~-~Guerra No Samp [v3.0]~-~-~-~-~-~-~-~--~-~-~-~-~");
  293. SendClientMessage(playerid,AMARELO,"{FF0000} /AJUDA {00FFFF}***|*** {FFFFFF} Para ver os comandos do servidor!");
  294. SendClientMessage(playerid,AMARELO,"{FF0000} /CREDITOS {00FFFF}***|*** {FFFFFF} Para ver quem Criou o GM!");
  295. SendClientMessage(playerid,AMARELO,"{FF0000} /OBJETIVO {00FFFF}***|*** {FFFFFF} Para ver o Objetivo do Servidor!");
  296. SendClientMessage(playerid,0x00FF00AA,"~-~-~-~-~-~-~-~-~-~-~-Bem Vindo~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~");
  297. pClass[playerid] = 0;
  298. GivePlayerMoney(playerid,500);
  299. new Nome[MAX_PLAYER_NAME];
  300. GetPlayerName(playerid, Nome, sizeof(Nome));
  301. new String[128];
  302. format(String, sizeof(String), CONTAS, Nome);
  303. calado[playerid] = false;
  304. tv[playerid] = false;
  305. if(!dini_Exists(String))
  306. {
  307. format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Não Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
  308. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  309. }
  310. else
  311. {
  312. format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
  313. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  314. }
  315. return 1;
  316.  
  317. }
  318.  
  319.  
  320.  
  321. public OnPlayerDisconnect(playerid, reason)
  322. {
  323. TextDrawHideForPlayer(playerid, textdraw);
  324. new string[256];
  325. new
  326. name[MAX_PLAYER_NAME];
  327. GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  328. switch(reason)
  329. {
  330. case 0: format(string,sizeof string,"{98FB98}%s{98FB98} Saiu do Server. {00FFFF} (Crash/Erro){00FFFF}",name);
  331. case 1: format(string,sizeof string,"{98FB98}%s{98FB98} Saiu do Server. {00FFFF} (Resolveu Sair){00FFFF}",name);
  332. case 2: format(string,sizeof string,"{98FB98}%s{98FB98} Saiu do Server. {00FFFF} (Kickado/Banido){00FFFF}",name);
  333. }
  334. SendClientMessageToAll(0xFFFFFFAA,string);
  335. SalvarPlayer(playerid);
  336. if(IsPlayerInAnyVehicle(playerid))
  337. {
  338. VeiculoOcupado[GetPlayerVehicleID(playerid)] = false;
  339. }
  340. return 1;
  341. }
  342. public OnPlayerSpawn(playerid)
  343. {
  344. TextDrawShowForPlayer(playerid,TempoRoYal);
  345. gettime(HoraRoYal, MinutosRoYal);
  346. SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
  347.  
  348. if(pClass[playerid] == 1)
  349. {
  350. SetPlayerPos(playerid,-20.9999,2043.9071,17.7070);
  351. ResetPlayerWeapons(playerid);
  352. ShowPlayerDialog(playerid, ESTILOS, DIALOG_STYLE_LIST, "{FFFF00}Time dos Militares", "{FF0000}Bem Vindo ao Time dos Militares\n{FFFFFF}Seu objetivo aqui é Matar os Terroristas!\n{00FF00}Nao deixe que os Terroristas Domine seu Time. ","Jogar", "Sair");
  353. SetPlayerHealth(playerid,100);
  354. SetPlayerArmour(playerid,100);
  355. GivePlayerWeapon(playerid,4,1);
  356. GivePlayerWeapon(playerid,16,50);
  357. GivePlayerWeapon(playerid,41,1000);
  358. GivePlayerWeapon(playerid,26,1000);
  359. GivePlayerWeapon(playerid,31,1000);
  360. GivePlayerWeapon(playerid,24,1000);
  361. GivePlayerWeapon(playerid,32,1000);
  362. SendClientMessage(playerid,COLOR_WHITE,"Você está jogando como um {00FF00}Militar! Use /ajuda para mais informações.");
  363. SetPlayerColor(playerid,VERDE_EXERCITO);
  364. SetPlayerTeam(playerid, 1);
  365. }
  366. if(pClass[playerid] == 2)
  367. {
  368. SetPlayerPos(playerid,3.6781,1827.8041,17.6476);
  369. ResetPlayerWeapons(playerid);
  370. ShowPlayerDialog(playerid, ESTILOS, DIALOG_STYLE_LIST, "{FFFF00}Time dos Terroristas", "{FF0000}Bem Vindo ao Time dos Terroristas\n{FFFFFF}Seu objetivo aqui é Matar os Militares!\n{00FF00}Nao deixe que os Militares Dominem seu Time. ","Jogar", "Sair");
  371. SetPlayerHealth(playerid,100);
  372. SetPlayerArmour(playerid,100);
  373. GivePlayerWeapon(playerid,4,1);
  374. GivePlayerWeapon(playerid,16,50);
  375. GivePlayerWeapon(playerid,41,1000);
  376. GivePlayerWeapon(playerid,26,1000);
  377. GivePlayerWeapon(playerid,31,1000);
  378. GivePlayerWeapon(playerid,24,1000);
  379. GivePlayerWeapon(playerid,32,1000);
  380. SendClientMessage(playerid,COLOR_WHITE,"Você está jogando como um {f6dc76}Terrorista! Use /ajuda para mais informações.");
  381. SetPlayerColor(playerid,MARROM_TERRORISTA);
  382. SetPlayerTeam(playerid, 2);
  383. }
  384.  
  385.  
  386. return 1;
  387. }
  388. public OnPlayerDeath(playerid, killerid, reason)
  389. {
  390. TextDrawHideForPlayer(playerid,TempoRoYal);
  391. SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
  392. GivePlayerMoney(killerid, GetPlayerMoney(killerid)+1000);
  393. GameTextForPlayer(playerid,"~w~Morto...!",5000,3);
  394. if(GetPlayerColor(playerid) == GetPlayerColor(killerid)) // Se o cor do morto for igual a do assassino
  395. {
  396. new Float:x, Float:y, Float:z;
  397. GetPlayerPos(playerid, x, y, z); // Aqui pegaremos a pos do JOGADOR
  398. // Aplicaremos a punição
  399. SetPlayerPos(killerid, x, y, z+200); // ERGUEREMOS ELE PRA QUE ELE CAIA E MORRA
  400. SetPlayerScore(killerid,GetPlayerScore(killerid) - 1); // tiramos 1 de score
  401. SendClientMessage(killerid, VERMELHO_MORTO, "Voçe perdeu $2.000 [Motivo : Matou um Companheiro] .");
  402. GivePlayerMoney(killerid,-2000); // tiramos 2k dele
  403. // FIM DA PUNIçÂO
  404. }
  405. Matou[killerid]++;
  406. Morreu[playerid]++;
  407. god[playerid] = 0;
  408. if(Matou[killerid] == 10)
  409. {
  410. new msg[70];
  411. format(msg, sizeof(msg), "%s está virando um matador, já matou 10 players", Name(killerid));
  412. SendClientMessageToAll(VERDE, msg);
  413. medalhas[killerid] ++;
  414. }
  415. else if(Matou[killerid] == 30)
  416. {
  417. new msg[80];
  418. format(msg, sizeof(msg), "%s está virando um Serial Killer, já matou 30 players", Name(killerid));
  419. SendClientMessageToAll(VERDE, msg);
  420. medalhas[killerid] ++;
  421. }
  422. else if(Matou[killerid] == 50)
  423. {
  424. new msg[85];
  425. format(msg, sizeof(msg), "%s está virando um Matador de Aluguel, já matou 50 players", Name(killerid));
  426. SendClientMessageToAll(VERDE, msg);
  427. medalhas[killerid] ++;
  428. }
  429. else if(Matou[killerid] == 100)
  430. {
  431. new msg[70];
  432. format(msg, sizeof(msg), "%s é um Matador, já matou 100 players", Name(killerid));
  433. SendClientMessageToAll(VERDE, msg);
  434. GivePlayerMoney(killerid, 120000);
  435. medalhas[killerid] ++;
  436. }
  437. else if(Matou[killerid] == 150)
  438. {
  439. new msg[70];
  440. format(msg, sizeof(msg), "%s é um Serial Killer, já matou 150 players", Name(killerid));
  441. SendClientMessageToAll(VERDE, msg);
  442. medalhas[killerid] ++;
  443. }
  444. else if(Matou[killerid] == 200)
  445. {
  446. new msg[80];
  447. format(msg, sizeof(msg), "%s é um Matador de Aluguel, já matou 200 players", Name(killerid));
  448. SendClientMessageToAll(VERDE, msg);
  449. GivePlayerMoney(killerid, 120000);
  450. medalhas[killerid] ++;
  451. }
  452. else if(Matou[killerid] == 205 || Matou[killerid] == 210 || Matou[killerid] == 220 || Matou[killerid] == 230 || Matou[killerid] == 240 || Matou[killerid] == 250)
  453. {
  454. new msg[85];
  455. format(msg, sizeof(msg), "%s está aumentando sua lista de mortos, já foram %d mortos.", Name(killerid), Matou[killerid]);
  456. SendClientMessageToAll(VERDE, msg);
  457. medalhas[killerid] ++;
  458. }
  459. return 1;
  460. }
  461.  
  462.  
  463.  
  464. public OnVehicleDeath(vehicleid, killerid)
  465. {
  466. return 1;
  467. }
  468.  
  469. public OnPlayerText(playerid, text[])
  470. {
  471. if(calado[playerid])
  472. {
  473. SendClientMessage(playerid, -1, "Você foi calado por um Admin!");
  474. return 0;
  475. }
  476. return 1;
  477. }
  478.  
  479. public OnPlayerCommandText(playerid, cmdtext[])
  480. {
  481.  
  482.  
  483. if (strcmp("/ajuda", cmdtext, true, 10) == 0)
  484. {
  485. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Ajuda", "{FFFFFF}/nickon{FFFFFF}\n{FFFFFF}/nickoff\n{FFFFFF}/mudartime \n {FFFFFF}/afk \n {FFFFFF}/on \n {FFFFFF}/ausentes \n {FFFFFF}/creditos \n {FFFFFF}/objetivo \n {FFFFFF}/kill \n {FFFFFF}/armor \n {FFFFFF}/comprarbazuca \n {FFFFFF}/kit1 \n {FFFFFF}/kit2 \n {FFFFFF}/kit3 \n {FFFFFF}/animes \n {FFFFFF}/relatorio ", "Ok", "Fechar");
  486. return 1;
  487. }
  488. if (strcmp("/objetivo", cmdtext, true, 10) == 0)
  489. {
  490. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Objetivo", "O Principal Objetivo do Servidor é Matar o Time Inimigo\nNao deixe que o Outro Time Mate seus Companheiros!\nBom Jogo!.", "Ok", "Fechar");
  491. return 1;
  492. }
  493. if (strcmp("/creditos", cmdtext, true, 10) == 0)
  494. {
  495. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Creditos", "Leo_Gangster", "Ok", "Fechar");
  496. return 1;
  497. }
  498.  
  499. if (strcmp("/mudartime", cmdtext, true, 10) == 0)
  500. {
  501. GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  502. format(strinx, sizeof(strinx), "O Player %s Foi mudar de {FF00FF}Time {FF0000}( /MUDARTIME )", pname);
  503. SendClientMessageToAll(Verde, strinx);
  504. ForceClassSelection(playerid);
  505. SetPlayerHealth(playerid, 0);
  506. return 1;
  507. }
  508.  
  509. if(strcmp(cmdtext, "/afk", true) == 0)
  510. {
  511. new string[256];
  512. if(AFK[playerid]==0)
  513. {
  514. AFK[playerid]=1;
  515. SetPlayerVirtualWorld(playerid, 1);
  516. SetCameraBehindPlayer(playerid);
  517. TogglePlayerControllable(playerid,0);
  518.  
  519. TextDrawShowForPlayer(playerid,AfkText);
  520. TextDrawShowForPlayer(playerid,AfkBackText);
  521.  
  522. GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  523. format(string, sizeof(string), "(INFO) O jogador %s ficou ausente do jogo! (/afk)", playername);
  524. SendClientMessageToAll(0xFF9595AA, string);
  525. }else{
  526. SendClientMessage(playerid,AMARELO,"(ERRO) Você já está no modo Online para poder utilizar esse comando!");
  527. return 1;
  528. }
  529. return 1;
  530. }
  531.  
  532. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••//
  533.  
  534. if(strcmp(cmdtext, "/ausentes", true) == 0){
  535. SendClientMessage(playerid,0x008000AA,"~~~~ Jogadores AFK ~~~~");
  536. new Jogador[24];
  537. new count = 0;
  538. new msg[120];
  539. for(new i=0; i<MAX_PLAYERS; i++){
  540. if(IsPlayerConnected(i) && AFK[i]){
  541. GetPlayerName(i,Jogador,24);
  542. format(msg,sizeof(msg),"%s", Jogador);
  543. SendClientMessage(playerid, 0x0088CAAA, msg);
  544. SendClientMessage(playerid,0x008000AA,"~~~~ Jogadores AFK ~~~~");
  545. count++;
  546. }
  547. }
  548. if(count == 0){
  549. SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Ninguém está ausente.");
  550. }
  551. return 1;
  552. }
  553.  
  554. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••//
  555.  
  556. if (strcmp(cmdtext, "/on", true) == 0)
  557. {
  558. new string[256];
  559. if(AFK[playerid]==1)
  560. {
  561. AFK[playerid]=0;
  562. SetPlayerVirtualWorld(playerid, 0);
  563. TogglePlayerControllable(playerid,1);
  564.  
  565. TextDrawHideForPlayer(playerid,AfkText);
  566. TextDrawHideForPlayer(playerid,AfkBackText);
  567.  
  568. GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
  569. format(string, sizeof(string), "(ANTI-AFK) %s está de volta! (/on)", playername);
  570. SendClientMessageToAll(0x2BFF95AA, string);
  571. }else{
  572. SendClientMessage(playerid,AMARELO,"(ERRO) Você não está AFK!");
  573. return 1;
  574. }
  575. return 1;
  576. }
  577. if (strcmp("/armor", cmdtext, true, 10) == 0)
  578. {
  579. if(GetPlayerMoney(playerid) < 500)
  580. return SendClientMessage(playerid, -1, "Você não tem 500 R$!");
  581.  
  582. GivePlayerMoney(playerid,-500);
  583. SetPlayerArmour(playerid, 100);
  584.  
  585. return 1;
  586. }
  587. if (strcmp("/kit1", cmdtext, true, 10) == 0)
  588. {
  589. if(GetPlayerMoney(playerid) < 2000)
  590. return SendClientMessage(playerid, -1, "Você não tem 2000 R$!");
  591. SendClientMessage(playerid, 0xFF6347AA, "Você comprou um Kit");
  592. GivePlayerWeapon(playerid,4,1);
  593. SetPlayerArmour(playerid, 50);
  594. GivePlayerMoney(playerid,-2000);
  595. GivePlayerWeapon(playerid,26,200);
  596. GivePlayerWeapon(playerid,32,200);
  597. GivePlayerWeapon(playerid,34,10);
  598. GivePlayerWeapon(playerid,35,1);
  599. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  600.  
  601. return 1;}
  602. if (strcmp("/kit2", cmdtext, true, 10) == 0)
  603. {
  604. if(GetPlayerMoney(playerid) < 5000)
  605. return SendClientMessage(playerid, -1, "Você não tem 5000 R$!");
  606. GivePlayerWeapon(playerid,9,1);
  607. SendClientMessage(playerid, 0xFF6347AA, "Você comprou um Kit");
  608. GivePlayerMoney(playerid,-5000);
  609. SetPlayerArmour(playerid, 80);
  610. GivePlayerWeapon(playerid,26,400);
  611. GivePlayerWeapon(playerid,32,400);
  612. GivePlayerWeapon(playerid,34,30);
  613. GivePlayerWeapon(playerid,35,3);
  614. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  615.  
  616. return 1;}
  617. if (strcmp("/kit3", cmdtext, true, 10) == 0)
  618. {
  619. if(GetPlayerMoney(playerid) < 10000)
  620. return SendClientMessage(playerid, -1, "Você não tem 10000 R$!");
  621. SendClientMessage(playerid, 0xFF6347AA, "Você comprou um Kit");
  622. GivePlayerMoney(playerid,-10000);
  623. GivePlayerWeapon(playerid,8,1);
  624. SetPlayerArmour(playerid, 100);
  625. GivePlayerWeapon(playerid,26,999);
  626. GivePlayerWeapon(playerid,32,999);
  627. GivePlayerWeapon(playerid,34,999);
  628. GivePlayerWeapon(playerid,35,6);
  629. GivePlayerWeapon(playerid,44,1);
  630. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  631.  
  632. return 1;}
  633.  
  634. if (strcmp("/comprarbazuca", cmdtext, true, 10) == 0)
  635. {
  636. if(GetPlayerMoney(playerid) < 1000)
  637. return SendClientMessage(playerid, -1, "Você não tem 1000 R$!");
  638.  
  639. SendClientMessage(playerid, 0xFF6347AA, "Você comprou uma Bazuca");
  640. GivePlayerMoney(playerid,-1000);//playerid = o player ,-1000 = o valor.. pode alterar ali mas deixar - pra diminuir a grana ao usar.
  641. GivePlayerWeapon(playerid,35,3);//26= arma 500 = munição
  642.  
  643. return 1;}
  644. if (strcmp("/nickon", cmdtext, true) == 0)
  645. {
  646. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
  647. GameTextForPlayer(playerid, "~W~Nicks Ativos ~R~", 5000, 5);
  648. return 1;
  649. }
  650. if (strcmp("/nickoff", cmdtext, true) == 0)
  651. {
  652. for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
  653. GameTextForPlayer(playerid, "~W~Nicks Desativos ~R~off", 5000, 5);
  654. return 1;
  655. }
  656. //---------------------ANIMAÇÕES---------------------------------------------
  657. if(strcmp("/renderse", cmdtext, true) == 0)
  658. {
  659. SetPlayerSpecialAction(playerid, 10);
  660. return 1;
  661. }
  662. if(strcmp("/ligar", cmdtext, true) == 0)
  663. {
  664. SetPlayerSpecialAction(playerid, 11);
  665. return 1;
  666. }
  667. if(strcmp("/desligar", cmdtext, true) == 0)
  668. {
  669. SetPlayerSpecialAction(playerid, 13);
  670. return 1;
  671. }
  672. if(strcmp("/bebado", cmdtext, true) == 0)
  673. {
  674. ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0);
  675. return 1;
  676. }
  677. if(strcmp("/bomba", cmdtext, true) == 0)
  678. {
  679. ClearAnimations(playerid);
  680. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
  681. return 1;
  682. }
  683. if(strcmp("/apontar", cmdtext, true) == 0)
  684. {
  685. ApplyAnimation(playerid, "ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1);
  686. return 1;
  687. }
  688. if(strcmp("/merda", cmdtext, true) == 0)
  689. {
  690. ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
  691. return 1;
  692. }
  693. if(strcmp("/mascararse", cmdtext, true) == 0)
  694. {
  695. ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
  696. return 1;
  697. }
  698. if(strcmp("/roubar", cmdtext, true) == 0)
  699. {
  700. ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
  701. return 1;
  702. }
  703. if(strcmp("/cruzarb", cmdtext, true) == 0)
  704. {
  705. ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
  706. return 1;
  707. }
  708. if(strcmp("/deitar", cmdtext, true) == 0)
  709. {
  710. ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
  711. return 1;
  712. }
  713. if(strcmp("/abaixar", cmdtext, true) == 0)
  714. {
  715. ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
  716. return 1;
  717. }
  718. if(strcmp("/vomitar", cmdtext, true) == 0)
  719. {
  720. ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
  721. return 1;
  722. }
  723. if(strcmp("/comer", cmdtext, true) == 0)
  724. {
  725. ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  726. return 1;
  727. }
  728. if(strcmp("/rap", cmdtext, true) == 0)
  729. {
  730. ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0);
  731. return 1;
  732. }
  733. if(strcmp("/passaramao", cmdtext, true) == 0)
  734. {
  735. ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0);
  736. return 1;
  737. }
  738. if(strcmp("/cobrar", cmdtext, true) == 0)
  739. {
  740. ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0);
  741. return 1;
  742. }
  743. if(strcmp("/overdose", cmdtext, true) == 0)
  744. {
  745. ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  746. return 1;
  747. }
  748. if(strcmp("/fumar", cmdtext, true) == 0)
  749. {
  750. ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
  751. return 1;
  752. }
  753. if(strcmp("/fumar2", cmdtext, true) == 0)
  754. {
  755. ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
  756. return 1;
  757. }
  758. if(strcmp("/sentar", cmdtext, true) == 0)
  759. {
  760. ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
  761. return 1;
  762. }
  763. if(strcmp("/conversar", cmdtext, true) == 0)
  764. {
  765. ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 0, 0, 0, 0);
  766. return 1;
  767. }
  768. if(strcmp("/fodase", cmdtext, true) == 0)
  769. {
  770. ApplyAnimation(playerid, "PED", "fucku", 4.0, 0, 0, 0, 0, 0);
  771. return 1;
  772. }
  773. if(strcmp("/taichi", cmdtext, true) == 0)
  774. {
  775. ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
  776. return 1;
  777. }
  778. if(strcmp("/observar", cmdtext, true) == 0)
  779. {
  780. ApplyAnimation(playerid, "BAR", "dnk_stndF_loop", 4.0, 1, 0, 0, 0, 0);
  781. return 1;
  782. }
  783. //---------------------Lista Animações------------------------------------
  784. if(strcmp("/animes", cmdtext, true) == 0)
  785. {
  786. SendClientMessage(playerid, VERMELHO_MORTO, "Lista de Animes");
  787. SendClientMessage(playerid, BRANCO_CIVIL, "/renderse /ligar /desligar /bebado /bomba /apontar /merda /mascararse");
  788. SendClientMessage(playerid, BRANCO_CIVIL, "/roubar /cruzarb /deitar /abaixar /vomitar /comer /rap /passaramao");
  789. SendClientMessage(playerid, BRANCO_CIVIL, "/cobrar /overdose /fumar /fumar2 /sentar /conversar /fodase /taichi");
  790. SendClientMessage(playerid, BRANCO_CIVIL, "/observar ");
  791. return 1;
  792. }
  793.  
  794. if(strcmp("/kill", cmdtext, true) == 0)
  795. {
  796. SetPlayerHealth(playerid, 0);
  797. SendClientMessage(playerid,VERMELHO_MORTO,"Voce Se Matou!");
  798. return 1;
  799. }
  800.  
  801. //=================COMANDOS DE ADMIN============================================
  802. new cmd[50 char], params[100 char];
  803. new msg[180], id;
  804. unformat(cmdtext, "s[50]S( )[100]",cmd,params);
  805.  
  806. if(strcmp(cmd, "/aa", true) == 0)
  807. {
  808. if(PlayerInfo[playerid][cAdmin] == 0) return SendClientMessage(playerid, -1, "Você não é admin");
  809. if(PlayerInfo[playerid][cAdmin] >= 1)
  810. {
  811. SendClientMessage(playerid, LARANJA, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[Comandos Admin]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  812. SendClientMessage(playerid, -1, "Lvl 1: /kick /ir /trazer /par /a /forceskin /carroadm /ejetar /c");
  813. }
  814. if(PlayerInfo[playerid][cAdmin] >= 2)
  815. {
  816. SendClientMessage(playerid, -1, "Lvl 2: /av /ban /vida /resetararmas /colete /cnn /hora /setskin /reparar /tv /tvoff");
  817. }
  818. if(PlayerInfo[playerid][cAdmin] >= 3)
  819. {
  820. SendClientMessage(playerid, -1, "Lvl 3: /rc /tapa /congelar /descongelar /dararma /subir /descer /status");
  821. }
  822. if(PlayerInfo[playerid][cAdmin] >= 4)
  823. {
  824. SendClientMessage(playerid, -1, "Lvl 4: /dargrana /setgrana /veh /ann /salvepos /irpos /calar /descalar");
  825. }
  826. if(PlayerInfo[playerid][cAdmin] == 5)
  827. {
  828. SendClientMessage(playerid, -1, "Lvl 5: /daradmin /setgravidade /editar");
  829. }
  830. return 1;
  831. }
  832. if(strcmp(cmd, "/editar", true) == 0)
  833. {
  834. if(PlayerInfo[playerid][cAdmin] == 5)
  835. {
  836. new edit[10], lvl;
  837. if(sscanf(params, "ds[10]d", id, edit, lvl))
  838. {
  839. SendClientMessage(playerid, -1, "USO: /editar [id] [edit] [quantidade]");
  840. SendClientMessage(playerid, -1, "edit: medalhas, matou, morreu");
  841. return 1;
  842. }
  843. if(strcmp(edit, "medalhas", true) == 0)
  844. {
  845. medalhas[id] = lvl;
  846. return 1;
  847. }
  848. else if(strcmp(edit, "matou", true) == 0)
  849. {
  850. Matou[id] = lvl;
  851. return 1;
  852. }
  853. else if(strcmp(edit, "morreu", true) == 0)
  854. {
  855. Morreu[id] = lvl;
  856. return 1;
  857. }
  858. else return SendClientMessage(playerid, -1, "edit: medalhas, matou, morreu");
  859. }
  860. return 1;
  861. }
  862. if(strcmp(cmd, "/descalar", true) == 0)
  863. {
  864. if(PlayerInfo[playerid][cAdmin] >= 4)
  865. {
  866. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /descalar [id]");
  867. if(!calado[id]) return SendClientMessage(playerid, -1, "Este player não está calado");
  868. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO");
  869. format(msg, sizeof(msg), "Você foi descalado pelo Admin %s", Name(playerid));
  870. SendClientMessage(id, LARANJA, msg);
  871. format(msg, sizeof(msg), "Você descalou %s", Name(id));
  872. SendClientMessage(playerid, LARANJA, msg);
  873. calado[id] = false;
  874. }
  875. return 1;
  876. }
  877. if(strcmp(cmd, "/calar", true) == 0)
  878. {
  879. if(PlayerInfo[playerid][cAdmin] >= 4)
  880. {
  881. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /calar [id]");
  882. if(calado[id]) return SendClientMessage(playerid, -1, "Este player já está calado");
  883. if(id == playerid) return SendClientMessage(playerid, -1, "Não pode se calar!");
  884. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO");
  885. format(msg, sizeof(msg), "Você foi calado pelo Admin %s", Name(playerid));
  886. SendClientMessage(id, LARANJA, msg);
  887. format(msg, sizeof(msg), "Você calou %s", Name(id));
  888. SendClientMessage(playerid, LARANJA, msg);
  889. calado[id] = true;
  890. }
  891. return 1;
  892. }
  893. if(strcmp(cmd, "/creditosadmin", true) == 0)
  894. {
  895. SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-FilterScript: C-Admin-=-=-=-=-=-=-=-");
  896. SendClientMessage(playerid, LARANJA, "Feito por: Cristhian");
  897. SendClientMessage(playerid, LARANJA, "Admin e Helper v1.0");
  898. SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  899. return 1;
  900. }
  901. if(strcmp(cmd, "/irpos", true) == 0)
  902. {
  903. if(PlayerInfo[playerid][cAdmin] >= 4 || PlayerInfo[playerid][cHelper] >= 4)
  904. {
  905. if(p[playerid][0] == 0 && p[playerid][1] == 0 && p[playerid][2] == 0) return SendClientMessage(playerid, -1, "Você ainda não salvou nenhuma posição!");
  906. SetPlayerPos(playerid, p[playerid][0], p[playerid][1], p[playerid][2]);
  907. SendClientMessage(playerid, -1, "Você se teleportou");
  908. }
  909. return 1;
  910. }
  911. if(strcmp(cmd, "/salvepos", true) == 0)
  912. {
  913. if(PlayerInfo[playerid][cAdmin] >= 4 || PlayerInfo[playerid][cHelper] == 4)
  914. {
  915. GetPlayerPos(playerid, p[playerid][0], p[playerid][1], p[playerid][2]);
  916. SendClientMessage(playerid, -1, "Você salvou sua posição");
  917. }
  918. return 1;
  919. }
  920. if(strcmp(cmd, "/ricos", true) == 0)
  921. {
  922. if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
  923. {
  924. new money[MAX_PLAYERS];
  925. for(new i; i < MAX_PLAYERS; i++)
  926. {
  927. money[i] = GetPlayerMoney(playerid);
  928. Rank(money, sizeof(money));
  929. format(msg, sizeof(msg), "Nome: %s | Dinheiro: %d", Name(i), money[i]);
  930. SendClientMessage(playerid, LARANJA, msg);
  931. }
  932. return 1;
  933. }
  934. return 1;
  935. }
  936. if(strcmp(cmd, "/tv", true) == 0)
  937. {
  938. if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
  939. {
  940. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /tv [id]");
  941. if(tv[playerid]) return SendClientMessage(playerid, -1, "Você já está espiando alguém");
  942. if(IsPlayerInAnyVehicle(id))
  943. {
  944. tv[playerid] = true;
  945. TogglePlayerSpectating(playerid, 1);
  946. PlayerSpectateVehicle(id, GetPlayerVehicleID(playerid));
  947. return 1;
  948. }
  949. else
  950. {
  951. tv[playerid] = true;
  952. TogglePlayerSpectating(playerid, 1);
  953. PlayerSpectatePlayer(playerid, id);
  954. return 1;
  955. }
  956. }
  957. return 1;
  958. }
  959. if(strcmp(cmd, "/tvoff", true) == 0)
  960. {
  961. if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
  962. {
  963. if(!tv[playerid]) return SendClientMessage(playerid, -1, "Você não está espiando ninguém!");
  964. tv[playerid] = false;
  965. TogglePlayerSpectating(playerid, 0);
  966. return 1;
  967. }
  968. return 1;
  969. }
  970. if(strcmp(cmd, "/status", true) == 0)
  971. {
  972. if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
  973. {
  974. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /status [id]");
  975. Status(id);
  976. return 1;
  977. }
  978. }
  979. if(strcmp(cmd, "/descer", true) == 0)
  980. {
  981. if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
  982. {
  983. new Float:pos[3];
  984. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  985. SetPlayerPos(playerid, pos[0], pos[1], pos[2] - 10);
  986. }
  987. return 1;
  988. }
  989. if(strcmp(cmd, "/subir", true) == 0)
  990. {
  991. if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
  992. {
  993. new Float:pos[3];
  994. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  995. SetPlayerPos(playerid, pos[0], pos[1], pos[2] + 10);
  996. }
  997. return 1;
  998. }
  999. if(strcmp(cmd, "/reparar", true) == 0)
  1000. {
  1001. if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
  1002. {
  1003. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Você não está em um veículo!");
  1004. RepairVehicle(GetPlayerVehicleID(playerid));
  1005. SendClientMessage(playerid, -1, "Você reparou seu veículo");
  1006. }
  1007. return 1;
  1008. }
  1009. if(strcmp(cmd, "/ejetar", true) == 0)
  1010. {
  1011. if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
  1012. {
  1013. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /ejetar [id]");
  1014. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO!");
  1015. if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, -1, "Player não está em nenhum veículo!");
  1016. RemovePlayerFromVehicle(id);
  1017. format(msg, sizeof(msg), "O Admin %s te ejetou do veículo", Name(playerid));
  1018. SendClientMessage(id, -1, msg);
  1019. format(msg, sizeof(msg), "Você removou %s do veículo", Name(id));
  1020. SendClientMessage(playerid, -1, msg);
  1021. }
  1022. return 1;
  1023. }
  1024. if(strcmp(cmd, "/carroadm", true) == 0)
  1025. {
  1026. if(PlayerInfo[playerid][cAdmin] >= 1)
  1027. {
  1028. new Float:pos[4];
  1029. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  1030. GetPlayerFacingAngle(playerid, pos[3]);
  1031. carroadm = CreateVehicle(400, pos[0], pos[1], pos[2], pos[3], 79, 79, 180);
  1032. PutPlayerInVehicle(playerid, carroadm, 0);
  1033. SendClientMessage(playerid, -1, "Carro criado com sucesso!");
  1034. }
  1035. return 1;
  1036. }
  1037. if(strcmp(cmd, "/forceskin", true) == 0)
  1038. {
  1039. if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
  1040. {
  1041. if(sscanf(params, "dd", id)) return SendClientMessage(playerid, -1, "USO: /forceskin [id]");
  1042. ForceClassSelection(id);
  1043. format(msg, sizeof(msg), "O Admin %s lhe forçou a escolher uma skin", Name(playerid));
  1044. SendClientMessage(id, -1, msg);
  1045. format(msg, sizeof(msg), "Você forçou %s a escolher uma skin", Name(id));
  1046. SendClientMessage(playerid, -1, msg);
  1047. }
  1048. return 1;
  1049. }
  1050. if(strcmp(cmd, "/a", true) == 0)
  1051. {
  1052. if(PlayerInfo[playerid][cAdmin] >= 1)
  1053. {
  1054. new msg2[100];
  1055. if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
  1056. for(new i = 0; i < MAX_PLAYERS; i++)
  1057. {
  1058. if(PlayerInfo[i][cAdmin] > 0)
  1059. {
  1060. format(msg, sizeof(msg), "{0000BB}|CHAT ADMIN| %s diz: %s", Name(playerid), msg2);
  1061. SendClientMessage(i, -1, msg);
  1062. }
  1063. }
  1064. }
  1065. return 1;
  1066. }
  1067. if(strcmp(cmd, "/setskin", true) == 0)
  1068. {
  1069. if(PlayerInfo[playerid][cAdmin] >= 2)
  1070. {
  1071. new skin;
  1072. if(sscanf(params, "dd", id, skin)) return SendClientMessage(playerid, -1, "USO: /setskin [id] [skin]");
  1073. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1074. SetPlayerSkin(id, skin);
  1075. format(msg, sizeof(msg), "O Admin %s setou sua skin para %d", Name(playerid), skin);
  1076. SendClientMessage(id, -1, msg);
  1077. format(msg, sizeof(msg), "Você setou a skin de %s para %d", Name(id), skin);
  1078. SendClientMessage(playerid, -1, msg);
  1079. }
  1080. return 1;
  1081. }
  1082. if(strcmp(cmd, "/hora", true) == 0)
  1083. {
  1084. if(PlayerInfo[playerid][cAdmin] >= 2)
  1085. {
  1086. new hora;
  1087. if(sscanf(params, "d", hora)) return SendClientMessage(playerid, -1, "USO: /hora [horas]");
  1088. if(hora < 1 || hora > 24) return SendClientMessage(playerid, -1, "A hora não pode ser menor que 1 ou maior que 24");
  1089. SetWorldTime(hora);
  1090. format(msg, sizeof(msg), "O Admin %s setou a hora para %d:00", Name(playerid), hora);
  1091. SendClientMessageToAll(LARANJA, msg);
  1092. }
  1093. return 1;
  1094. }
  1095. if(strcmp(cmd, "/ann", true) == 0)
  1096. {
  1097. if(PlayerInfo[playerid][cAdmin] >= 2)
  1098. {
  1099. new msg2[80];
  1100. if(sscanf(params, "s[80]", msg2)) return SendClientMessage(playerid, -1, "USO: /cnn [mensagem]");
  1101. GameTextForAll(msg2, 4000, 5);
  1102. }
  1103. return 1;
  1104. }
  1105. if(strcmp(cmd, "/cnn", true) == 0)
  1106. {
  1107. if(PlayerInfo[playerid][cAdmin] >= 2)
  1108. {
  1109. new msg2[80];
  1110. if(sscanf(params, "s[80]", msg2)) return SendClientMessage(playerid, -1, "USO: /cnn [mensagem]");
  1111. format(msg, sizeof(msg), "~r~%s: ~w~%s", Name(playerid), msg2);
  1112. GameTextForAll(msg, 4000, 5);
  1113. }
  1114. return 1;
  1115. }
  1116. if(strcmp(cmd, "/setgravidade", true) == 0)
  1117. {
  1118. if(PlayerInfo[playerid][cAdmin] == 5)
  1119. {
  1120. new Float:gravity;
  1121. if(sscanf(params, "f", gravity)) return SendClientMessage(playerid, -1, "USO: /setgravidade [gravidade(o padrão é 0.008)]");
  1122. if(gravity > 2 || gravity < -1) return SendClientMessage(playerid, -1, "A gravidade não pode ser maior que 2 ou menor que -1");
  1123. SetGravity(gravity);
  1124. format(msg, sizeof(msg), "O Admin %s mudou a gravidade para %f", Name(playerid), gravity);
  1125. SendClientMessageToAll(VERDE, msg);
  1126. }
  1127. return 1;
  1128. }
  1129. if(strcmp(cmd, "/veh", true) == 0)
  1130. {
  1131. if(PlayerInfo[playerid][cAdmin] >= 4)
  1132. {
  1133. new car, cor1, cor2;
  1134. if(sscanf(params, "ddd", car, cor1, cor2)) return SendClientMessage(playerid, -1, "USO: /veh [veículo id] [cor1] [cor2]");
  1135. if(car < 400 || car > 611) return SendClientMessage(playerid, -1, "ID não pode ser menor que 400 e nem maior que 611");
  1136. new Float:pos[3];
  1137. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  1138. CreateVehicle(car, pos[0], pos[1], pos[2], 0, cor1, cor2, 120);
  1139. SendClientMessage(playerid, -1, "Você criou um veículo!");
  1140. }
  1141. return 1;
  1142. }
  1143. if(strcmp(cmd, "/par", true) == 0)
  1144. {
  1145. if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
  1146. {
  1147. new par[80];
  1148. if(sscanf(params, "ds[80]", id, par)) return SendClientMessage(playerid, -1, "USO: /par [id] [mensagem]");
  1149. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1150. format(msg, sizeof(msg), "(PARTICULAR) Admin/Helper %s diz: %s", Name(playerid), par);
  1151. SendClientMessage(id, LARANJA, msg);
  1152. }
  1153. return 1;
  1154. }
  1155. if(strcmp(cmd, "/relato", true) == 0)
  1156. {
  1157. SendClientMessage(playerid, -1, "Seu relato foi enviado aos administradores!");
  1158. new relato[80];
  1159. if(sscanf(params, "s[80]", relato)) return SendClientMessage(playerid, -1, "USO: /relato [mensagem]");
  1160. for(new i = 0; i < MAX_PLAYERS; i++)
  1161. {
  1162. if(IsPlayerConnected(i))
  1163. {
  1164. if(PlayerInfo[i][cAdmin] > 0)
  1165. {
  1166. format(msg, sizeof(msg), "RELATO de %s: %s", Name(playerid), relato);
  1167. SendClientMessage(i, VERDE, msg);
  1168. }
  1169. }
  1170. }
  1171. return 1;
  1172. }
  1173. if(strcmp(cmd, "/admins", true) == 0)
  1174. {
  1175. SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-=Admins Online:=-=-=-=-=-=-=-=-");
  1176. for(new i = 0; i < MAX_PLAYERS; i++)
  1177. {
  1178. if(IsPlayerConnected(i))
  1179. {
  1180. if(PlayerInfo[i][cAdmin] > 0)
  1181. {
  1182. format(msg, sizeof(msg), "Admin: %s | Level: %d", Name(i), PlayerInfo[i][cAdmin]);
  1183. SendClientMessage(playerid, LARANJA, msg);
  1184. }
  1185. }
  1186. }
  1187. return 1;
  1188. }
  1189. if(strcmp(cmd, "/resetararmas", true) == 0)
  1190. {
  1191. if(PlayerInfo[playerid][cAdmin] >= 2)
  1192. {
  1193. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /resetararmas [id]");
  1194. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1195. ResetPlayerWeapons(id);
  1196. }
  1197. return 1;
  1198. }
  1199. if(strcmp(cmd, "/dararma", true) == 0)
  1200. {
  1201. if(PlayerInfo[playerid][cAdmin] >= 3)
  1202. {
  1203. new arma, balas;
  1204. if(sscanf(params, "ddd", id, arma, balas)) return SendClientMessage(playerid, -1, "USO: /dararma [id] [id arma] [balas]");
  1205. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "JOGADOR OFFLINE");
  1206. GivePlayerWeapon(id, arma, balas);
  1207. format(msg, sizeof(msg), "O Admin %s lhe deu a arma de id %d com %d balas", Name(playerid), arma, balas);
  1208. SendClientMessage(id, -1, msg);
  1209. format(msg, sizeof(msg), "Você deu a arma de id %d com %d balas para %s", arma, balas, Name(id));
  1210. SendClientMessage(playerid, -1, msg);
  1211. }
  1212. return 1;
  1213. }
  1214. if(strcmp(cmd, "/descongelar", true) == 0)
  1215. {
  1216. if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
  1217. {
  1218. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /descongelar [id]");
  1219. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1220. TogglePlayerControllable(id, 1);
  1221. format(msg, sizeof(msg), "O Admin/Helper %s lhe descongelou", Name(playerid));
  1222. SendClientMessage(id, -1, msg);
  1223. format(msg, sizeof(msg), "Você descongelou %s", Name(id));
  1224. SendClientMessage(playerid, -1, msg);
  1225. }
  1226. return 1;
  1227. }
  1228. if(strcmp(cmd, "/congelar", true) == 0)
  1229. {
  1230. if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
  1231. {
  1232. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /congelar [id]");
  1233. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1234. TogglePlayerControllable(id, 0);
  1235. format(msg, sizeof(msg), "O Admin/Helper %s lhe congelou", Name(playerid));
  1236. SendClientMessage(id, -1, msg);
  1237. format(msg, sizeof(msg), "Você congelou %s", Name(id));
  1238. SendClientMessage(playerid, -1, msg);
  1239. }
  1240. return 1;
  1241. }
  1242. if(strcmp(cmd, "/daradmin", true) == 0)
  1243. {
  1244. if(PlayerInfo[playerid][cAdmin] == 5 || IsPlayerAdmin(playerid))
  1245. {
  1246. new lvl;
  1247. if(sscanf(params, "dd", id, lvl)) return SendClientMessage(playerid, -1, "USO: /daradmin [id] [level]");
  1248. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1249. if(lvl < 0 || lvl > 5) return SendClientMessage(playerid, -1, "O level de admin não pode ser menor que 0 ou maior que 5");
  1250. PlayerInfo[id][cAdmin] = lvl;
  1251. format(msg, sizeof(msg), "Você setou o level de Admin de %s para %d", Name(id), lvl);
  1252. SendClientMessage(playerid, -1, msg);
  1253. format(msg, sizeof(msg), "%s setou seu level de Admin para %d", Name(playerid), lvl);
  1254. SendClientMessage(id, -1, msg);
  1255. format(msg, sizeof(msg), "%s setou o level de Admin de %s para %d", Name(playerid), Name(id), lvl);
  1256. return 1;
  1257. }
  1258. else return SendClientMessage(playerid, -1, "Você precisa ser Admin lvl 5 ou estar logado na rcon");
  1259. }
  1260. if(strcmp(cmd, "/colete", true) == 0)
  1261. {
  1262. if(PlayerInfo[playerid][cAdmin] >= 3)
  1263. {
  1264. new Float:colete;
  1265. if(sscanf(params, "df", id, colete)) return SendClientMessage(playerid, -1, "USO: /colete [id] [colete]");
  1266. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1267. SetPlayerArmour(id, colete);
  1268. format(msg, sizeof(msg), "Você deu %d de colete a %s", colete, Name(id));
  1269. SendClientMessage(playerid, -1, msg);
  1270. format(msg, sizeof(msg), "Você recebeu %d de colete de %s", colete, Name(playerid));
  1271. SendClientMessage(id, -1, msg);
  1272. }
  1273. return 1;
  1274. }
  1275. if(strcmp(cmd, "/vida", true) == 0)
  1276. {
  1277. if(PlayerInfo[playerid][cAdmin] >= 2)
  1278. {
  1279. new Float:vida;
  1280. if(sscanf(params, "df", id, vida)) return SendClientMessage(playerid, -1, "USO: /vida [id] [vida]");
  1281. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1282. SetPlayerHealth(id, vida);
  1283. format(msg, sizeof(msg), "Você deu %d de vida a %s", vida, Name(id));
  1284. SendClientMessage(playerid, -1, msg);
  1285. format(msg, sizeof(msg), "Você recebeu %d de vida de %s", vida, Name(playerid));
  1286. SendClientMessage(id, -1, msg);
  1287. }
  1288. return 1;
  1289. }
  1290. if(strcmp(cmd, "/tapa", true) == 0)
  1291. {
  1292. if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
  1293. {
  1294. new altura;
  1295. if(sscanf(params, "dd", id, altura)) return SendClientMessage(playerid, -1, "USO: /tapa [id] [força do tapa]");
  1296. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1297. if(altura > 80 || altura < 1) return SendClientMessage(playerid, -1, "Use uma força entre 1 e 80");
  1298. new Float:pos[3];
  1299. GetPlayerPos(id, pos[0], pos[1], pos[2]);
  1300. SetPlayerPos(id, pos[0], pos[1], pos[2] + altura);
  1301. format(msg, sizeof(msg), "Você levou um tapa do Admin/Helper %s, com força de %d", Name(playerid), altura);
  1302. SendClientMessage(id, -1, msg);
  1303. format(msg, sizeof(msg), "Você deu um tapa em %s, com força de %d", Name(id), altura);
  1304. SendClientMessage(playerid, -1, msg);
  1305. format(msg, sizeof(msg), "%s deu um tapa em %s, com força de %d",Name(playerid), Name(id), altura);
  1306. }
  1307. return 1;
  1308. }
  1309. if(strcmp(cmd, "/setgrana", true) == 0)
  1310. {
  1311. if(PlayerInfo[playerid][cAdmin] >= 4)
  1312. {
  1313. new grana;
  1314. if(sscanf(params, "dd", id, grana)) return SendClientMessage(playerid, -1, "USO: /setgrana [id] [quantia]");
  1315. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1316. ResetPlayerMoney(id);
  1317. GivePlayerMoney(id, grana);
  1318. format(msg, sizeof(msg), "Você setou a grana de %s para $%d", Name(id), grana);
  1319. SendClientMessage(playerid, -1, msg);
  1320. format(msg, sizeof(msg), "%s setou a grana de %s para $%d", Name(playerid), Name(id), grana);
  1321. }
  1322. return 1;
  1323. }
  1324. if(strcmp(cmd, "/av", true, 3) == 0)
  1325. {
  1326. if(PlayerInfo[playerid][cAdmin] >= 2)
  1327. {
  1328. new av[128];
  1329. if(sscanf(params, "s[128]", av)) return SendClientMessage(playerid, -1, "USO: /av [texto]");
  1330. format(msg, sizeof(msg), "ADMIN %s: %s", Name(playerid), av);
  1331. SendClientMessageToAll(LARANJA, msg);
  1332. }
  1333. else if(PlayerInfo[playerid][cHelper] >= 2)
  1334. {
  1335. new av[128];
  1336. if(sscanf(params, "s[128]", av)) return SendClientMessage(playerid, -1, "USO: /av [texto]");
  1337. format(msg, sizeof(msg), "HELPER %s: %s", Name(playerid), av);
  1338. SendClientMessageToAll(LARANJA, msg);
  1339. }
  1340. return 1;
  1341. }
  1342. if(strcmp(cmd, "/ban", true) == 0)
  1343. {
  1344. if(PlayerInfo[playerid][cAdmin] >= 2)
  1345. {
  1346. new msg2[64], msg3[64];
  1347. if(unformat(params, "ds[64]", id, msg3)) return SendClientMessage(playerid, -1, "USO: /ban [id] [motivo]");
  1348. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1349. format(msg, sizeof(msg), "Você foi banido pelo Admin %s, Motivo: %s", Name(playerid), msg3);
  1350. SendClientMessage(id, -1, msg);
  1351. Ban(id);
  1352. format(msg2, sizeof(msg2), "%s foi banido pelo Admin %s Motivo: %s", Name(id), Name(playerid), msg3);
  1353. SendClientMessageToAll(-1, msg2);
  1354. }
  1355. else return SendClientMessage(playerid, -1, "Você não está autorizado a usar este comando!");
  1356. }
  1357. if(strcmp(cmd, "/kick", true) == 0)
  1358. {
  1359. if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cAdmin] >= 2)
  1360. {
  1361. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /kick [id]");
  1362. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1363. format(msg, sizeof(msg), "Você foi kickado pelo Admin/Helper %s", Name(playerid));
  1364. SendClientMessage(id, -1, msg);
  1365. format(msg, sizeof(msg), "%s foi kickado pelo Admin/Helper %s", Name(id), Name(playerid));
  1366. Kick(id);
  1367. }
  1368. return 1;
  1369. }
  1370. if(strcmp(cmd, "/ir", true) == 0)
  1371. {
  1372. if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
  1373. {
  1374. new Float:pos[3];
  1375. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /ir [id]");
  1376. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1377. GetPlayerPos(id, pos[0], pos[1], pos[2]);
  1378. format(msg, sizeof(msg), "Você foi até %s", Name(id));
  1379. SendClientMessage(playerid, -1, msg);
  1380. format(msg, sizeof(msg), "O Admin/Helper %s veio até você!", Name(playerid));
  1381. SendClientMessage(id, -1, msg);
  1382. if(IsPlayerInAnyVehicle(playerid))
  1383. {
  1384. new vehicleid = GetPlayerVehicleID(playerid);
  1385. SetVehiclePos(vehicleid, pos[0], pos[1], pos[2]);
  1386. return 1;
  1387. }
  1388. else
  1389. {
  1390. SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  1391. return 1;
  1392. }
  1393. }
  1394. return 1;
  1395. }
  1396. if(strcmp(cmd, "/trazer", true) == 0)
  1397. {
  1398. if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
  1399. {
  1400. if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /trazer [id]");
  1401. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1402. new Float:pos[3];
  1403. GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  1404. format(msg, sizeof(msg), "Você trouxe %s até você", Name(id));
  1405. SendClientMessage(playerid, -1, msg);
  1406. SendClientMessage(id, -1, "Você foi teleportado");
  1407. if(IsPlayerInAnyVehicle(id))
  1408. {
  1409. new vehicleid = GetPlayerVehicleID(id);
  1410. SetVehiclePos(vehicleid, pos[0], pos[1], pos[2]);
  1411. return 1;
  1412. }
  1413. else
  1414. {
  1415. SetPlayerPos(id, pos[0], pos[1], pos[2]);
  1416. return 1;
  1417. }
  1418. }
  1419. return 1;
  1420. }
  1421. if(strcmp(cmd, "/rc", true) == 0)
  1422. {
  1423. if(PlayerInfo[playerid][cAdmin] >= 3)
  1424. {
  1425. format(msg, sizeof(msg), "O Admin %s Respawnou os veiculos", Name(playerid));
  1426. SendClientMessageToAll(-1, msg);
  1427. for(new v = 0; v < MAX_VEHICLES; v++)
  1428. {
  1429. if(VeiculoOcupado[v] == false)
  1430. {
  1431. SetVehicleToRespawn(v);
  1432. }
  1433. }
  1434. return 1;
  1435. }
  1436. else return SendClientMessage(playerid, -1, "Você não está autorizado a usar este comando!");
  1437. }
  1438. if(strcmp(cmd, "/dargrana", true) == 0)
  1439. {
  1440. if(PlayerInfo[playerid][cAdmin] >= 4)
  1441. {
  1442. new grana;
  1443. if(sscanf(params, "dd", id, grana)) return SendClientMessage(playerid, -1, "USO: /dargrana [id] [quantia]");
  1444. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1445. GivePlayerMoney(id, grana);
  1446. format(msg, sizeof(msg), "Você deu $%d a %s", grana, Name(id));
  1447. SendClientMessage(playerid, -1, msg);
  1448. format(msg, sizeof(msg), "%s deu $%d a %s", Name(playerid), grana, Name(id));
  1449. }
  1450. return 1;
  1451. }
  1452. //----------------------------------Helper----------------------------------
  1453. if(strcmp(cmd, "/ah", true) == 0)
  1454. {
  1455. if(PlayerInfo[playerid][cAdmin] == 0) return SendClientMessage(playerid, -1, "Você não é admin");
  1456. if(PlayerInfo[playerid][cAdmin] >= 1)
  1457. {
  1458. SendClientMessage(playerid, LARANJA, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[Comandos-Helper]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  1459. SendClientMessage(playerid, -1, "Lvl 1: /ir /trazer /par /h /forceskin /ejetar /ricos /c");
  1460. }
  1461. if(PlayerInfo[playerid][cAdmin] >= 2)
  1462. {
  1463. SendClientMessage(playerid, -1, "Lvl 2: /av /setskin /reparar /tv /tvoff /kick");
  1464. }
  1465. if(PlayerInfo[playerid][cAdmin] >= 3)
  1466. {
  1467. SendClientMessage(playerid, -1, "Lvl 3: /tapa /congelar /descongelar /subir /descer /status");
  1468. }
  1469. if(PlayerInfo[playerid][cAdmin] >= 4)
  1470. {
  1471. SendClientMessage(playerid, -1, "Lvl 4: /salvepos /irpos /darhelper");
  1472. }
  1473. return 1;
  1474. }
  1475. if(strcmp(cmd, "/c", true) == 0)
  1476. {
  1477. if(PlayerInfo[playerid][cAdmin] >= 1)
  1478. {
  1479. new msg2[100];
  1480. if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
  1481. for(new i = 0; i < MAX_PLAYERS; i++)
  1482. {
  1483. if(PlayerInfo[i][cAdmin] > 0)
  1484. {
  1485. format(msg, sizeof(msg), "{0000BB}|CHAT| Admin %s diz: %s", Name(playerid), msg2);
  1486. SendClientMessage(i, -1, msg);
  1487. }
  1488. }
  1489. return 1;
  1490. }
  1491. if(PlayerInfo[playerid][cHelper] >= 1)
  1492. {
  1493. new msg2[100];
  1494. if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
  1495. for(new i = 0; i < MAX_PLAYERS; i++)
  1496. {
  1497. if(PlayerInfo[i][cHelper] > 0)
  1498. {
  1499. format(msg, sizeof(msg), "{0000BB}|CHAT| Helper %s diz: %s", Name(playerid), msg2);
  1500. SendClientMessage(i, -1, msg);
  1501. }
  1502. }
  1503. return 1;
  1504. }
  1505. return 1;
  1506. }
  1507. if(strcmp(cmd, "/h", true) == 0)
  1508. {
  1509. if(PlayerInfo[playerid][cHelper] >= 1)
  1510. {
  1511. new msg2[100];
  1512. if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
  1513. for(new i = 0; i < MAX_PLAYERS; i++)
  1514. {
  1515. if(PlayerInfo[i][cHelper] > 0)
  1516. {
  1517. format(msg, sizeof(msg), "{0000BB}|CHAT HELPER| %s diz: %s", Name(playerid), msg2);
  1518. SendClientMessage(i, -1, msg);
  1519. }
  1520. }
  1521. }
  1522. return 1;
  1523. }
  1524. if(strcmp(cmd, "/helpers", true) == 0)
  1525. {
  1526. SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-=Helpers Online:=-=-=-=-=-=-=-=-");
  1527. for(new i = 0; i < MAX_PLAYERS; i++)
  1528. {
  1529. if(IsPlayerConnected(i))
  1530. {
  1531. if(PlayerInfo[i][cHelper] > 0)
  1532. {
  1533. format(msg, sizeof(msg), "Helper: %s | Level: %d", Name(i), PlayerInfo[i][cHelper]);
  1534. SendClientMessage(playerid, LARANJA, msg);
  1535. }
  1536. }
  1537. }
  1538. return 1;
  1539. }
  1540. if(strcmp(cmd, "/darhelper", true) == 0)
  1541. {
  1542. if(PlayerInfo[playerid][cAdmin] == 5 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][cHelper] == 4)
  1543. {
  1544. new lvl;
  1545. if(sscanf(params, "dd", id, lvl)) return SendClientMessage(playerid, -1, "USO: /darhelper [id] [level]");
  1546. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
  1547. if(lvl < 0 || lvl > 4) return SendClientMessage(playerid, -1, "O level de helper não pode ser menor que 0 ou maior que 4");
  1548. PlayerInfo[id][cHelper] = lvl;
  1549. format(msg, sizeof(msg), "Você setou o level de Helper de %s para %d", Name(id), lvl);
  1550. SendClientMessage(playerid, -1, msg);
  1551. format(msg, sizeof(msg), "%s setou seu level de Helper para %d", Name(playerid), lvl);
  1552. SendClientMessage(id, -1, msg);
  1553. format(msg, sizeof(msg), "%s setou o level de Helper de %s para %d", Name(playerid), Name(id), lvl);
  1554. return 1;
  1555. }
  1556. else return SendClientMessage(playerid, -1, "Você precisa ser Admin lvl 5, estar logado na rcon ou ser Helper lvl 4");
  1557. }
  1558.  
  1559. return SendClientMessage(playerid,0x8080FFAA ,"Comando Invalido - {FF0000}/AJUDA {FF69B4} - {FFFFFF}Para objer os Comandos do Servidor!");
  1560. }
  1561.  
  1562. public OnPlayerStateChange(playerid, newstate, oldstate)
  1563. {
  1564. if(newstate == PLAYER_STATE_DRIVER)
  1565. {
  1566. new vehicleid = GetPlayerVehicleID(playerid);
  1567. if(vehicleid == carroadm)
  1568. {
  1569. if(PlayerInfo[playerid][cAdmin] == 0)
  1570. {
  1571. RemovePlayerFromVehicle(playerid);
  1572. SendClientMessage(playerid, LARANJA, "Você não é Admin, por isso não pode usar o carro!");
  1573. return 1;
  1574. }
  1575. }
  1576. return 1;
  1577. }
  1578. return 1;
  1579. }
  1580.  
  1581.  
  1582. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1583. {
  1584. VeiculoOcupado[vehicleid] = true;
  1585. return 1;
  1586. }
  1587.  
  1588. public OnPlayerExitVehicle(playerid, vehicleid)
  1589. {
  1590. VeiculoOcupado[vehicleid] = false;
  1591. return 1;
  1592. }
  1593.  
  1594. public OnVehicleSpawn(vehicleid)
  1595. {
  1596. if(vehicleid == carroadm)
  1597. {
  1598. DestroyVehicle(carroadm);
  1599. }
  1600. return 1;
  1601. }
  1602.  
  1603. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1604. {
  1605. if(dialogid == REGISTRO)
  1606. {
  1607. if(response)
  1608. {
  1609. if(!strlen(inputtext))
  1610. {
  1611. new Nome[MAX_PLAYER_NAME];
  1612. GetPlayerName(playerid, Nome, sizeof(Nome));
  1613. new String[100];
  1614. format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Não Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
  1615. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  1616. SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha válida");
  1617. return 1;
  1618. }
  1619. new Nome[MAX_PLAYER_NAME];
  1620. GetPlayerName(playerid, Nome, sizeof(Nome));
  1621. new String[100];
  1622. format(String, sizeof(String), CONTAS, Nome);
  1623. dini_Create(String);
  1624. dini_Set(String,"Senha",inputtext);
  1625. dini_IntSet(String,"Dinheiro",0);
  1626. dini_IntSet(String,"Vida", 100);
  1627. dini_IntSet(String,"Colete", 100);
  1628. dini_IntSet(String,"Matou",0);
  1629. dini_IntSet(String,"Morreu",0);
  1630. dini_IntSet(String,"Logou",0);
  1631. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", "{1E90FF}Pronto você se registrou agora digite Sua Senha Para Logar-Se", "Logar", "Cancelar");
  1632. return 1;
  1633. }
  1634. else
  1635. {
  1636. SendClientMessage(playerid, 0x9900FFAA, "Você Foi Kickado Porque Não Quis Se Registrar!!");
  1637. Kick(playerid);
  1638. return 1;
  1639. }
  1640. }
  1641. if(dialogid == LOGIN)
  1642. {
  1643. if(response)
  1644. {
  1645. if(!strlen(inputtext))
  1646. {
  1647. new Nome[MAX_PLAYER_NAME];
  1648. GetPlayerName(playerid, Nome, sizeof(Nome));
  1649. new String[100];
  1650. format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
  1651. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  1652. SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
  1653. return 1;
  1654. }
  1655. new Nome[MAX_PLAYER_NAME];
  1656. GetPlayerName(playerid, Nome, sizeof(Nome));
  1657. new String[100];
  1658. format(String, sizeof(String), CONTAS, Nome);
  1659. if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
  1660. {
  1661. SetarPlayer(playerid);
  1662. SendClientMessage(playerid,0x9900FFAA,"Você Foi Logado Com Sucesso!!!");
  1663. god[playerid] = 0;
  1664. p[playerid][0] = 0;
  1665. p[playerid][1] = 0;
  1666. p[playerid][2] = 0;
  1667. return 1;
  1668. }
  1669. else
  1670. {
  1671. SendClientMessage(playerid,0x9900FFAA,"Senha incorreta digite-a novamente");
  1672. format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
  1673. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  1674. }
  1675. return 1;
  1676. }
  1677. else
  1678. {
  1679. SendClientMessage(playerid, 0x9900FFAA, "Você não quis se logar, por este motivo será Kickado");
  1680. Kick(playerid);
  1681. return 1;
  1682. }
  1683. }
  1684.  
  1685.  
  1686. return 1;
  1687. }
  1688.  
  1689. forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
  1690. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
  1691. {
  1692. new Float:sangue, Float:vida;
  1693. if(god[playerid] == 0)
  1694. {
  1695. god[playerid]++;
  1696. GetPlayerHealth(playerid, vida);
  1697. sangue = vida;
  1698. }
  1699. else if(god[playerid] > 0)
  1700. {
  1701. if(sangue == GetPlayerHealth(playerid, vida))
  1702. {
  1703. new msg[128];
  1704. SendClientMessage(playerid, -1, "Você foi kickado por suspeita de xiter!");
  1705. format(msg, sizeof(msg), "%s foi kickado automaticamente por suspeita de xiter", Name(playerid));
  1706. SendClientMessageToAll(-1, msg);
  1707. Kick(playerid);
  1708. }
  1709. else
  1710. {
  1711. god[playerid] --;
  1712. }
  1713. }
  1714. if(weaponid == 35 || weaponid == 36 || weaponid == 37 || weaponid == 38)
  1715. {
  1716. if(PlayerInfo[playerid][cAdmin] < 2)
  1717. {
  1718. new msg[128];
  1719. format(msg, sizeof(msg), "%s foi kickado automaticamente por usar arma proibida de id %d", Name(issuerid), weaponid);
  1720. SendClientMessageToAll(VERDE, msg);
  1721. }
  1722. }
  1723. return 1;
  1724. }
  1725.  
  1726. forward AtualizarScore();
  1727. public AtualizarScore()
  1728. {
  1729. for(new x = 0, y = GetMaxPlayers(); x != y; x++)
  1730. {
  1731. if(!IsPlayerConnected(x)) continue;
  1732. new STR[26];
  1733. format(STR, 26, "~r~Voce Matou: ~w~%d", GetPlayerScore(x));
  1734. TextDrawShowForPlayer(x, ScoreTextDraw[x]);
  1735. TextDrawSetString(ScoreTextDraw[x], STR);
  1736. }
  1737. return true;
  1738. }
  1739.  
  1740.  
  1741. forward Atualizartempo();
  1742. public Atualizartempo()
  1743. {
  1744. gettime(HoraRoYal, MinutosRoYal);
  1745. format(StringRoYalTempo,32,"%02d:%02d",HoraRoYal,MinutosRoYal);
  1746. TextDrawSetString(TempoRoYal,StringRoYalTempo);
  1747.  
  1748. SetWorldTime(HoraRoYal);
  1749.  
  1750. new x=0;
  1751. while(x!=MAX_PLAYERS) {
  1752. if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
  1753. SetPlayerTime(x,HoraRoYal,MinutosRoYal);
  1754. }
  1755. x++;
  1756. }
  1757. }
  1758.  
  1759. Status(playerid)
  1760. {
  1761. new Nome[MAX_PLAYER_NAME];
  1762. GetPlayerName(playerid, Nome, sizeof(Nome));
  1763. new String[70];
  1764. SendClientMessage(playerid, 0xFF0000AA, "=========================================");
  1765. format(String, sizeof(String),"Minhas Informações : %s", Nome);
  1766. SendClientMessage(playerid, 0xFFFF00AA,String);
  1767. format(String, sizeof(String),"Dinheiro: %d", GetPlayerMoney(playerid));
  1768. SendClientMessage(playerid, 0x1E90FFAA,String);
  1769. format(String, sizeof(String),"Matou: %d", Matou[playerid]);
  1770. SendClientMessage(playerid, 0x1E90FFAA,String);
  1771. format(String, sizeof(String),"Morreu: %d", Morreu[playerid]);
  1772. SendClientMessage(playerid, 0x1E90FFAA,String);
  1773. format(String, sizeof(String),"Medalhas: %d", medalhas[playerid]);
  1774. SendClientMessage(playerid, 0x1E90FFAA,String);
  1775. format(String, sizeof(String),"Level %d de Admin", PlayerInfo[playerid][cAdmin]);
  1776. SendClientMessage(playerid, 0x1E90FFAA,String);
  1777. format(String, sizeof(String),"Level %d de Helper", PlayerInfo[playerid][cHelper]);
  1778. SendClientMessage(playerid, 0x1E90FFAA,String);
  1779. SendClientMessage(playerid, 0xFF0000AA, "=========================================");
  1780. return 1;
  1781. }
  1782.  
  1783. SalvarPlayer(playerid)
  1784. {
  1785. new Float:Vida;
  1786. new Float:Colete;
  1787. GetPlayerHealth(playerid, Vida);
  1788. GetPlayerArmour(playerid, Colete);
  1789. new Nome[MAX_PLAYER_NAME];
  1790. GetPlayerName(playerid, Nome, sizeof(Nome));
  1791. new String[50];
  1792. format(String, sizeof(String), CONTAS, Nome);
  1793. dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
  1794. dini_FloatSet(String,"Vida", Vida);
  1795. dini_FloatSet(String,"Colete", Colete);
  1796. dini_IntSet(String,"Matou", Matou[playerid]);
  1797. dini_IntSet(String,"Morreu", Morreu[playerid]);
  1798. dini_IntSet(String,"Admin", PlayerInfo[playerid][cAdmin]);
  1799. dini_IntSet(String,"Helper", PlayerInfo[playerid][cHelper]);
  1800. dini_IntSet(String,"Medalhas", medalhas[playerid]);
  1801. return 1;
  1802. }
  1803.  
  1804. SetarPlayer(playerid)
  1805. {
  1806. new Nome[MAX_PLAYER_NAME];
  1807. GetPlayerName(playerid, Nome, sizeof(Nome));
  1808. new String[50];
  1809. format(String, sizeof(String), CONTAS, Nome);
  1810. GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
  1811. SetPlayerHealth(playerid, dini_Int(String,"Vida"));
  1812. SetPlayerArmour(playerid, dini_Int(String,"Colete"));
  1813. Matou[playerid] = dini_Int(String, "Matou");
  1814. Morreu[playerid] = dini_Int(String, "Morreu");
  1815. PlayerInfo[playerid][cAdmin] = dini_Int(String, "Admin");
  1816. PlayerInfo[playerid][cHelper] = dini_Int(String, "Helper");
  1817. medalhas[playerid] = dini_Int(String, "Medalhas");
  1818. return 1;
  1819. }
  1820.  
  1821. Name(playerid)
  1822. {
  1823. new nome[MAX_PLAYER_NAME];
  1824. GetPlayerName(playerid, nome, sizeof(nome));
  1825. return nome;
  1826. }
  1827.  
  1828. stock Rank(v[], size)
  1829. {
  1830. new t = 0;
  1831. for(new i = 1, j = (size); i != j; ++i)
  1832. {
  1833. for(new q = 0; (q != size - i); ++q)
  1834. t = ((v[i] > v[q]) ? (t = v[i], v[i] = v[q], v[q] = t) : (0));
  1835. }
  1836. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement