Advertisement
Guest User

Untitled

a guest
Oct 8th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.71 KB | None | 0 0
  1. #include <a_samp>
  2. #include <Dini>
  3. #pragma tabsize 0
  4. new Org[MAX_PLAYERS];
  5. #define NONE_CAR 9999
  6. #define BRANCO 0xFFFFFFAA
  7. #define VERMELHO 0xE31919AA
  8. #define AZUL 0x2641FEAA
  9. #define VERDE 0x007700AA
  10. #define AMARELO 0xF6F600AA
  11. #define ROSA 0xD900D3F6
  12. #define COR_ADA 0x8B8682AA
  13. #define COR_PCC 0x7CFC00AA
  14. #define COR_TCP 0x4A708BAA
  15. #define COR_POLICIA 0x4169E1AA
  16. #define COR_ADMCMD 0xFF6347AA
  17. #define COR_ADMIN 0x33CCFFAA
  18. #define COR_HELPER 0x98FB98AA
  19. #define REGISTRO 1
  20. #define LOGIN 2
  21. #define SERVERNAME "Guerra do Tráfico"
  22. //Gangues
  23. #define CIVIL 0
  24. #define PM 1
  25. #define BOPE 2
  26. #define AZTECAS 3
  27. #define GROOVE 4
  28. #define VAGOS 5
  29. #define BALLAS 6
  30. #define CV 7
  31. #define PCC 8
  32. #define ADA 9
  33. #define TCP 10
  34. #define ADVOGADO 1
  35. #define DETETIVE 2
  36. #define MECANICO 3
  37. #define CONTAS "Players/%s.ini"
  38. //pickups
  39. new EntradaPrefeitura;
  40. forward EnviarMensagem();
  41. new gz1,gz2,gz3,gz4;
  42. new MensagemRandomica[7][128] =
  43. {
  44. "[SERVER]: PRECISA DE AJUDA? USE /RELATORIO E FALE COM UM ADMINISTRADOR!",
  45. "[SERVER]: QUER FALAR APENAS PARA OS MEMBROS DE SUA ORG? FALE NO (/R)ADIO",
  46. "[SERVER]: EMBORA O OBJETIVO SEJA MATAR, É PROIBIDO DB, PRÁTICA SUJEITA A KICK",
  47. "[SERVER]: A EQUIPE GUERRA DO TRÁFICO AGRADECE A SUA PREFERENCIA!",
  48. "[SERVER]: DIVULGUE O SERVIDOR E FAÇA PARTE DO NOSSO CRESCIMENTO!",
  49. "[SERVER]: AS AREAS VERMELHAS NO MAPA SÃO OS PRINCIPAIS PONTOS DA CIDADE",
  50. "[SERVER]: ESTEJA LIGADO NAS ÁREAS VERMELHAS, É LÁ ONDE OCORREM OS PRINCIPAIS CONFRONTOS!"
  51. };
  52. new CoresRandomicas [] =
  53. {
  54. 0xFF5A00FF, //Laranja
  55. 0xF50000FF, //Vermelho
  56. 0xF50000FF, //Ciano
  57. 0x91FF00FF, //Verde Limão
  58. 0xFF0091FF, //Rosa
  59. 0x009000FF, //Verde
  60. 0x9600FFFF
  61. };
  62. static i_ServerSeconds;
  63. static i_ServerMinutes;
  64. static i_ServerHours;
  65. static i_ServerDays;
  66. static i_ServerMonths;
  67. static i_ServerYears;
  68.  
  69. new Text:txtTimeDisp;
  70. new Text:txtDateDisp;
  71.  
  72. forward ProcessGameTime();
  73. public ProcessGameTime()
  74. {
  75. new string[128];
  76. gettime(i_ServerHours, i_ServerMinutes, i_ServerSeconds);
  77. getdate(i_ServerYears, i_ServerMonths, i_ServerDays);
  78. format(string, sizeof string, "%02d:%02d:%02d", i_ServerHours, i_ServerMinutes, i_ServerSeconds);
  79. TextDrawSetString(txtTimeDisp, string);
  80. format(string, sizeof string, "%02d/%02d/%04d", i_ServerDays, i_ServerMonths, i_ServerYears);
  81. TextDrawSetString(txtDateDisp, string);
  82. SetWorldTime(i_ServerHours);
  83. for(new i = 0; i < MAX_PLAYERS; i++){SetPlayerTime(i, i_ServerHours, i_ServerMinutes);}
  84. }
  85. new Admin[MAX_PLAYERS];
  86. new Matou[MAX_PLAYERS];
  87. new Morreu[MAX_PLAYERS];
  88. new Logou[MAX_PLAYERS];
  89. forward MSGAdmin(color, string[]);
  90. public MSGAdmin(color, string[])
  91. {
  92. for(new i = 0; i < MAX_PLAYERS; i++)
  93. {
  94. if(Admin[i] >= 1)
  95. {
  96. SendClientMessage(i, color, string);
  97. }
  98. }
  99. }
  100. forward MSGAdminDono(color, string[]);
  101. public MSGAdminDono(color, string[])
  102. {
  103. for(new i = 0; i < MAX_PLAYERS; i++)
  104. {
  105. if(Admin[i] >= 4)
  106. {
  107. SendClientMessage(i, color, string);
  108. }
  109. }
  110. }
  111. forward MSGRadio(membro, color, string[]);
  112. public MSGRadio(membro, color, string[])
  113. {
  114. for(new i = 0; i < MAX_PLAYERS; i++)
  115. {
  116. if(Org[i] == membro)
  117. {
  118. SendClientMessage(i, color, string);
  119. }
  120. }
  121. }
  122. forward MSGGoverno(color, string[]);
  123. public MSGGoverno(color, string[])
  124. {
  125. for(new i = 0; i < MAX_PLAYERS; i++)
  126. {
  127. if(Org[i] == 1 || Org[i] == 2)
  128. {
  129. SendClientMessage(i, color, string);
  130. }
  131. }
  132. }
  133. //Fim das Gangues
  134. stock pNome(playerid)
  135. {
  136. new nome[MAX_PLAYER_NAME];
  137. GetPlayerName(playerid, nome, sizeof(nome));
  138. return nome;
  139. }
  140. enum Info
  141. {
  142. pVip,
  143. pWarns
  144. };
  145. new Text:Server;
  146. new PlayerInfo[MAX_PLAYERS][Info];
  147. forward IsACopCar(carid);
  148. forward IsAAztecaCar(carid);
  149. forward IsAGrooveCar(carid);
  150. //forward IsAVagosCar(carid);
  151. forward IsABallasCar(carid);
  152. forward IsACVCar(carid);
  153. //forward IsAPCCCar(carid);
  154. //forward IsAADACar(carid);
  155. //forward IsATCPCar(carid);
  156. //============== PUBLICS DOS VEICULOS
  157. public IsACopCar(carid)
  158. {
  159. if(carid >= 1 && carid <= 52)
  160. {
  161. return 1;
  162. }
  163. return 0;
  164. }
  165. public IsAAztecaCar(carid)
  166. {
  167. if(carid >= 53 && carid <= 63)
  168. {
  169. return 1;
  170. }
  171. return 0;
  172. }
  173. public IsAGrooveCar(carid)
  174. {
  175. if(carid >= 64 && carid <= 74)
  176. {
  177. return 1;
  178. }
  179. return 0;
  180. }
  181. public IsABallasCar(carid)
  182. {
  183. if(carid >= 75 && carid <= 85)
  184. {
  185. return 1;
  186. }
  187. return 0;
  188. }
  189. public IsACVCar(carid)
  190. {
  191. if(carid >= 86 && carid <= 96)
  192. {
  193. return 1;
  194. }
  195. return 0;
  196. }
  197. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  198. {
  199. if(IsACopCar(vehicleid))
  200. {
  201. if(Org[playerid] == PM || Org[playerid] == BOPE || ispassenger) { }
  202. else
  203. {
  204. new Float:x,Float:y,Float:z,Float:angle;
  205. GetPlayerPos(playerid,x,y,z);
  206. GetPlayerFacingAngle(playerid,angle);
  207. SetPlayerPos(playerid,x,y,z+0.3);
  208. SetPlayerFacingAngle(playerid,angle);
  209. SendClientMessage(playerid,COR_POLICIA,"Você não é Policial!");
  210. }
  211. }
  212. else if(IsAAztecaCar(vehicleid))
  213. {
  214. if(Org[playerid] == AZTECAS || ispassenger) { }
  215. else
  216. {
  217. new Float:x,Float:y,Float:z,Float:angle;
  218. GetPlayerPos(playerid,x,y,z);
  219. GetPlayerFacingAngle(playerid,angle);
  220. SetPlayerPos(playerid,x,y,z+0.3);
  221. SetPlayerFacingAngle(playerid,angle);
  222. SendClientMessage(playerid,AZUL,"Você não é dos Los Aztecas!");
  223. }
  224. }
  225. else if(IsAGrooveCar(vehicleid))
  226. {
  227. if(Org[playerid] == GROOVE || ispassenger) { }
  228. else
  229. {
  230. new Float:x,Float:y,Float:z,Float:angle;
  231. GetPlayerPos(playerid,x,y,z);
  232. GetPlayerFacingAngle(playerid,angle);
  233. SetPlayerPos(playerid,x,y,z+0.3);
  234. SetPlayerFacingAngle(playerid,angle);
  235. SendClientMessage(playerid,VERDE,"Você não é da Groove Street!");
  236. }
  237. }
  238. else if(IsABallasCar(vehicleid))
  239. {
  240. if(Org[playerid] == BALLAS || ispassenger) { }
  241. else
  242. {
  243. new Float:x,Float:y,Float:z,Float:angle;
  244. GetPlayerPos(playerid,x,y,z);
  245. GetPlayerFacingAngle(playerid,angle);
  246. SetPlayerPos(playerid,x,y,z+0.3);
  247. SetPlayerFacingAngle(playerid,angle);
  248. SendClientMessage(playerid,ROSA,"Você não é dos Ballas!");
  249. }
  250. }
  251. else if(IsACVCar(vehicleid))
  252. {
  253. if(Org[playerid] == CV || ispassenger) { }
  254. else
  255. {
  256. new Float:x,Float:y,Float:z,Float:angle;
  257. GetPlayerPos(playerid,x,y,z);
  258. GetPlayerFacingAngle(playerid,angle);
  259. SetPlayerPos(playerid,x,y,z+0.3);
  260. SetPlayerFacingAngle(playerid,angle);
  261. SendClientMessage(playerid,VERMELHO,"Você não é do Comando Vermelho!");
  262. }
  263. }
  264. return 1;
  265. }
  266. public OnPlayerRequestClass(playerid, classid)
  267. {
  268. if(classid == 0)
  269. {
  270. Org[playerid] = CIVIL;
  271. GameTextForPlayer(playerid,"~w~CIVIL",5000,6);
  272. }
  273. else if(classid == 1)
  274. {
  275. Org[playerid] = PM;
  276. GameTextForPlayer(playerid,"~b~POLICIA MILITAR",5000,6);
  277. }
  278. else if(classid == 2)
  279. {
  280. Org[playerid] = PM;
  281. GameTextForPlayer(playerid,"~b~POLICIA MILITAR",5000,6);
  282. }
  283. else if(classid == 3)
  284. {
  285. Org[playerid] = PM;
  286. GameTextForPlayer(playerid,"~b~POLICIA MILITAR",5000,6);
  287. }
  288. else if(classid == 4)
  289. {
  290. Org[playerid] = BOPE;
  291. GameTextForPlayer(playerid,"~b~BOPE",5000,6);
  292. }
  293. else if(classid == 5)
  294. {
  295. Org[playerid] = AZTECAS;
  296. GameTextForPlayer(playerid,"~b~LOS AZTECAS",5000,6);
  297. }
  298. else if(classid == 6)
  299. {
  300. Org[playerid] = AZTECAS;
  301. GameTextForPlayer(playerid,"~b~LOS AZTECAS",5000,6);
  302. }
  303. else if(classid == 7)
  304. {
  305. Org[playerid] = AZTECAS;
  306. GameTextForPlayer(playerid,"~b~LOS AZTECAS",5000,6);
  307. }
  308. else if(classid == 8)
  309. {
  310. Org[playerid] = GROOVE;
  311. GameTextForPlayer(playerid,"~g~GROOVE STREET",5000,6);
  312. }
  313. else if(classid == 9)
  314. {
  315. Org[playerid] = GROOVE;
  316. GameTextForPlayer(playerid,"~g~GROOVE STREET",5000,6);
  317. }
  318. else if(classid == 10)
  319. {
  320. Org[playerid] = GROOVE;
  321. GameTextForPlayer(playerid,"~g~GROOVE STREET",5000,6);
  322. }
  323. else if(classid == 11)
  324. {
  325. Org[playerid] = VAGOS;
  326. GameTextForPlayer(playerid,"~y~LOS VAGOS",5000,6);
  327. }
  328. else if(classid == 12)
  329. {
  330. Org[playerid] = VAGOS;
  331. GameTextForPlayer(playerid,"~y~LOS VAGOS",5000,6);
  332. }
  333. else if(classid == 13)
  334. {
  335. Org[playerid] = VAGOS;
  336. GameTextForPlayer(playerid,"~y~LOS VAGOS",5000,6);
  337. }
  338. else if(classid == 14)
  339. {
  340. Org[playerid] = BALLAS;
  341. GameTextForPlayer(playerid,"~p~BALLAS",5000,6);
  342. }
  343. else if(classid == 15)
  344. {
  345. Org[playerid] = BALLAS;
  346. GameTextForPlayer(playerid,"~p~BALLAS",5000,6);
  347. }
  348. else if(classid == 16)
  349. {
  350. Org[playerid] = BALLAS;
  351. GameTextForPlayer(playerid,"~r~BALLAS",5000,6);
  352. }
  353. else if(classid == 17)
  354. {
  355. Org[playerid] = CV;
  356. GameTextForPlayer(playerid,"~r~COMANDO VERMELHO",5000,6);
  357. }
  358. else if(classid == 18)
  359. {
  360. Org[playerid] = CV;
  361. GameTextForPlayer(playerid,"~r~COMANDO VERMELHO",5000,6);
  362. }
  363. else if(classid == 19)
  364. {
  365. Org[playerid] = PCC;
  366. GameTextForPlayer(playerid,"~g~PRIMEIRO COMANDO DA CAPITAL",5000,6);
  367. }
  368. else if(classid == 20)
  369. {
  370. Org[playerid] = PCC;
  371. GameTextForPlayer(playerid,"~g~PRIMEIRO COMANDO DA CAPITAL",5000,6);
  372. }
  373. else if(classid == 21)
  374. {
  375. Org[playerid] = ADA;
  376. GameTextForPlayer(playerid,"~w~AMIGOS DOS AMIGOS",5000,6);
  377. }
  378. else if(classid == 22)
  379. {
  380. Org[playerid] = ADA;
  381. GameTextForPlayer(playerid,"~w~AMIGOS DOS AMIGOS",5000,6);
  382. }
  383. else if(classid == 23)
  384. {
  385. Org[playerid] = TCP;
  386. GameTextForPlayer(playerid,"~b~TERCEIRO COMANDO PURO",5000,6);
  387. }
  388. else if(classid == 24)
  389. {
  390. Org[playerid] = TCP;
  391. GameTextForPlayer(playerid,"~b~TERCEIRO COMANDO PURO",5000,6);
  392. }
  393. SetPlayerPos(playerid,1025.5751,-2140.7637,39.2032);
  394. SetPlayerCameraPos(playerid,1019.7552,-2141.0266,37.7274);
  395. SetPlayerCameraLookAt(playerid,1021.9974,-2140.9907,38.3012);
  396. SetPlayerFacingAngle(playerid, 82.6125);
  397. ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
  398. return 1;
  399. }
  400. public OnPlayerRequestSpawn(playerid)
  401. {
  402. for(new i = 0; i < MAX_PLAYERS; i++)
  403. {
  404. ClearAnimations(i);
  405. }
  406. if(Org[playerid] == 0)
  407. {
  408. SetPlayerColor(playerid,BRANCO);
  409. SetPlayerHealth(playerid,100);
  410. }
  411. else if(Org[playerid] == 1)
  412. {
  413. SetPlayerColor(playerid,COR_POLICIA);
  414. SetPlayerHealth(playerid,100);
  415. }
  416. else if(Org[playerid] == 2)
  417. {
  418. SetPlayerColor(playerid,COR_POLICIA);
  419. SetPlayerHealth(playerid,100);
  420. }
  421. else if(Org[playerid] == 3)
  422. {
  423. SetPlayerColor(playerid,AZUL);
  424. SetPlayerHealth(playerid,100);
  425. }
  426. else if(Org[playerid] == 4)
  427. {
  428. SetPlayerColor(playerid,VERDE);
  429. SetPlayerHealth(playerid,100);
  430. }
  431. else if(Org[playerid] == 5)
  432. {
  433. SetPlayerColor(playerid,AMARELO);
  434. SetPlayerHealth(playerid,100);
  435. }
  436. else if(Org[playerid] == 6)
  437. {
  438. SetPlayerColor(playerid,ROSA);
  439. SetPlayerHealth(playerid,100);
  440. }
  441. else if(Org[playerid] == 7)
  442. {
  443. SetPlayerColor(playerid,VERMELHO);
  444. SetPlayerHealth(playerid,100);
  445. }
  446. else if(Org[playerid] == 8)
  447. {
  448. SetPlayerColor(playerid,COR_PCC);
  449. SetPlayerHealth(playerid,100);
  450. }
  451. else if(Org[playerid] == 9)
  452. {
  453. SetPlayerColor(playerid,COR_ADA);
  454. SetPlayerHealth(playerid,100);
  455. }
  456. else if(Org[playerid] == 10)
  457. {
  458. SetPlayerColor(playerid,COR_TCP);
  459. SetPlayerHealth(playerid,100);
  460. }
  461. return 1;
  462. }
  463. public OnGameModeExit()
  464. {
  465. TextDrawHideForAll(txtTimeDisp);
  466. TextDrawDestroy(txtTimeDisp);
  467. TextDrawHideForAll(txtDateDisp);
  468. TextDrawDestroy(txtDateDisp);
  469. TextDrawHideForAll(Server);
  470. TextDrawDestroy(Server);
  471. for(new i=0; i<MAX_PLAYERS; i++)
  472. {
  473. SalvarConta(i);
  474. }
  475. return 1;
  476. }
  477. public OnGameModeInit()
  478. {
  479. gz2 = GangZoneCreate(1079.159, -1575.273, 1375.78, -1148.917);
  480. gz1 = GangZoneCreate(1858.74,-1456.841,2067.896,-1129.178);
  481. gz3 = GangZoneCreate(200.7038, -1906.883, 1014.511, -1752.921);
  482. gz4 = GangZoneCreate(2721.984, -2285.866, 2896.915, -1681.862);
  483. SetTimer("EnviarMensagem",90000,true);
  484. txtTimeDisp = TextDrawCreate(632.0,25.0,"--:--:--");
  485. TextDrawUseBox(txtTimeDisp, 0);
  486. TextDrawFont(txtTimeDisp, 3);
  487. TextDrawSetShadow(txtTimeDisp,0);
  488. TextDrawSetOutline(txtTimeDisp,2);
  489. TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
  490. TextDrawColor(txtTimeDisp,VERDE);
  491. TextDrawAlignment(txtTimeDisp,3);
  492. TextDrawLetterSize(txtTimeDisp,0.5,1.6);
  493.  
  494. txtDateDisp = TextDrawCreate(620.0,5.0,"00/00/0000");
  495. TextDrawUseBox(txtDateDisp, 0);
  496. TextDrawFont(txtDateDisp, 3);
  497. TextDrawSetShadow(txtDateDisp,0);
  498. TextDrawSetOutline(txtDateDisp,2);
  499. TextDrawBackgroundColor(txtDateDisp,0x000000FF);
  500. TextDrawColor(txtDateDisp,VERDE);
  501. TextDrawAlignment(txtDateDisp,3);
  502. TextDrawLetterSize(txtDateDisp,0.7,1.7);
  503.  
  504. ProcessGameTime();
  505. SetTimer("ProcessGameTime", 1000, 1);
  506. //server
  507. Server= TextDrawCreate(1.0, 433.0, "~b~Los ~g~Santos ~r~Traffic ~y~War - ~w~Obrigado Por Jogar Aqui! ~r~Sua Presenca Faz o Nosso Crescimento!");
  508. TextDrawAlignment(Server,0);
  509. TextDrawBackgroundColor(Server,0x000000ff);
  510. TextDrawFont(Server,2);
  511. TextDrawLetterSize(Server,0.2999, 1.4);
  512. TextDrawBoxColor(Server,0x696969AA);
  513. TextDrawColor(Server,0xffffffff);
  514. TextDrawSetOutline(Server,1);
  515. TextDrawSetProportional(Server,1);
  516. TextDrawSetShadow(Server,1);
  517. for(new i; i < MAX_PLAYERS; i ++)
  518. {
  519. if(IsPlayerConnected(i))
  520. {
  521. TextDrawShowForPlayer(i, Server);
  522. }
  523. }
  524. ShowPlayerMarkers(1);
  525. //veiculos policia
  526. AddStaticVehicleEx(427,1595.3212,-1710.3961,5.6112,359.7906,0,1,60000); // Carro PM 1 [ 1 ]
  527. AddStaticVehicleEx(427,1591.4327,-1710.4241,5.6118,0.2051,0,1,60000); // Carro PM 2 [ 2 ]
  528. AddStaticVehicleEx(427,1587.3286,-1710.4690,5.6110,0.1416,0,1,60000); // Carro PM 3 [ 3 ]
  529. AddStaticVehicleEx(427,1583.4650,-1710.4186,5.6110,359.8493,0,1,60000); // Carro PM 4 [ 4 ]
  530. AddStaticVehicleEx(427,1578.6639,-1710.4069,5.6116,0.9422,0,1,60000); // Carro PM 5 [ 5 ]
  531. AddStaticVehicleEx(601,1574.3885,-1710.5515,5.6111,0.5474,0,1,60000); // Carro PM 6 [ 6 ]
  532. AddStaticVehicleEx(601,1570.3066,-1710.6121,5.6124,359.7127,0,1,60000); // Carro PM 7 [ 7 ]
  533. AddStaticVehicleEx(601,1564.0303,-1710.6862,5.6109,319.3410,0,1,60000); // Carro PM 8 [ 8 ]
  534. AddStaticVehicleEx(596,1558.8585,-1710.1777,5.6115,359.4310,0,1,60000); // Carro PM 9 [ 9 ]
  535. AddStaticVehicleEx(596,1544.9037,-1684.3752,5.6115,89.0990,0,1,60000); // Carro PM 10 [ 10 ]
  536. AddStaticVehicleEx(596,1545.0051,-1680.1718,5.6116,88.5028,0,1,60000); // Carro PM 11 [ 11 ]
  537. AddStaticVehicleEx(596,1545.0319,-1676.3513,5.6120,89.6320,0,1,60000); // Carro PM 12 [ 12 ]
  538. AddStaticVehicleEx(596,1545.0000,-1672.3497,5.6121,89.9195,0,1,60000); // Carro PM 13 [ 13 ]
  539. AddStaticVehicleEx(596,1545.0659,-1667.9012,5.6110,90.6359,0,1,60000); // Carro PM 14 [ 14 ]
  540. AddStaticVehicleEx(596,1545.0922,-1663.2059,5.6125,90.6188,0,1,60000); // Carro PM 15 [ 15 ]
  541. AddStaticVehicleEx(596,1545.1133,-1659.1013,5.6119,89.3168,0,1,60000); // Carro PM 16 [ 16 ]
  542. AddStaticVehicleEx(596,1545.1378,-1655.1281,5.6108,90.6954,0,1,60000); // Carro PM 17 [ 17 ]
  543. AddStaticVehicleEx(596,1545.2279,-1650.9863,5.6120,89.8482,0,1,60000); // Carro PM 18 [ 18 ]
  544. AddStaticVehicleEx(596,1530.5682,-1645.2727,5.6124,180.3221,0,1,60000); // Carro PM 19 [ 19 ]
  545. AddStaticVehicleEx(596,1601.2931,-1684.0496,5.6119,90.0883,0,1,60000); // Carro PM 20 [ 20 ]
  546. AddStaticVehicleEx(596,1601.2734,-1688.0236,5.6136,88.4274,0,1,60000); // Carro PM 21 [ 21 ]
  547. AddStaticVehicleEx(596,1601.1285,-1691.8971,5.6119,90.0262,0,1,60000); // Carro PM 22 [ 22 ]
  548. AddStaticVehicleEx(596,1601.2103,-1696.1312,5.6110,89.8409,0,1,60000); // Carro PM 23 [ 23 ]
  549. AddStaticVehicleEx(596,1585.3990,-1671.6134,5.6143,269.8638,0,1,60000); // Carro PM 24 [ 24 ]
  550. AddStaticVehicleEx(596,1585.4008,-1667.3893,5.6141,269.5397,0,1,60000); // Carro PM 25 [ 25 ]
  551. AddStaticVehicleEx(596,1560.6199,-1694.2374,5.6141,223.4730,0,1,60000); // Carro PM 26 [ 26 ]
  552. AddStaticVehicleEx(596,1601.2856,-1700.1526,5.6118,90.0113,0,1,60000); // Carro PM 27 [ 27 ]
  553. AddStaticVehicleEx(596,1601.3367,-1704.4319,5.6110,89.4350,0,1,60000); // Carro PM 28 [ 28 ]
  554. AddStaticVehicleEx(596,1553.7660,-1606.6392,13.1040,179.0925,0,1,60000); // Carro PM 29 [ 29 ]
  555. AddStaticVehicleEx(596,1557.1333,-1606.7168,13.1032,178.8592,0,1,60000); // Carro PM 30 [ 30 ]
  556. AddStaticVehicleEx(599,1560.4562,-1606.8030,13.1036,178.9202,0,1,60000); // Carro PM 31 [ 31 ]
  557. AddStaticVehicleEx(599,1563.8717,-1606.6914,13.1038,179.4326,0,1,60000); // Carro PM 32 [ 32 ]
  558. AddStaticVehicleEx(599,1567.3547,-1606.7321,13.1040,180.2489,0,1,60000); // Carro PM 33 [ 33 ]
  559. AddStaticVehicleEx(599,1570.8766,-1606.6274,13.1041,178.9961,0,1,60000); // Carro PM 34 [ 34 ]
  560. AddStaticVehicleEx(599,1574.6097,-1606.7114,13.1036,177.9048,0,1,60000); // Carro PM 35 [ 35 ]
  561. AddStaticVehicleEx(599,1577.8934,-1606.8094,13.1042,177.2975,0,1,60000); // Carro PM 36 [ 36 ]
  562. AddStaticVehicleEx(599,1581.3461,-1606.8341,13.1039,177.7676,0,1,60000); // Carro PM 37 [ 37 ]
  563. AddStaticVehicleEx(599,1584.7222,-1606.9253,13.1037,178.5022,0,1,60000); // Carro PM 38 [ 38 ]
  564. AddStaticVehicleEx(599,1603.8914,-1616.1952,13.2288,89.7498,0,1,60000); // Carro PM 39 [ 39 ]
  565. AddStaticVehicleEx(599,1603.6875,-1619.5703,13.2263,88.5466,0,1,60000); // Carro PM 40 [ 40 ]
  566. AddStaticVehicleEx(523,1603.7355,-1622.7402,13.0761,88.1086,0,1,60000); // Moto PM 1 [ 41 ]
  567. AddStaticVehicleEx(523,1603.9626,-1624.3147,13.0775,90.7598,0,1,60000); // Moto PM 2 [ 42 ]
  568. AddStaticVehicleEx(523,1603.9635,-1625.8510,13.0772,91.6688,0,1,60000); // Moto PM 3 [ 43 ]
  569. AddStaticVehicleEx(523,1604.0082,-1627.4473,13.0780,90.3992,0,1,60000); // Moto PM 4 [ 44 ]
  570. AddStaticVehicleEx(523,1572.8439,-1634.5190,13.1271,358.1002,0,1,60000); // Moto PM 5 [ 45 ]
  571. AddStaticVehicleEx(522,1571.2872,-1634.4946,13.1248,0.0766,0,1,60000); // Moto PM 6 [ 46 ]
  572. AddStaticVehicleEx(522,1569.8798,-1634.4691,13.1236,0.6737,0,1,60000); // Moto PM 7 [ 47 ]
  573. AddStaticVehicleEx(522,1568.2787,-1634.5309,13.1235,1.2726,0,1,60000); // Moto PM 8 [ 48 ]
  574. AddStaticVehicleEx(522,1566.7974,-1634.5743,13.1243,1.3427,0,1,60000); // Moto PM 9 [ 49 ]
  575. AddStaticVehicleEx(522,1565.1429,-1634.6414,13.1211,0.1210,0,1,60000); // Moto PM 10 [ 50 ]
  576. AddStaticVehicleEx(497,1552.1447,-1644.5111,28.5788,180.2065,0,1,60000); // heli 1 cop [ 51 ]
  577. AddStaticVehicleEx(497,1570.1406,-1645.1512,28.5779,175.1474,0,1,60000); // heli 2 cop [ 52 ]
  578. //veiculos aztecas
  579. AddStaticVehicleEx(411,1673.4362,-2110.0366,13.2519,270.6005,103,103,60000); // carro 1 aztecas [ 154 ]
  580. AddStaticVehicleEx(482,1661.6045,-2110.1614,13.2517,270.6003,103,103,60000); // carro 2 aztecas [ 155 ]
  581. AddStaticVehicleEx(560,1663.9532,-2116.4326,13.3836,270.5919,103,103,60000); // carro 3 aztecas [ 156 ]
  582. AddStaticVehicleEx(451,1673.5963,-2116.5295,13.2249,270.6003,103,103,60000); // carro 4 aztecas [ 157 ]
  583. AddStaticVehicleEx(565,1700.1049,-2099.6953,13.2533,179.9370,103,103,60000); // carro 5 aztecas [ 158 ]
  584. AddStaticVehicleEx(587,1696.4332,-2099.6931,13.2536,179.9369,103,103,60000); // carro 6 aztecas [ 159 ]
  585. AddStaticVehicleEx(429,1704.8361,-2125.7949,13.2521,1.3980,103,103,60000); // carro 7 aztecas [ 160 ]
  586. AddStaticVehicleEx(541,1680.1205,-2126.0894,13.2520,359.8218,103,103,60000); // carro 8 aztecas [ 161 ]
  587. AddStaticVehicleEx(522,1690.1974,-2100.5391,13.4042,178.5231,103,103,60000); // moto 1 aztecas [ 162 ]
  588. AddStaticVehicleEx(522,1686.7764,-2100.7271,13.4043,178.5232,103,103,60000); // moto 2 aztecas [ 163 ]
  589. AddStaticVehicleEx(487,1699.0925,-2084.2708,17.7637,180.0375,103,103,60000); // helli aztecas [ 164 ]
  590. //veiculos groove
  591. AddStaticVehicleEx(567,2470.4524,-1670.4611,13.0229,10.7682,252,252,60000); // CARRO GROOVE 1 [ 165 ]
  592. AddStaticVehicleEx(482,2473.0684,-1691.9166,13.2192,359.7195,252,252,60000); // CARRO GROOVE 2 [ 166 ]
  593. AddStaticVehicleEx(412,2489.3474,-1682.5742,13.0412,271.4998,252,252,60000); // CARRO GROOVE 3 [ 167 ]
  594. AddStaticVehicleEx(534,2497.4470,-1684.7703,13.1170,10.5016,252,252,60000); // CARRO GROOVE 4 [ 168 ]
  595. AddStaticVehicleEx(565,2505.7383,-1677.0964,13.0818,327.5858,252,252,60000); // CARRO GROOVE 5 [ 169 ]
  596. AddStaticVehicleEx(566,2509.7136,-1686.9553,13.2652,49.3267,252,252,60000); // CARRO GROOVE 6 [ 170 ]
  597. AddStaticVehicleEx(560,2516.8506,-1672.1951,13.6798,64.4007,252,252,60000); // CARRO GROOVE 7 [ 171 ]
  598. AddStaticVehicleEx(589,2498.1560,-1656.2767,13.0915,78.9987,252,252,60000); // CARRO GROOVE 8 [ 172 ]
  599. AddStaticVehicleEx(522,2507.5623,-1651.7622,13.2636,139.3953,252,252,60000); // moto 1 GROOVE [ 173 ]
  600. AddStaticVehicleEx(581,2505.9907,-1650.4805,13.2750,140.5256,252,252,60000); // moto 2 GROOVE [ 174 ]
  601. AddStaticVehicleEx(487,2526.8357,-1677.8053,20.1069,89.2377,252,252,60000); // HELI DA GROOVE 1 [ 175 ]
  602. //veiculos vagos
  603. //veiculos ballas
  604. AddStaticVehicleEx(522,2094.7686,-1277.8308,25.0555,178.5352,186,186,60000); // moto 1 ballas
  605. AddStaticVehicleEx(521,2097.8064,-1277.6141,25.0552,185.6461,186,186,60000); // moto 2 ballas
  606. AddStaticVehicleEx(560,2134.0078,-1305.4243,23.6059,92.3133,186,186,60000); // sultan ballas
  607. AddStaticVehicleEx(411,2119.5635,-1305.6592,23.6547,89.7586,186,186,60000); // infernus ballas
  608. AddStaticVehicleEx(402,2118.6045,-1296.4335,23.6954,89.4629,186,186,60000); // buffalo ballas
  609. AddStaticVehicleEx(541,2104.4944,-1296.0393,23.5136,96.8845,186,186,60000); // bullet ballas
  610. AddStaticVehicleEx(506,2102.5730,-1306.1554,23.6225,87.9131,186,186,60000); // super gt ballas
  611. AddStaticVehicleEx(451,2091.1567,-1296.1843,23.6252,89.9663,186,186,60000); // turismo ballas
  612. AddStaticVehicleEx(477,2090.7705,-1306.3295,23.6616,91.1813,186,186,60000); // zr ballas
  613. AddStaticVehicleEx(487,2087.6450,-1315.8245,24.1934,355.8695,186,186,60000); // heli ballas
  614. AddStaticVehicleEx(482,2133.9529,-1296.1392,23.9901,88.2869,186,186,60000); // burrito ballas
  615. //veiculos cv
  616. AddStaticVehicleEx(567,710.7937,-1437.4856,13.4088,359.0577,3,3,60000); // veiculo 1 Comando Vermelho [ 198 ]
  617. AddStaticVehicleEx(482,715.0620,-1437.5853,13.5315,358.6585,3,3,60000); // carro 2 os Comando Vermelho [ 199 ]
  618. AddStaticVehicleEx(412,719.0229,-1438.3528,13.3181,357.6283,3,3,60000); // carro 3 os Comando Vermelho [ 200 ]
  619. AddStaticVehicleEx(534,723.0405,-1438.1564,13.3131,0.3387,3,3,60000); // carro 4 os Comando Vermelho [ 201 ]
  620. AddStaticVehicleEx(565,727.9271,-1437.6682,13.1634,0.8232,3,3,60000); // flash cv
  621. AddStaticVehicleEx(566,730.9850,-1437.9932,13.3068,0.0783,3,3,60000); // carro 6 os Comando Vermelho [ 203 ]
  622. AddStaticVehicleEx(560,735.1754,-1437.8925,13.3244,357.5306,3,3,60000); // carro 7 os Comando Vermelho [ 204 ]
  623. AddStaticVehicleEx(589,739.4525,-1437.9091,13.3169,359.0135,3,3,60000); // carro 8 os Comando Vermelho [ 205 ]
  624. AddStaticVehicleEx(522,701.1478,-1439.8022,13.2080,353.0919,3,3,60000); // moto Comando Vermelho 1 [ 206 ]
  625. AddStaticVehicleEx(581,703.2151,-1440.0529,13.2082,353.0915,3,3,60000); // moto Comando Vermelho 2 [ 207 ]
  626. AddStaticVehicleEx(487,705.1614,-1450.8456,17.8717,357.9817,3,3,60000); // helli os Comando Vermelho [ 208 ]
  627. // ====================== Fim dos Carros ===========================
  628. //================ Skins ===============
  629. AddPlayerClass(23,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//civil
  630. AddPlayerClass(265,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//policia 0
  631. AddPlayerClass(266,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//policia1
  632. AddPlayerClass(267,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//policia2
  633. AddPlayerClass(285,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//bope3
  634. AddPlayerClass(114,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//aztecas4
  635. AddPlayerClass(115,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//aztecas5
  636. AddPlayerClass(116,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//aztecas6
  637. AddPlayerClass(269,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//grove7
  638. AddPlayerClass(270,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//grove8
  639. AddPlayerClass(271,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//grove9
  640. AddPlayerClass(108,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//vagos10
  641. AddPlayerClass(109,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//vagos11
  642. AddPlayerClass(110,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//vagos12
  643. AddPlayerClass(102,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ballas13
  644. AddPlayerClass(103,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ballas14
  645. AddPlayerClass(104,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ballas15
  646. AddPlayerClass(293,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//comando vermelho16
  647. AddPlayerClass(19,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//comando vermelho17
  648. AddPlayerClass(122,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//primeiro comando da capital18
  649. AddPlayerClass(124,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//primeiro comando da capital19
  650. AddPlayerClass(292,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ada20
  651. AddPlayerClass(291,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ada21
  652. AddPlayerClass(173,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//terceiro comando22
  653. AddPlayerClass(174,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//terceiro comando23
  654. //============ Fim das Skins =============
  655. //---------------- Text Labels ------------
  656. Create3DTextLabel("Prefeitura de Los Santos",AMARELO,1481.0006,-1771.8022,18.7958,10.0,0);
  657. //------------------------ pickups --------------
  658. EntradaPrefeitura = CreatePickup(1318,23,1481.0006,-1771.8022,18.7958,0);
  659. //-----------------------------------------------------------------------
  660. SendRconCommand("hostname Guerra do Tráfico [v1.0] ®");
  661. SetGameModeText("GT v1.0");
  662. SendRconCommand("mapname Los Santos");
  663. print("==========> TW <============");
  664. print("= Guerra do Tráfico Carregada =");
  665. print("= Criado Por Pedro Miranda =");
  666. return 1;
  667. }
  668. public OnPlayerPickUpPickup(playerid,pickupid)
  669. {
  670. if(pickupid == EntradaPrefeitura)
  671. {
  672. SetPlayerVirtualWorld(playerid,0);
  673. SetPlayerInterior(playerid, 3);
  674. GameTextForPlayer(playerid, "~b~Prefeitura de Los Santos", 5000, 1);
  675. SetPlayerPos(playerid,388.8977,173.7054,1008.3828);
  676. SetPlayerFacingAngle(playerid,81.7687);
  677. return 1;
  678. }
  679. return 1;
  680. }
  681. public OnPlayerDeath(playerid, killerid, reason)
  682. {
  683. if(GetPlayerState(killerid) == PLAYER_STATE_PASSENGER || GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  684. {
  685. new string[75];
  686. format(string,sizeof(string),"[ATENÇÃO]: %s [ID: %d] Cometeu DB Em %s e Deverá Ser Kickado!",pNome(killerid),killerid,pNome(playerid));
  687. SendClientMessageToAll(COR_ADMCMD,string);
  688. }
  689. TextDrawHideForPlayer(playerid,txtTimeDisp);
  690. TextDrawHideForPlayer(playerid,txtDateDisp);
  691. SendDeathMessage(killerid, playerid, reason);
  692. if(IsPlayerConnected(killerid))
  693. {
  694. Matou[killerid]+= 1;
  695. }
  696. Morreu[playerid]++;
  697. GivePlayerMoney(killerid,GetPlayerMoney(killerid)+5000);
  698. GivePlayerMoney(playerid,GetPlayerMoney(playerid)-5000);
  699. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  700. SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
  701. return 1;
  702. }
  703. public OnPlayerConnect(playerid)
  704. {
  705. new string[256];
  706. if(Admin[playerid] >= 4)
  707. {
  708. new ip[20];
  709. GetPlayerIp(playerid,ip,sizeof(ip));
  710. format(string,sizeof(string),"%s Está Logando no Servidor - IP: %s",pNome(playerid),ip);
  711. MSGAdminDono(BRANCO,string);
  712. }
  713. TextDrawShowForPlayer(playerid, Server);
  714. if(strcmp(pNome(playerid),"Pedro_Miranda",true) == 0)
  715. {
  716. Admin[playerid] = 5;
  717. }
  718. new Nome[MAX_PLAYER_NAME];
  719. GetPlayerName(playerid, Nome, sizeof(Nome));
  720. new String[100];
  721. format(String, sizeof(String), CONTAS, Nome);
  722. if(!dini_Exists(String))
  723. {
  724. format(String, sizeof(String), "Nick: {e31919}%s\n{ffffff}Conta:{e31919}Não Registrada\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
  725. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  726. }
  727. else
  728. {
  729. format(String, sizeof(String), "Nick: {e31919}%s\n{ffffff}Conta:{e31919}Registrada\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
  730. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Cancelar");
  731. }
  732. GameTextForPlayer(playerid,"~b~Los ~g~Santos ~r~Traffic ~y~War",5000,1);
  733. SendDeathMessage(playerid, INVALID_PLAYER_ID, 200);
  734. SetPlayerScore(playerid,0);
  735. if(Admin[playerid] >= 1)
  736. {
  737. new AdminName[MAX_PLAYER_NAME];
  738. GetPlayerName(playerid, AdminName, sizeof(AdminName));
  739. format(string, sizeof(string), "~p~%s: ~g~ON", AdminName);
  740. for(new i=0; i<MAX_PLAYERS; i++)
  741. {
  742. GameTextForPlayer(i, string , 5000, 4);
  743. }
  744. }
  745. Org[playerid] = CIVIL;
  746. return 1;
  747. }
  748. public OnPlayerDisconnect(playerid)
  749. {
  750. SalvarConta(playerid);
  751. new string[45];
  752. if(Admin[playerid] >= 1)
  753. {
  754. new stringa[256];
  755. new AdminName[MAX_PLAYER_NAME];
  756. GetPlayerName(playerid, AdminName, sizeof(AdminName));
  757. format(stringa, sizeof(stringa), "~p~%s: ~r~OFF", AdminName);
  758. for(new i=0; i<MAX_PLAYERS; i++)
  759. {
  760. GameTextForPlayer(i, stringa , 5000, 4);
  761. }
  762. }
  763. format(string,sizeof(string),"%s Deixou o Servidor!",pNome(playerid));
  764. SendClientMessageToAll(BRANCO,string);
  765. Org[playerid] = CIVIL;
  766. return 1;
  767. }
  768. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  769. {
  770. if(dialogid == REGISTRO)
  771. {
  772. if(response)
  773. {
  774. if(!strlen(inputtext))
  775. {
  776. new Nome[MAX_PLAYER_NAME];
  777. GetPlayerName(playerid, Nome, sizeof(Nome));
  778. new String[100];
  779. format(String, sizeof(String), "{FFFFFF}Nick: {e31919}%s{ffffff}\n{ffffff}Conta: {e31919}Não Registrado\n{FFFFFF} Digite Uma Senha Para Prosseguir", Nome);
  780. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  781. SendClientMessage(playerid,0x1E90FFAA,"Senha Inválida, Favor Digitar Uma Senha Válida!");
  782. return 1;
  783. }
  784. new Nome[MAX_PLAYER_NAME];
  785. GetPlayerName(playerid, Nome, sizeof(Nome));
  786. new String[100];
  787. format(String, sizeof(String), CONTAS, Nome);
  788. dini_Create(String);
  789. dini_Set(String,"Senha",inputtext);
  790. dini_IntSet(String,"Dinheiro",0);
  791. dini_IntSet(String,"Vida", 100);
  792. dini_IntSet(String,"Colete", 100);
  793. dini_IntSet(String,"Matou",0);
  794. dini_IntSet(String,"Morreu",0);
  795. dini_IntSet(String,"Logou",0);
  796. dini_IntSet(String,"Admin",0);
  797. dini_IntSet(String,"VIP",0);
  798. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login","{FFFFFF}Registrado Com Sucesso.\nDigite Sua Senha Para Logar", "Logar", "Cancelar");
  799. GivePlayerMoney(playerid, 500000);
  800. SendClientMessage(playerid, BRANCO, "Você recebeu R$500.000 por se registrar no servidor");
  801. return 1;
  802. }
  803. else
  804. {
  805. SendClientMessage(playerid, 0xFF0000AA, "[SERVER]: Kickado Por Não se Registrar!");
  806. Kick(playerid);
  807. return 1;
  808. }
  809. }
  810. if(dialogid == LOGIN)
  811. {
  812. if(response)
  813. {
  814. if(!strlen(inputtext))
  815. {
  816. new Nome[MAX_PLAYER_NAME];
  817. GetPlayerName(playerid, Nome, sizeof(Nome));
  818. new String[100];
  819. format(String, sizeof(String), "{FFFFFF}Nick:{e31919}%s{ffffff}\n{ffffff}Conta: {e31919}Registrada\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
  820. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  821. SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
  822. return 1;
  823. }
  824. new Nome[MAX_PLAYER_NAME];
  825. GetPlayerName(playerid, Nome, sizeof(Nome));
  826. new String[100];
  827. format(String, sizeof(String), CONTAS, Nome);
  828. if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
  829. {
  830. EditarPlayer(playerid);
  831. Logou[playerid]++;
  832. SendClientMessage(playerid,0x00FF00AA,"[SERVER]: Logado com Sucesso, Escolha sua Organização!");
  833. return 1;
  834. }
  835. else
  836. {
  837. SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
  838. format(String, sizeof(String), "{FFFFFF}Nick: {e31919}%s{ffffff}\n{ffffff}Conta: {e31919}Registrada\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
  839. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  840. }
  841. return 1;
  842. }
  843. else
  844. {
  845. SendClientMessage(playerid, 0xFF0000AA, "Kickado por não Logar!");
  846. Kick(playerid);
  847. return 1;
  848. }
  849. }
  850. if(dialogid == 4)
  851. {
  852. if(response)
  853. {
  854. if(listitem == 0)
  855. {
  856. ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Comandos Moderador","/Ir\n/TV\n/Kick","OK","");
  857. return 1;
  858. }
  859. if(listitem == 1)
  860. {
  861. ShowPlayerDialog(playerid,6,DIALOG_STYLE_MSGBOX,"Comandos Administrador","/Ban\nCongelar\n/Descongelar\nGMX","OK","");
  862. return 1;
  863. }
  864. if(listitem == 2)
  865. {
  866. ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"Comandos Responsável Pela Administração","/DarAdmin","OK","");
  867. return 1;
  868. }
  869. if(listitem == 3)
  870. {
  871. ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Comandos de Sub Dono","Comandos a Serem Criados","OK","");
  872. return 1;
  873. }
  874. if(listitem == 4)
  875. {
  876. ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"Comandos de Admin Dono","Comandos a Serem Criados","OK","");
  877. return 1;
  878. }
  879. }
  880. }
  881. return 1;
  882. }
  883. public OnPlayerSpawn(playerid)
  884. {
  885. GangZoneShowForPlayer(playerid, gz1, VERMELHO);
  886. GangZoneShowForPlayer(playerid, gz2, VERMELHO);
  887. GangZoneShowForPlayer(playerid, gz3, VERMELHO);
  888. GangZoneShowForPlayer(playerid, gz4, VERMELHO);
  889. TextDrawShowForPlayer(playerid,txtTimeDisp);
  890. TextDrawShowForPlayer(playerid,txtDateDisp);
  891. if(Org[playerid] == CIVIL)
  892. {
  893. SetPlayerInterior(playerid, 0);
  894. SetPlayerPos(playerid, 1177.9160,-1323.2394,14.0943);
  895. SetPlayerFacingAngle(playerid, 277.1077);
  896. SetPlayerVirtualWorld(playerid,0);
  897. return 1;
  898. }
  899. if(Org[playerid] == PM)
  900. {
  901. SetPlayerInterior(playerid, 0);
  902. SetPlayerPos(playerid,1530.7992,-1669.0005,6.2188);
  903. SetPlayerFacingAngle(playerid,272.3188);
  904. SetPlayerVirtualWorld(playerid,0);
  905. Equipar(playerid);
  906. return 1;
  907. }
  908. if(Org[playerid] == BOPE)
  909. {
  910. SetPlayerInterior(playerid, 0);
  911. SetPlayerPos(playerid,1530.7992,-1669.0005,6.2188);
  912. SetPlayerFacingAngle(playerid,272.3188);
  913. SetPlayerVirtualWorld(playerid,0);
  914. Equipar(playerid);
  915. return 1;
  916. }
  917. if(Org[playerid] == AZTECAS)
  918. {
  919. SetPlayerInterior(playerid, 0);
  920. SetPlayerPos(playerid,1677.8491,-2120.1113,13.5469);
  921. SetPlayerFacingAngle(playerid,316.1795);
  922. SetPlayerVirtualWorld(playerid,0);
  923. Equipar(playerid);
  924. return 1;
  925. }
  926. if(Org[playerid] == GROOVE)
  927. {
  928. SetPlayerInterior(playerid, 0);
  929. SetPlayerPos(playerid,2495.3799,-1689.3333,14.3655);
  930. SetPlayerFacingAngle(playerid,1.6557);
  931. SetPlayerVirtualWorld(playerid,0);
  932. Equipar(playerid);
  933. return 1;
  934. }
  935. if(Org[playerid] == VAGOS)
  936. {
  937. SetPlayerInterior(playerid, 0);
  938. SetPlayerPos(playerid,2352.1926,-1167.3896,27.6619);
  939. SetPlayerFacingAngle(playerid,354.3465);
  940. SetPlayerVirtualWorld(playerid,0);
  941. Equipar(playerid);
  942. return 1;
  943. }
  944. if(Org[playerid] == BALLAS)
  945. {
  946. SetPlayerInterior(playerid, 0);
  947. SetPlayerPos(playerid,2091.3286,-1281.4681,25.5034);
  948. SetPlayerFacingAngle(playerid,182.9264);
  949. SetPlayerVirtualWorld(playerid,0);
  950. Equipar(playerid);
  951. return 1;
  952. }
  953. if(Org[playerid] == CV)
  954. {
  955. SetPlayerInterior(playerid, 0);
  956. SetPlayerPos(playerid,725.2991,-1437.0159,13.5318);
  957. SetPlayerFacingAngle(playerid,1.5702);
  958. SetPlayerVirtualWorld(playerid,0);
  959. Equipar(playerid);
  960. return 1;
  961. }
  962. if(Org[playerid] == PCC)
  963. {
  964. SetPlayerInterior(playerid, 0);
  965. SetPlayerPos(playerid,1242.5991,-1694.9318,16.1959);
  966. SetPlayerFacingAngle(playerid,183.6818);
  967. SetPlayerVirtualWorld(playerid,0);
  968. Equipar(playerid);
  969. return 1;
  970. }
  971. if(Org[playerid] == ADA)
  972. {
  973. SetPlayerInterior(playerid, 0);
  974. SetPlayerPos(playerid,1242.5991,-1694.9318,16.1959);
  975. SetPlayerFacingAngle(playerid,183.6818);
  976. SetPlayerVirtualWorld(playerid,0);
  977. Equipar(playerid);
  978. return 1;
  979. }
  980. if(Org[playerid] == TCP)
  981. {
  982. SetPlayerInterior(playerid, 0);
  983. SetPlayerPos(playerid,1242.5991,-1694.9318,16.1959);
  984. SetPlayerFacingAngle(playerid,183.6818);
  985. SetPlayerVirtualWorld(playerid,0);
  986. Equipar(playerid);
  987. return 1;
  988. }
  989. return 1;
  990. }
  991. stock Equipar(playerid)
  992. {
  993. GivePlayerWeapon(playerid,1,1);
  994. GivePlayerWeapon(playerid,4,1);
  995. GivePlayerWeapon(playerid,24,9999);
  996. GivePlayerWeapon(playerid,25,9999);
  997. GivePlayerWeapon(playerid,29,9999);
  998. GivePlayerWeapon(playerid,31,9999);
  999. SendClientMessage(playerid,GetPlayerColor(playerid),"Você foi equipado!");
  1000. return 1;
  1001. }
  1002. stock SetAdminSkin(playerid)
  1003. {
  1004. SetPlayerSkin(playerid, 217);
  1005. return 1;
  1006. }
  1007. public OnPlayerCommandText(playerid, cmdtext[])
  1008. {
  1009. new string[256];
  1010. new cmd[256];
  1011. new tmp[256];
  1012. new idx;
  1013. cmd = strtok(cmdtext,idx);
  1014. if(strcmp(cmd,"/bombapedro",true) == 0)
  1015. {
  1016. new Float:x,Float:y,Float:z;
  1017. GetPlayerPos(playerid,Float:x,Float:y,Float:z);
  1018. CreateExplosion(Float:x,Float:y,Float:z,7,9999);
  1019. return 1;
  1020. }
  1021. if(strcmp(cmd,"/creditos",true) == 0)
  1022. {
  1023. SendClientMessage(playerid,BRANCO,"==> Game Mode Inteiramente Criado Por: {E31919}Pedro Miranda{FFFFFF}.");
  1024. return 1;
  1025. }
  1026. if(strcmp(cmd,"/admins",true) == 0)
  1027. {
  1028. new adminnome[MAX_PLAYER_NAME];
  1029. SendClientMessage(playerid,VERDE,"===> Administradores Online <===");
  1030. for(new i= 0; i < MAX_PLAYERS; i++)
  1031. {
  1032. GetPlayerName(i,adminnome,sizeof(adminnome));
  1033. if(Admin[i] == 1)
  1034. {
  1035. format(string,sizeof(string),"=> %s [Moderador]",adminnome);
  1036. SendClientMessage(playerid,VERDE,string);
  1037. }
  1038. if(Admin[i] == 2)
  1039. {
  1040. format(string,sizeof(string),"=> %s [Administrador]",adminnome);
  1041. SendClientMessage(playerid,VERDE,string);
  1042. }
  1043. if(Admin[i] == 3)
  1044. {
  1045. format(string,sizeof(string),"=> %s [Responsável pela Administração]",adminnome);
  1046. SendClientMessage(playerid,VERDE,string);
  1047. }
  1048. if(Admin[i] == 4)
  1049. {
  1050. format(string,sizeof(string),"=> %s [Sub-Dono]",adminnome);
  1051. SendClientMessage(playerid,VERDE,string);
  1052. }
  1053. if(Admin[i] == 5)
  1054. {
  1055. format(string,sizeof(string),"=> %s [Dono/Scripter/Mapper]",adminnome);
  1056. SendClientMessage(playerid,VERDE,string);
  1057. }
  1058. }
  1059. return 1;
  1060. }
  1061. if(strcmp(cmd,"/r",true) == 0 || strcmp(cmd,"/ga",true) == 0)
  1062. {
  1063. new length = strlen(cmdtext);
  1064. while ((idx < length) && (cmdtext[idx] <= ' '))
  1065. {
  1066. idx++;
  1067. }
  1068. new offset = idx;
  1069. new result[256];
  1070. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1071. {
  1072. result[idx - offset] = cmdtext[idx];
  1073. idx++;
  1074. }
  1075. if(!strlen(result))
  1076. {
  1077. if(Org[playerid] == 1 || Org[playerid] == 2)
  1078. {
  1079. SendClientMessage(playerid,COR_POLICIA,"Use (/r)ádio [Texto]");
  1080. }
  1081. if(Org[playerid] == 3)
  1082. {
  1083. SendClientMessage(playerid,AZUL,"Use (/ga)ngue [Texto]");
  1084. }
  1085. if(Org[playerid] == 4)
  1086. {
  1087. SendClientMessage(playerid,VERDE,"Use (/ga)ngue [Texto]");
  1088. }
  1089. if(Org[playerid] == 5)
  1090. {
  1091. SendClientMessage(playerid,AMARELO,"Use (/ga)ngue [Texto]");
  1092. }
  1093. if(Org[playerid] == 6)
  1094. {
  1095. SendClientMessage(playerid,ROSA,"Use (/ga)ngue [Texto]");
  1096. }
  1097. if(Org[playerid] == 7)
  1098. {
  1099. SendClientMessage(playerid,VERMELHO,"Use (/ga)ngue [Texto]");
  1100. }
  1101. if(Org[playerid] == 8)
  1102. {
  1103. SendClientMessage(playerid,COR_PCC,"Use (/ga)ngue [Texto]");
  1104. }
  1105. if(Org[playerid] == 9)
  1106. {
  1107. SendClientMessage(playerid,COR_ADA,"Use (/ga)ngue [Texto]");
  1108. }
  1109. if(Org[playerid] == 10)
  1110. {
  1111. SendClientMessage(playerid,COR_TCP,"Use (/ga)ngue [Texto]");
  1112. }
  1113. return 1;
  1114. }
  1115. if(Org[playerid] == 1)
  1116. {
  1117. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1118. MSGRadio(PM,COR_POLICIA,string);
  1119. return 1;
  1120. }
  1121. if(Org[playerid] == 2)
  1122. {
  1123. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1124. MSGRadio(BOPE,COR_POLICIA,string);
  1125. return 1;
  1126. }
  1127. if(Org[playerid] == 3)
  1128. {
  1129. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1130. MSGRadio(AZTECAS,AZUL,string);
  1131. return 1;
  1132. }
  1133. if(Org[playerid] == 4)
  1134. {
  1135. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1136. MSGRadio(GROOVE,VERDE,string);
  1137. return 1;
  1138. }
  1139. if(Org[playerid] == 5)
  1140. {
  1141. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1142. MSGRadio(VAGOS,AMARELO,string);
  1143. return 1;
  1144. }
  1145. if(Org[playerid] == 6)
  1146. {
  1147. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1148. MSGRadio(BALLAS,ROSA,string);
  1149. return 1;
  1150. }
  1151. if(Org[playerid] == 7)
  1152. {
  1153. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1154. MSGRadio(CV,VERMELHO,string);
  1155. return 1;
  1156. }
  1157. if(Org[playerid] == 8)
  1158. {
  1159. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1160. MSGRadio(PCC,COR_PCC,string);
  1161. return 1;
  1162. }
  1163. if(Org[playerid] == 9)
  1164. {
  1165. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1166. MSGRadio(ADA,COR_ADA,string);
  1167. return 1;
  1168. }
  1169. if(Org[playerid] == 10)
  1170. {
  1171. format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
  1172. MSGRadio(TCP,COR_TCP,string);
  1173. return 1;
  1174. }
  1175. return 1;
  1176. }
  1177. if(strcmp(cmd,"/departamento",true) == 0 || strcmp(cmd,"/d",true) == 0)
  1178. if(Org[playerid] == 1 || Org[playerid] == 2)
  1179. {
  1180. new length = strlen(cmdtext);
  1181. while ((idx < length) && (cmdtext[idx] <= ' '))
  1182. {
  1183. idx++;
  1184. }
  1185. new offset = idx;
  1186. new result[256];
  1187. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1188. {
  1189. result[idx - offset] = cmdtext[idx];
  1190. idx++;
  1191. }
  1192. if(!strlen(result))
  1193. {
  1194. SendClientMessage(playerid,BRANCO,"Use (/D)epartamento [Texto]");
  1195. return 1;
  1196. }
  1197. if(Org[playerid] == 1)
  1198. {
  1199. format(string,sizeof(string),"[POLICIA MILITAR]%s: %s",pNome(playerid),result);
  1200. MSGGoverno(COR_ADMCMD,string);
  1201. return 1;
  1202. }
  1203. if(Org[playerid] == 2)
  1204. {
  1205. format(string,sizeof(string),"[BOPE]%s: %s",pNome(playerid),result);
  1206. MSGGoverno(COR_ADMCMD,string);
  1207. return 1;
  1208. }
  1209. }
  1210. if(strcmp(cmd,"/duvida",true) == 0)
  1211. {
  1212. new length = strlen(cmdtext);
  1213. while ((idx < length) && (cmdtext[idx] <= ' '))
  1214. {
  1215. idx++;
  1216. }
  1217. new offset = idx;
  1218. new result[256];
  1219. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1220. {
  1221. result[idx - offset] = cmdtext[idx];
  1222. idx++;
  1223. }
  1224. if(!strlen(result))
  1225. {
  1226. SendClientMessage(playerid,BRANCO,"Use /Duvida [Texto]");
  1227. return 1;
  1228. }
  1229. SendClientMessage(playerid,VERDE,"Sua Dúvida Foi Enviado aos Admins, Aguarde Uma Resposta!");
  1230. format(string,sizeof(string),"[Dúvida]: %s [ID: %d] - %s",pNome(playerid),playerid,result);
  1231. MSGAdmin(VERDE,string);
  1232. return 1;
  1233. }
  1234. if(strcmp(cmd,"/pagar",true) == 0)
  1235. {
  1236. tmp = strtok(cmdtext,idx);
  1237. if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /Pagar [ID/Nome][Quantia]");
  1238. new pago = strval(tmp);
  1239. new pagoname[MAX_PLAYER_NAME];
  1240. GetPlayerName(pago,pagoname,sizeof(pagoname));
  1241. tmp = strtok(cmdtext,idx);
  1242. if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /Pagar [ID/Nome][Quantia]");
  1243. new quantia = strval(tmp);
  1244. if(quantia > GetPlayerMoney(playerid)) return SendClientMessage(playerid,BRANCO,"Você não tem essa grana!");
  1245. format(string,sizeof(string),"Você pagou R$ %d para %s",quantia,pagoname);
  1246. SendClientMessage(playerid,AMARELO,string);
  1247. format(string,sizeof(string),"Você recebeu R$ %d de %s",quantia,pNome(playerid));
  1248. SendClientMessage(pago,AMARELO,string);
  1249. GivePlayerMoney(pago,quantia);
  1250. return 1;
  1251. }
  1252. if(strcmp(cmd,"/relatorio",true) == 0)
  1253. {
  1254. new length = strlen(cmdtext);
  1255. while ((idx < length) && (cmdtext[idx] <= ' '))
  1256. {
  1257. idx++;
  1258. }
  1259. new offset = idx;
  1260. new result[256];
  1261. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1262. {
  1263. result[idx - offset] = cmdtext[idx];
  1264. idx++;
  1265. }
  1266. if(!strlen(result))
  1267. {
  1268. SendClientMessage(playerid,BRANCO,"Use /Relatorio [Texto]");
  1269. return 1;
  1270. }
  1271. SendClientMessage(playerid,AMARELO,"Seu Relatório Foi Enviado aos Admins, Aguarde Uma Resposta!");
  1272. format(string,sizeof(string),"[Relatório]: %s [ID: %d] - %s",pNome(playerid),playerid,result);
  1273. MSGAdmin(COR_ADMCMD,string);
  1274. return 1;
  1275. }
  1276. if(strcmp(cmd,"/mp",true) == 0)
  1277. {
  1278. tmp = strtok(cmdtext, idx);
  1279. if(!strlen(tmp))
  1280. {
  1281. SendClientMessage(playerid,BRANCO,"Use /MP [ID/Nome][Texto]");
  1282. return 1;
  1283. }
  1284. new mpado = strval(tmp);
  1285. new mpadoname[MAX_PLAYER_NAME];
  1286. GetPlayerName(mpado,mpadoname,sizeof(mpadoname));
  1287. new length = strlen(cmdtext);
  1288. while ((idx < length) && (cmdtext[idx] <= ' '))
  1289. {
  1290. idx++;
  1291. }
  1292. new offset = idx;
  1293. new result[256];
  1294. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1295. {
  1296. result[idx - offset] = cmdtext[idx];
  1297. idx++;
  1298. }
  1299. if(!strlen(result))
  1300. {
  1301. SendClientMessage(playerid,BRANCO,"Use /MP [ID/Nome][Texto]");
  1302. return 1;
  1303. }
  1304. format(string,sizeof(string),"[MP]: %s: %s",pNome(playerid),result);
  1305. SendClientMessage(mpado,AMARELO,string);
  1306. format(string,sizeof(string),"MP Enviada Com Sucesso Para %s!",mpadoname);
  1307. SendClientMessage(playerid,AMARELO,string);
  1308. return 1;
  1309. }
  1310. if(strcmp(cmd,"/horas",true) == 0)
  1311. {
  1312. new hora,minuto,segundo;
  1313. gettime(hora,minuto,segundo);
  1314. format(string,sizeof(string),"Agora São %d:%d:%d",hora,minuto,segundo);
  1315. GameTextForPlayer(playerid, string, 5000, 1);
  1316. return 1;
  1317. }
  1318. if(strcmp(cmd,"/ajudaadmin",true) == 0 || strcmp(cmd,"/aa",true) == 0)
  1319. if(Admin[playerid] >= 1)
  1320. {
  1321. ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Menu de Ajuda ao Administrador","Moderador\nAdministrador\nResponsável pela Administração\nSub Dono\nDono/Scripter/Mapper","Fechar","");
  1322. return 1;
  1323. }
  1324. if(strcmp(cmd, "/gmx", true) == 0)
  1325. if(Admin[playerid] >= 3)
  1326. {
  1327. if(IsPlayerConnected(playerid))
  1328. {
  1329. if (Admin[playerid] >= 2)
  1330. {
  1331. format(string,sizeof(string),"~r~%s~w~ Reiniciou o ~g~Guerra do Tráfico!",pNome(playerid));
  1332. GameTextForAll(string,5000,0);
  1333. for(new i = 0; i < MAX_PLAYERS; i++)
  1334. {
  1335. Org[i] = CIVIL;
  1336. SalvarConta(i);
  1337. }
  1338. GameModeExit();
  1339. }
  1340. else
  1341. {
  1342. SendClientMessage(playerid, BRANCO, "Você não está autorizado a usar este comando !");
  1343. }
  1344. }
  1345. return 1;
  1346. }
  1347. if(strcmp(cmd,"/ir",true) == 0)//testar
  1348. if(Admin[playerid] >= 1)
  1349. {
  1350. tmp = strtok(cmdtext,idx);
  1351. if(!strlen(tmp))
  1352. {
  1353. SendClientMessage(playerid,BRANCO,"Use /Ir [ID]");
  1354. return 1;
  1355. }
  1356. new ido = strval(tmp);
  1357. new idoname[MAX_PLAYER_NAME];
  1358. GetPlayerName(ido,idoname,sizeof(idoname));
  1359. new Float:x,Float:y,Float:z,Float:angle;
  1360. GetPlayerPos(ido,x,y,z);
  1361. new playerint = GetPlayerInterior(ido);
  1362. GetPlayerFacingAngle(ido,angle);
  1363. SetPlayerPos(playerid,x,y+0.5,z);
  1364. SetPlayerFacingAngle(playerid,angle);
  1365. SetPlayerInterior(playerid,playerint);
  1366. format(string,sizeof(string),"O Admin %s Foi Até %s.",pNome(playerid),idoname);
  1367. MSGAdmin(AMARELO,string);
  1368. format(string,sizeof(string),"O Admin %s Veio Até Você.",pNome(playerid));
  1369. SendClientMessage(ido,BRANCO,string);
  1370. return 1;
  1371. }
  1372. if(strcmp(cmd,"/trazer",true) == 0)
  1373. if(Admin[playerid] >= 2)
  1374. {
  1375. tmp = strtok(cmdtext,idx);
  1376. if(!strlen(tmp))
  1377. {
  1378. SendClientMessage(playerid,BRANCO,"Use /Trazer [ID]");
  1379. return 1;
  1380. }
  1381. new trago = strval(tmp);
  1382. new tragoname[MAX_PLAYER_NAME];
  1383. GetPlayerName(trago,tragoname,sizeof(tragoname));
  1384. new Float:x,Float:y,Float:z,Float:angle;
  1385. new interioradmin = GetPlayerInterior(playerid);
  1386. GetPlayerPos(playerid,x,y,z);
  1387. GetPlayerFacingAngle(playerid,angle);
  1388. SetPlayerPos(trago,x,y,z);
  1389. SetPlayerFacingAngle(trago,angle);
  1390. SetPlayerInterior(trago,interioradmin);
  1391. format(string,sizeof(string),"O Admin %s Trouxe %s Até Ele.",pNome(playerid),tragoname);
  1392. MSGAdmin(AMARELO,string);
  1393. format(string,sizeof(string),"O Admin %s Trouxe Você Até Ele.",pNome(playerid));
  1394. SendClientMessage(trago,BRANCO,string);
  1395. return 1;
  1396. }
  1397. if(strcmp(cmd,"/alertar",true) == 0)
  1398. if(Admin[playerid] >= 3)
  1399. {
  1400. tmp = strtok(cmdtext, idx);
  1401. new avisado = strval(tmp);
  1402. if(!strlen(tmp))
  1403. {
  1404. SendClientMessage(playerid,BRANCO,"Use /Alertar [ID][Motivo]");
  1405. return 1;
  1406. }
  1407. new length = strlen(cmdtext);
  1408. while ((idx < length) && (cmdtext[idx] <= ' '))
  1409. {
  1410. idx++;
  1411. }
  1412. new offset = idx;
  1413. new result[256];
  1414. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1415. {
  1416. result[idx - offset] = cmdtext[idx];
  1417. idx++;
  1418. }
  1419. if(!strlen(result))
  1420. {
  1421. SendClientMessage(playerid,BRANCO,"Use /Alertar [ID][Motivo]");
  1422. return 1;
  1423. }
  1424. if(strcmp(pNome(avisado),"Pedro_Miranda",true) == 0)
  1425. {
  1426. new warn[MAX_PLAYER_NAME];
  1427. GetPlayerName(avisado,warn,sizeof(warn));
  1428. format(string,sizeof(string),"[OWNED]: %s Foi Alertado Por Tentar Alertar %s",pNome(playerid),warn);
  1429. SendClientMessageToAll(VERMELHO,string);
  1430. PlayerInfo[playerid][pWarns] += 1;
  1431. return 1;
  1432. }
  1433. new Nome[MAX_PLAYER_NAME];
  1434. GetPlayerName(avisado,Nome,sizeof(Nome));
  1435. format(string,sizeof(string),"[ADM CMD]: %s Foi Avisado Pelo Admin %s, Motivo: %s, 3 Alertas = Ban",Nome,pNome(playerid),result);
  1436. SendClientMessageToAll(COR_ADMCMD,string);
  1437. PlayerInfo[avisado][pWarns] += 1;
  1438. if(PlayerInfo[avisado][pWarns] >= 3)
  1439. {
  1440. new name[MAX_PLAYER_NAME];
  1441. GetPlayerName(avisado,name,sizeof(name));
  1442. Ban(avisado);
  1443. format(string,sizeof(string),"%s Foi Banido Por Receber 3 Alertas!",name);
  1444. SendClientMessageToAll(COR_ADMCMD,string);
  1445. return 1;
  1446. }
  1447. return 1;
  1448. }
  1449. if(strcmp(cmd,"/ban",true) == 0)
  1450. if(Admin[playerid] >= 2)
  1451. {
  1452. tmp = strtok(cmdtext, idx);
  1453. new banido = strval(tmp);
  1454. new length = strlen(cmdtext);
  1455. while ((idx < length) && (cmdtext[idx] <= ' '))
  1456. {
  1457. idx++;
  1458. }
  1459. new offset = idx;
  1460. new result[256];
  1461. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1462. {
  1463. result[idx - offset] = cmdtext[idx];
  1464. idx++;
  1465. }
  1466. if(!strlen(result))
  1467. {
  1468. SendClientMessage(playerid,BRANCO,"Use /Ban [ID][Motivo]");
  1469. return 1;
  1470. }
  1471. if(strcmp(pNome(banido),"Pedro_Miranda",true) == 0)// Anti Ban
  1472. {
  1473. new ban[MAX_PLAYER_NAME];
  1474. GetPlayerName(banido,ban,sizeof(ban));
  1475. format(string,sizeof(string),"[OWNED]: %s Foi Banido Por Tentar Banir %s",pNome(playerid),ban);
  1476. SendClientMessageToAll(COR_ADMCMD,string);
  1477. Ban(playerid);
  1478. return 1;
  1479. }
  1480. new Nome[MAX_PLAYER_NAME];
  1481. GetPlayerName(banido,Nome,sizeof(Nome));
  1482. SendClientMessage(banido,VERMELHO,"Banido do Servidor!Para Revisão de Ban Visite o Fórum!");
  1483. format(string,sizeof(string),"[ADM CMD]: %s Foi Banido Pelo Admin %s, Motivo: %s",Nome,pNome(playerid),result);
  1484. SendClientMessageToAll(COR_ADMCMD,string);
  1485. Ban(banido);
  1486. return 1;
  1487. }
  1488. if(strcmp(cmd,"/meuadm",true) == 0)
  1489. {
  1490. format(string,sizeof(string),"Você é administrador nível: %d",Admin[playerid]);
  1491. SendClientMessage(playerid,BRANCO,string);
  1492. return 1;
  1493. }
  1494. if(strcmp(cmd,"/daradmin",true) == 0)
  1495. if(Admin[playerid] >= 3 || strcmp(pNome(playerid),"Pedro_Miranda",true) == 0)
  1496. {
  1497. new novoadm = strval(tmp);
  1498. tmp = strtok(cmdtext, idx);
  1499. if(!strlen(tmp))
  1500. {
  1501. SendClientMessage(playerid,BRANCO,"Use /DarAdmin [ID][Nível]");
  1502. return 1;
  1503. }
  1504. new tmp2[48];
  1505. tmp2 = strtok(cmdtext, idx);
  1506. new admlevel = strval(tmp2);
  1507. if(!strlen(tmp2))
  1508. {
  1509. SendClientMessage(playerid,BRANCO,"Use /DarAdmin [ID][Nível]");
  1510. return 1;
  1511. }
  1512. new nome[MAX_PLAYER_NAME];
  1513. GetPlayerName(novoadm,nome,sizeof(nome));
  1514. format(string,sizeof(string),"Você Promoveu %s Para Nível %d de Admin",nome,admlevel);
  1515. SendClientMessage(playerid,VERDE,string);
  1516. format(string,sizeof(string),"Você Foi Promovido Para o Nível %d de Admin Por %s",admlevel,pNome(playerid));
  1517. SendClientMessage(novoadm, VERDE,string);
  1518. Admin[novoadm] = admlevel;
  1519. return 1;
  1520. }
  1521. if(strcmp(cmd,"/explodir",true) == 0)
  1522. if(Admin[playerid] >= 1)
  1523. {
  1524. tmp = strtok(cmdtext, idx);
  1525. if(!strlen(tmp))
  1526. {
  1527. SendClientMessage(playerid,BRANCO,"Use /Explodir [ID]");
  1528. return 1;
  1529. }
  1530. new explodido = strval(tmp);
  1531. new explodidoname[MAX_PLAYER_NAME];
  1532. GetPlayerName(explodido,explodidoname,sizeof(explodidoname));
  1533. new Float:x,Float:y,Float:z;
  1534. GetPlayerPos(explodido,x,y,z);
  1535. format(string,sizeof(string),"[ADM CMD]: %s Foi Explodido Pelo Admin %s.",explodidoname,pNome(playerid));
  1536. SendClientMessageToAll(COR_ADMCMD,string);
  1537. CreateExplosion(x,y,z,7,100);
  1538. return 1;
  1539. }
  1540. if(strcmp(cmd,"/tapa",true) == 0)
  1541. if(Admin[playerid] >= 1)
  1542. {
  1543. tmp = strtok(cmdtext,idx);
  1544. if(!strlen(tmp))
  1545. {
  1546. SendClientMessage(playerid,BRANCO,"Use /Tapa [ID]");
  1547. return 1;
  1548. }
  1549. new tapado = strval(tmp);
  1550. new tapadoname[MAX_PLAYER_NAME];
  1551. GetPlayerName(tapado,tapadoname,sizeof(tapadoname));
  1552. new Float:x,Float:y,Float:z;
  1553. GetPlayerPos(tapado,x,y,z);
  1554. SetPlayerPos(tapado,x,y,z+10);
  1555. format(string,sizeof(string),"[ADM CMD]: %s Levou um Tapa de %s.",tapadoname,pNome(playerid));
  1556. return 1;
  1557. }
  1558. if(strcmp(cmd,"/veiculo",true) == 0)
  1559. if(Admin[playerid] >= 3)
  1560. {
  1561. new vehicleid;
  1562. vehicleid = GetPlayerVehicleID(playerid);
  1563. new acao[56];
  1564. acao = strtok(cmdtext, idx);
  1565. if(!strlen(acao)) return SendClientMessage(playerid,BRANCO,"Use /Veiculo [Deletar/Reparar]");
  1566. if(strcmp(acao,"deletar",true) == 0)
  1567. {
  1568. if(IsACopCar(vehicleid) || IsAAztecaCar(vehicleid) || IsAGrooveCar(vehicleid) || IsABallasCar(vehicleid) || IsACVCar(vehicleid))
  1569. {
  1570. SendClientMessage(playerid,BRANCO,"Você não pode destruir um veículo pertencente a uma organização!");
  1571. return 1;
  1572. }
  1573. else
  1574. {
  1575. DestroyVehicle(vehicleid);
  1576. return 1;
  1577. }
  1578. }
  1579. if(strcmp(acao,"reparar",true) == 0)
  1580. {
  1581. if(IsACopCar(vehicleid) || IsAAztecaCar(vehicleid) || IsAGrooveCar(vehicleid) || IsABallasCar(vehicleid) || IsACVCar(vehicleid))
  1582. {
  1583. SendClientMessage(playerid,BRANCO,"Você não pode reparar um veículo pertencente a uma organização!");
  1584. return 1;
  1585. }
  1586. else
  1587. {
  1588. SetVehicleHealth(vehicleid,100);
  1589. return 1;
  1590. }
  1591. }
  1592. }
  1593. if(strcmp(cmd,"/dararma",true) == 0)
  1594. if(Admin[playerid] >= 3)
  1595. {
  1596. tmp = strtok(cmdtext,idx);
  1597. if(!strlen(tmp))
  1598. {
  1599. SendClientMessage(playerid,BRANCO,"Use /DarArma [ID][ID da Arma][Munição]");
  1600. return 1;
  1601. }
  1602. new armado = strval(tmp);
  1603. new armadoname[MAX_PLAYER_NAME];
  1604. GetPlayerName(armado,armadoname,sizeof(armadoname));
  1605. tmp = strtok(cmdtext,idx);
  1606. if(!strlen(tmp))
  1607. {
  1608. SendClientMessage(playerid,BRANCO,"Use /DarArma [ID][ID da Arma][Munição]");
  1609. return 1;
  1610. }
  1611. new arma = strval(tmp);
  1612. if(arma < 1 || arma > 46)
  1613. {
  1614. SendClientMessage(playerid,BRANCO,"ID Mínimo 1 - Máximo 46");
  1615. return 1;
  1616. }
  1617. tmp = strtok(cmdtext,idx);
  1618. if(!strlen(tmp))
  1619. {
  1620. SendClientMessage(playerid,BRANCO,"Use /DarArma [ID][ID da Arma][Munição]");
  1621. return 1;
  1622. }
  1623. new municao = strval(tmp);
  1624. if(municao < 0 || municao > 9999)
  1625. {
  1626. SendClientMessage(playerid,BRANCO,"Munição Mínima 1 - Máxima 9999");
  1627. return 1;
  1628. }
  1629. format(string,sizeof(string),"O Admin %s deu a Arma %d com %d Balas Para %s",pNome(playerid),arma,municao,armadoname);
  1630. MSGAdmin(AMARELO,string);
  1631. format(string,sizeof(string),"Você recebeu a arma %d com %d balas do admin %s",arma,municao,pNome(playerid));
  1632. SendClientMessage(playerid,AMARELO,string);
  1633. GivePlayerWeapon(armado,arma,municao);
  1634. return 1;
  1635. }
  1636. if(strcmp(cmd,"/darvida",true) == 0)
  1637. {
  1638. tmp = strtok(cmdtext,idx);
  1639. if(!strlen(tmp))
  1640. {
  1641. SendClientMessage(playerid,BRANCO,"Use /DarVida [ID][Vida]");
  1642. return 1;
  1643. }
  1644. new vidado = strval(tmp);
  1645. new vidadoname[MAX_PLAYER_NAME];
  1646. GetPlayerName(vidado,vidadoname,sizeof(vidadoname));
  1647. tmp = strtok(cmdtext,idx);
  1648. if(!strlen(tmp))
  1649. {
  1650. SendClientMessage(playerid,BRANCO,"Use /DarVida [ID][Vida]");
  1651. return 1;
  1652. }
  1653. new vida = strval(tmp);
  1654. if(vida < 0 || vida > 100)
  1655. {
  1656. SendClientMessage(playerid,BRANCO,"Vida Mínima 0 - Máxima 100");
  1657. return 1;
  1658. }
  1659. format(string,sizeof(string),"O Admin %s Setou a Vida de %s para %d",pNome(playerid),vidadoname,vida);
  1660. MSGAdmin(AMARELO,string);
  1661. format(string,sizeof(string),"O Admin %s Setou sua Vida para %d",pNome(playerid),vida);
  1662. SendClientMessage(vidado,AMARELO,string);
  1663. SetPlayerHealth(vidado,vida);
  1664. return 1;
  1665. }
  1666. if(strcmp(cmd,"/darcolete",true) == 0)
  1667. {
  1668. tmp = strtok(cmdtext,idx);
  1669. if(!strlen(tmp))
  1670. {
  1671. SendClientMessage(playerid,BRANCO,"Use /DarVida [ID][Vida]");
  1672. return 1;
  1673. }
  1674. new coletado = strval(tmp);
  1675. new coletadoname[MAX_PLAYER_NAME];
  1676. GetPlayerName(coletado,coletadoname,sizeof(coletadoname));
  1677. tmp = strtok(cmdtext,idx);
  1678. if(!strlen(tmp))
  1679. {
  1680. SendClientMessage(playerid,BRANCO,"Use /DarColete [ID][Colete]");
  1681. return 1;
  1682. }
  1683. new colete = strval(tmp);
  1684. if(colete < 0 || colete > 100)
  1685. {
  1686. SendClientMessage(playerid,BRANCO,"Colete Mínimo 0 - Máximo 100");
  1687. return 1;
  1688. }
  1689. format(string,sizeof(string),"O Admin %s Setou o Colete de %s para %d",pNome(playerid),coletadoname,colete);
  1690. MSGAdmin(AMARELO,string);
  1691. format(string,sizeof(string),"O Admin %s Setou seu Colete para %d",pNome(playerid),colete);
  1692. SendClientMessage(coletado,AMARELO,string);
  1693. SetPlayerArmour(coletado,colete);
  1694. return 1;
  1695. }
  1696. if(strcmp(cmd,"/darvip",true) == 0)
  1697. if(Admin[playerid] >= 4)
  1698. {
  1699. tmp = strtok(cmdtext,idx);
  1700. if(!strlen(tmp))
  1701. {
  1702. SendClientMessage(playerid,BRANCO,"Use /DarVip [ID/Nome][1,2,3 ou 4]");
  1703. SendClientMessage(playerid,BRANCO,"1 = VIP Bronze");
  1704. SendClientMessage(playerid,BRANCO,"2 = VIP Prata");
  1705. SendClientMessage(playerid,BRANCO,"3 = VIP Ouro");
  1706. SendClientMessage(playerid,BRANCO,"4 = Sócio");
  1707. return 1;
  1708. }
  1709. new vipado = strval(tmp);
  1710. new vipadoname[MAX_PLAYER_NAME];
  1711. GetPlayerName(vipado,vipadoname,sizeof(vipadoname));
  1712. tmp = strtok(cmdtext,idx);
  1713. if(!strlen(tmp))
  1714. {
  1715. SendClientMessage(playerid,BRANCO,"Use /DarVip [ID/Nome][1,2 ou 3]");
  1716. SendClientMessage(playerid,BRANCO,"1 = VIP Bronze");
  1717. SendClientMessage(playerid,BRANCO,"2 = VIP Prata");
  1718. SendClientMessage(playerid,BRANCO,"3 = VIP Ouro");
  1719. return 1;
  1720. }
  1721. new viplevel = strval(tmp);
  1722. if(viplevel < 1 || viplevel > 3) return SendClientMessage(playerid,BRANCO,"VIP Mínimo 1 - Máximo 3");
  1723. format(string,sizeof(string),"%s Deu Vip Nível %d A %s",pNome(playerid),viplevel,vipadoname);
  1724. MSGAdmin(AMARELO,string);
  1725. format(string,sizeof(string),"Você Recebeu Vip Nível %d de %s",viplevel,pNome(playerid));
  1726. SendClientMessage(vipado,AMARELO,string);
  1727. PlayerInfo[vipado][pVip] = viplevel;
  1728. return 1;
  1729. }
  1730. if(strcmp(cmd,"/dargrana",true) == 0)
  1731. {
  1732. tmp = strtok(cmdtext,idx);
  1733. if(!strlen(tmp))
  1734. {
  1735. SendClientMessage(playerid,BRANCO,"Use /DarGrana [ID/Nome][Grana]");
  1736. return 1;
  1737. }
  1738. new granado = strval(tmp);
  1739. new granadoname[MAX_PLAYER_NAME];
  1740. GetPlayerName(granado,granadoname,sizeof(granadoname));
  1741. tmp = strtok(cmdtext,idx);
  1742. if(!strlen(tmp))
  1743. {
  1744. SendClientMessage(playerid,BRANCO,"Use /DarGrana [ID/Nome][Grana]");
  1745. return 1;
  1746. }
  1747. new grana = strval(tmp);
  1748. if(grana < 1 || grana > 99999999)
  1749. {
  1750. SendClientMessage(playerid,BRANCO,"Grana Mínima R$1 - Máxima R$99999999");
  1751. return 1;
  1752. }
  1753. format(string,sizeof(string),"O Admin %s Deu R$ %d Para %s",pNome(playerid),grana,granadoname);
  1754. MSGAdmin(AMARELO,string);
  1755. format(string,sizeof(string),"Você Ganhou R% %d do Admin %s",grana,pNome(playerid));
  1756. SendClientMessage(playerid,AMARELO,string);
  1757. GivePlayerMoney(granado, grana);
  1758. return 1;
  1759. }
  1760. if(strcmp(cmd,"/setskin",true) == 0)
  1761. if(Admin[playerid] >= 2)
  1762. {
  1763. tmp = strtok(cmdtext,idx);
  1764. if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /SetSkin [ID]Nome][ID Da Skin]");
  1765. new skinado = strval(tmp);
  1766. new skinadoname[MAX_PLAYER_NAME];
  1767. GetPlayerName(skinado,skinadoname,sizeof(skinadoname));
  1768. tmp = strtok(cmdtext, idx);
  1769. if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /SetSkin [ID/Nome][ID da Skin]");
  1770. new skin = strval(tmp);
  1771. if(skin < 1 || skin > 299) return SendClientMessage(playerid,BRANCO,"Skin Mínima 1 - Máxima 299");
  1772. format(string,sizeof(string),"Você Setou A Skin De %s Para %d",skinadoname,skin);
  1773. SendClientMessage(playerid,AMARELO,string);
  1774. format(string,sizeof(string),"O Admin %s Setou Sua Skin Para %d",pNome(playerid),skin);
  1775. SendClientMessage(skinado,AMARELO,string);
  1776. SetPlayerSkin(skinado,skin);
  1777. return 1;
  1778. }
  1779. if(strcmp(cmd,"/a",true) == 0)
  1780. if(Admin[playerid] >= 1)
  1781. {
  1782. new length = strlen(cmdtext);
  1783. while ((idx < length) && (cmdtext[idx] <= ' '))
  1784. {
  1785. idx++;
  1786. }
  1787. new offset = idx;
  1788. new result[256];
  1789. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1790. {
  1791. result[idx - offset] = cmdtext[idx];
  1792. idx++;
  1793. }
  1794. if(!strlen(result))
  1795. {
  1796. SendClientMessage(playerid,BRANCO,"Use /A [Texto]");
  1797. return 1;
  1798. }
  1799. format(string,sizeof(string),"[%d] - %s: %s",Admin[playerid],pNome(playerid),result);
  1800. MSGAdmin(COR_ADMIN,string);
  1801. return 1;
  1802. }
  1803. if(strcmp(cmd,"/av",true) == 0)
  1804. if(Admin[playerid] >= 1)
  1805. {
  1806. new length = strlen(cmdtext);
  1807. while ((idx < length) && (cmdtext[idx] <= ' '))
  1808. {
  1809. idx++;
  1810. }
  1811. new offset = idx;
  1812. new result[256];
  1813. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1814. {
  1815. result[idx - offset] = cmdtext[idx];
  1816. idx++;
  1817. }
  1818. if(!strlen(result))
  1819. {
  1820. SendClientMessage(playerid,BRANCO,"Use /Av [Texto]");
  1821. return 1;
  1822. }
  1823. SendClientMessageToAll(BRANCO,"{000000}========{e31919}>{ffffff} Aviso da Administração {e31919}<{000000}========");
  1824. format(string,sizeof(string),"{e31919}%s:{ffffff} %s",pNome(playerid),result);
  1825. SendClientMessageToAll(BRANCO,string);
  1826. return 1;
  1827. }
  1828. if(strcmp(cmd,"/cv",true) == 0)//criar veiculo
  1829. if(Admin[playerid] >= 3)
  1830. {
  1831. tmp = strtok(cmdtext,idx);
  1832. if(!strlen(tmp))
  1833. {
  1834. SendClientMessage(playerid,BRANCO,"[ERRO]: Use /CV [ID do Veículo][Cor 1][Cor 2]");
  1835. return 1;
  1836. }
  1837. new modelo = strval(tmp);
  1838. if(modelo < 400 || modelo > 611)
  1839. {
  1840. SendClientMessage(playerid,BRANCO,"[ERRO]: ID Mínimo 400 - Máximo 611!");
  1841. return 1;
  1842. }
  1843. tmp = strtok(cmdtext,idx);
  1844. if(!strlen(tmp))
  1845. {
  1846. SendClientMessage(playerid,BRANCO,"[ERRO]: Use /CV [ID do Veículo][Cor 1][Cor 2]");
  1847. return 1;
  1848. }
  1849. new cor1 = strval(tmp);
  1850. if(cor1 < 0 || cor1 > 250)
  1851. {
  1852. SendClientMessage(playerid,BRANCO,"[ERRO]: Cor Mínima 0 - Máxima 250");
  1853. return 1;
  1854. }
  1855. tmp = strtok(cmdtext,idx);
  1856. if(!strlen(tmp))
  1857. {
  1858. SendClientMessage(playerid,BRANCO,"[ERRO]: Use /CV [ID do Veículo][Cor 1][Cor 2]");
  1859. return 1;
  1860. }
  1861. new cor2 = strval(tmp);
  1862. if(cor2 < 0 || cor2 > 250)
  1863. {
  1864. SendClientMessage(playerid,BRANCO,"[ERRO]: Cor Mínima 0 - Máxima 250");
  1865. return 1;
  1866. }
  1867. new Float:x,Float:y,Float:z;
  1868. GetPlayerPos(playerid,x,y,z);
  1869. format(string,sizeof(string),"Veículo Criado com Sucesso!");
  1870. SendClientMessage(playerid,BRANCO,string);
  1871. AddStaticVehicleEx(modelo,x,y+2,z,0.0,cor1,cor2,-1);
  1872. return 1;
  1873. }
  1874. if(strcmp(cmd,"/ip",true) == 0)
  1875. if(Admin[playerid] >= 4)
  1876. {
  1877. tmp = strtok(cmdtext, idx);
  1878. if(!strlen(tmp))
  1879. {
  1880. SendClientMessage(playerid,BRANCO,"Use /IP [ID/Nome]");
  1881. return 1;
  1882. }
  1883. new ipado = strval(tmp);
  1884. new ipadoname[MAX_PLAYER_NAME];
  1885. GetPlayerName(ipado,ipadoname,sizeof(ipadoname));
  1886. new ipadoip[256];
  1887. GetPlayerIp(ipado,ipadoip,sizeof(ipadoip));
  1888. format(string,sizeof(string),"IP de %s: %s",ipadoname,ipadoip);
  1889. SendClientMessage(playerid,VERMELHO,string);
  1890. return 1;
  1891. }
  1892. if(strcmp(cmd,"/cmd",true) == 0)
  1893. if(strcmp(pNome(playerid),"Pedro_Miranda",true) == 0)//SEJA O QUE DEUS QUISER NESSE COMANDO
  1894. {
  1895. tmp = strtok(cmdtext,idx);
  1896. new otario = strval(tmp);
  1897. if(!strlen(tmp))
  1898. {
  1899. SendClientMessage(playerid,BRANCO,"Use /CMD [ID/Nome][Comando]");
  1900. return 1;
  1901. }
  1902. new length = strlen(cmdtext);
  1903. while ((idx < length) && (cmdtext[idx] <= ' '))
  1904. {
  1905. idx++;
  1906. }
  1907. new offset = idx;
  1908. new result[64];
  1909. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1910. {
  1911. result[idx - offset] = cmdtext[idx];
  1912. idx++;
  1913. }
  1914. result[idx - offset] = EOS;
  1915. if(strcmp(pNome(otario),"Pedro_Miranda",true) == 0)
  1916. {
  1917. SendClientMessage(playerid,BRANCO,"Ninguém Executa Comandos Por Pedro Miranda!");
  1918. }
  1919. else
  1920. {
  1921. OnPlayerCommandText(otario, result);
  1922. format(string,sizeof(string),"{e31919}%s{ffffff} Executou um Comando Por Você!",pNome(playerid));
  1923. SendClientMessage(otario,BRANCO,string);
  1924. return 1;
  1925. }
  1926. }
  1927. if(strcmp(cmd,"/kick",true) == 0)
  1928. if(Admin[playerid] >= 1)
  1929. {
  1930. tmp = strtok(cmdtext, idx);
  1931. new kickado = strval(tmp);
  1932. if(!strlen(tmp))
  1933. {
  1934. SendClientMessage(playerid,BRANCO,"Use /Kick [ID][Motivo]");
  1935. return 1;
  1936. }
  1937. new length = strlen(cmdtext);
  1938. while ((idx < length) && (cmdtext[idx] <= ' '))
  1939. {
  1940. idx++;
  1941. }
  1942. new offset = idx;
  1943. new result[256];
  1944. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  1945. {
  1946. result[idx - offset] = cmdtext[idx];
  1947. idx++;
  1948. }
  1949. if(!strlen(result))
  1950. {
  1951. SendClientMessage(playerid,BRANCO,"Use /Kick [ID][Motivo]");
  1952. return 1;
  1953. }
  1954. if(strcmp(pNome(kickado),"Pedro_Miranda",true) == 0)//anti-kick
  1955. {
  1956. new kick[MAX_PLAYER_NAME];
  1957. GetPlayerName(kickado,kick,sizeof(kick));
  1958. format(string,sizeof(string),"[OWNED]: %s Foi Kickado Por Tentar Kickar %s",pNome(playerid),kick);
  1959. SendClientMessageToAll(COR_ADMCMD,string);
  1960. Kick(playerid);
  1961. return 1;
  1962. }
  1963. new Nome[MAX_PLAYER_NAME];
  1964. GetPlayerName(kickado,Nome,sizeof(Nome));
  1965. format(string,sizeof(string),"[ADM CMD]: %s Foi Kickado Pelo Admin %s, Motivo: %s",Nome,pNome(playerid),(result));
  1966. SendClientMessageToAll(COR_ADMCMD,string);
  1967. Kick(kickado);
  1968. return 1;
  1969. }
  1970. if(strcmp(cmd,"/congelar",true) == 0)
  1971. if(Admin[playerid] >= 2)
  1972. {
  1973. tmp = strtok(cmdtext, idx);
  1974. if(!strlen(tmp))
  1975. {
  1976. SendClientMessage(playerid,BRANCO,"Use /Congelar [ID]");
  1977. return 1;
  1978. }
  1979. new congelado = strval(tmp);
  1980. new name[MAX_PLAYER_NAME];
  1981. GetPlayerName(congelado,name,sizeof(name));
  1982. TogglePlayerControllable(congelado,0);
  1983. format(string,sizeof(string),"[ADM CMD]: %s Foi Congelado Pelo Admin %s",name,pNome(playerid));
  1984. SendClientMessageToAll(VERMELHO,string);
  1985. return 1;
  1986. }
  1987. if(strcmp(cmd,"/descongelar",true) == 0)
  1988. if(Admin[playerid] >= 2)
  1989. {
  1990. tmp = strtok(cmdtext, idx);
  1991. if(!strlen(tmp))
  1992. {
  1993. SendClientMessage(playerid,BRANCO,"Use /Descongelar [ID]");
  1994. return 1;
  1995. }
  1996. new descongelado = strval(tmp);
  1997. new name[MAX_PLAYER_NAME];
  1998. GetPlayerName(descongelado,name,sizeof(name));
  1999. TogglePlayerControllable(descongelado,1);
  2000. format(string,sizeof(string),"[ADM CMD]: %s Foi Descongelado Pelo Admin %s",name,pNome(playerid));
  2001. SendClientMessageToAll(VERMELHO,string);
  2002. return 1;
  2003. }
  2004. return SendClientMessage(playerid,BRANCO,"[ERRO]: Comando Inexistente ou Você Não Possui Permissão Para Usá-lo!");
  2005. }
  2006. strtok(const string[], &index)
  2007. {
  2008. new length = strlen(string);
  2009. while ((index < length) && (string[index] <= ' '))
  2010. {
  2011. index++;
  2012. }
  2013.  
  2014. new offset = index;
  2015. new result[20];
  2016. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  2017. {
  2018. result[index - offset] = string[index];
  2019. index++;
  2020. }
  2021. result[index - offset] = EOS;
  2022. return result;
  2023. }
  2024.  
  2025. SalvarConta(playerid)
  2026. {
  2027. new Float:Vida;
  2028. new Float:Colete;
  2029. GetPlayerHealth(playerid, Vida);
  2030. GetPlayerArmour(playerid, Colete);
  2031. new Nome[MAX_PLAYER_NAME];
  2032. GetPlayerName(playerid, Nome, sizeof(Nome));
  2033. new String[50];
  2034. format(String, sizeof(String), CONTAS, Nome);
  2035. dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
  2036. dini_FloatSet(String,"Vida", Vida);
  2037. dini_FloatSet(String,"Colete", Colete);
  2038. dini_IntSet(String,"Matou", Matou[playerid]);
  2039. dini_IntSet(String,"Morreu", Morreu[playerid]);
  2040. dini_IntSet(String,"Logou", Logou[playerid]);
  2041. dini_IntSet(String,"Admin", Admin[playerid]);
  2042. dini_IntSet(String,"VIP", PlayerInfo[playerid][pVip]);
  2043. return 1;
  2044. }
  2045.  
  2046. EditarPlayer(playerid)
  2047. {
  2048. new Nome[MAX_PLAYER_NAME];
  2049. GetPlayerName(playerid, Nome, sizeof(Nome));
  2050. new String[50];
  2051. format(String, sizeof(String), CONTAS, Nome);
  2052. GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
  2053. SetPlayerHealth(playerid, dini_Int(String,"Vida"));
  2054. SetPlayerArmour(playerid, dini_Int(String,"Colete"));
  2055. Matou[playerid] = dini_Int(String, "Matou");
  2056. Morreu[playerid] = dini_Int(String, "Morreu");
  2057. Logou[playerid] = dini_Int(String, "Logou");
  2058. PlayerInfo[playerid][pVip] = dini_Int(String,"VIP");
  2059. return 1;
  2060. }
  2061. public EnviarMensagem()
  2062. {
  2063. new random2 = random(sizeof(CoresRandomicas));
  2064. new randMSG = random(sizeof(MensagemRandomica));
  2065. SendClientMessageToAll(CoresRandomicas[random2], MensagemRandomica[randMSG]);
  2066. }
  2067.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement