Advertisement
ScripterALOK

GameMode Treino By:ALOK

Oct 10th, 2015
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.79 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4. #include <sscanf2>
  5. #include <zcmd>
  6. #include <DOF2>
  7. #include <cpstream>
  8. #define CONTAS "Players/%s.ini"
  9. #define REGISTRO 1
  10. #define LOGIN 2
  11. #define classemudar 3
  12. #define Armas 120
  13. #define dialogr 5
  14. #define MAXGANGS 2
  15. #define Mafiar 5
  16. #define Mafiai 6
  17. #pragma tabsize 0
  18. #define verdeclaro 0x00FF00FF
  19. #define verdeescuro 0x228B22FF
  20. #define amarelo 0xFFFF00FF
  21. #define vermelho 0xFF0000FF
  22. #define preto 0x000000FF
  23. #define branco 0xFFFFFFFF
  24. #define laranja 0xFFA500FF
  25. #define roxo 0x9932CCFF
  26. #define rosa 0xFF1493FF
  27. #define azul 0x0000FFFF
  28. #define marrom 0x8B4726FF
  29. new bool:Connc = false;
  30. new bool:aceitou = false;
  31. new Tempo = 5,Tempogmx = 20;
  32. new Text:Textdraw0;
  33. new Text:Textdraw1;
  34. new Text:Textdraw2;
  35. new Text:Textdraw3;
  36. new Text:Textdraw4;
  37. new Text:Textdraw5;
  38. new Text:Textdraw6;
  39. new Text:Textdraw7;
  40. new pickuparmas;
  41. new pickuparmas1;
  42. new pickupvida;
  43. new pickupvida1;
  44. new pickupcolete;
  45. new pickupcolete1;
  46. new contastexto[50];
  47. new gTeam[MAXGANGS];
  48. new carros;
  49. new nome[MAX_PLAYER_NAME];
  50. new nome1[MAX_PLAYER_NAME];
  51. new String[999];
  52. new RandomMSG[][] =
  53. {
  54. "{FF6600}Quer saber quem foi o responsável pela criação do servidor ? /creditos",
  55. "{3366FF}Adicione o IP do servidor aos fávoritos e chame amigos",
  56. "{FF0000}Sempre siga as regras,caso o contrário você sofrera as consequências.",
  57. "{999900}Qualquer dúvida que você tiver,pergunte a um administrador. /admins /duvida /ajuda",
  58. "{9932CC}Esse servidor tem Anti-Team Kill,Portanto não importa o quanto você tente,não matara membros da sua equipe.",
  59. "{C0FF3E}Não esqueça de pegar o Kit Básico da Gang no menu de /armas, ele é gratuito."
  60. };
  61. enum info
  62. {
  63. dinheiro,
  64. score,
  65. matou,
  66. morreu,
  67. adm
  68. }
  69. new pInfo[MAX_PLAYERS][info];
  70.  
  71. forward kickm(playerid);
  72. public kickm(playerid) { Kick(playerid); }
  73. Kicka(playerid, message[])
  74. {
  75. SendClientMessage(playerid, 0xFF4444FF, message);
  76. SetTimerEx("kickm", 1000, 0, "d", playerid);
  77. }
  78.  
  79. forward SendMSG();
  80. public SendMSG()
  81. {
  82. new randMSG = random(sizeof(RandomMSG));
  83. SendClientMessageToAll(-1, RandomMSG[randMSG]);
  84. }
  85.  
  86. forward ban(playerid);
  87. public ban(playerid) { Ban(playerid); }
  88. bani(playerid, message[])
  89. {
  90. SendClientMessage(playerid, 0xFF4444FF, message);
  91. SetTimerEx("ban", 1000, 0, "d", playerid);
  92. }
  93.  
  94. forward atualizartextdraw(playerid);
  95. public atualizartextdraw(playerid)
  96. {
  97. format(String,sizeof(String),"Matou: ~g~%d",pInfo[playerid][matou]);
  98. TextDrawSetString(Textdraw2, String);
  99. format(String,sizeof(String),"Morreu: ~g~%d",pInfo[playerid][morreu]);
  100. TextDrawSetString(Textdraw3,String);
  101. return 1;
  102. }
  103.  
  104. forward ChatGang(playerid, color, string[]);
  105. public ChatGang(playerid, color, string[])
  106. {
  107. for (new r = 0; r != MAX_PLAYERS; r++)
  108. {
  109. if (IsPlayerConnected(r))
  110. {
  111. if(gTeam[r] == gTeam[playerid])
  112. {
  113. SendClientMessage(r, color, string);
  114. }
  115. }
  116. }
  117. return 1;
  118. }
  119.  
  120. forward contagmx();
  121. public contagmx()
  122. {
  123. if(Tempogmx == 0)
  124. {
  125. Tempo = 20;
  126. SendRconCommand("gmx");
  127. return false;
  128. }
  129. format(String,sizeof(String),"~b~%d",Tempogmx);
  130. GameTextForAll(String,1000,4);
  131. SetTimer("contagmx",1000,false);
  132. return Tempogmx--;
  133. }
  134.  
  135. forward Contagem();
  136. public Contagem()
  137. {
  138. if(Tempo == 0)
  139. {
  140. GameTextForAll("~r~Go Go Go", 1000, 4);
  141. Tempo = 5;
  142. return false;
  143. }
  144. format(String, sizeof(String),"~g~%d", Tempo);
  145. GameTextForAll(String,1000,4);
  146. SetTimer("Contagem", 1000, false);
  147. return Tempo--;
  148. }
  149.  
  150. public OnPlayerText(playerid, text[])
  151. {
  152. new playern[MAX_PLAYER_NAME];
  153. GetPlayerName(playerid,playern,sizeof(playern));
  154. format(String,128,"%s|%d|:{FFFFFF}%s",playern,playerid,text);
  155. SendClientMessageToAll(GetPlayerColor(playerid),String);
  156. return 0;
  157. }
  158.  
  159. public OnPlayerConnect(playerid)
  160. {
  161. Connc = true;
  162. GetPlayerName(playerid, nome, sizeof(nome));
  163. format(String,sizeof(String),"{00FF00}%s|%d| {FFFFFF}entrou no {00FF00}servidor.",nome,playerid);
  164. SendClientMessageToAll(-1,String);
  165. format(String, sizeof(String), CONTAS, nome);
  166. if(!DOF2_FileExists(String))
  167. {
  168. GivePlayerMoney(playerid,1000);
  169. SetPlayerScore(playerid,10);
  170. format(String, sizeof(String), "{00FF7F}Bem Vindo ao servidor %s\n{FF0000}A sua conta não é registrada\n{FFFF00}Por favor digite uma senha para se registrar", nome);
  171. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  172. aceitou = true;
  173.  
  174. }
  175. else
  176. {
  177. format(String, sizeof(String), "{00FF7F}Bem Vindo ao servidor %s\n{00BFFF}A sua conta é registrada\n{FFFF00}Por favor digite uma senha para logar", nome);
  178. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  179. }
  180. return 1;
  181. }
  182.  
  183. public OnPlayerSpawn(playerid)
  184. {
  185. TextDrawShowForPlayer(playerid,Textdraw0);
  186. TextDrawShowForPlayer(playerid,Textdraw1);
  187. TextDrawShowForPlayer(playerid,Textdraw2);
  188. TextDrawShowForPlayer(playerid,Textdraw3);
  189. TextDrawShowForPlayer(playerid,Textdraw4);
  190. TextDrawHideForPlayer(playerid,Textdraw5);
  191. TextDrawHideForPlayer(playerid,Textdraw6);
  192. TextDrawHideForPlayer(playerid,Textdraw7);
  193. GetPlayerName(playerid,nome,sizeof(nome));
  194. if(gTeam[playerid] == Mafiar)
  195. {
  196. if(Connc == true)
  197. {
  198.  
  199. format(String,sizeof(String),"{00FF7F}%s {FFFFFF}se juntou a {FF0000}Zona Sul ",nome);
  200. SendClientMessageToAll(-1,String);
  201. SetPlayerColor(playerid,vermelho);
  202. SetPlayerPos(playerid,3792.4673,-1144.5051,3.3858);
  203. SetPlayerInterior(playerid,0);
  204. Connc = false;
  205. }
  206. else
  207. {
  208. SetPlayerColor(playerid,vermelho);
  209. SetPlayerPos(playerid,3792.4673,-1144.5051,3.3858);
  210. SetPlayerInterior(playerid,0);
  211. }
  212. }
  213. if(gTeam[playerid] == Mafiai)
  214. {
  215.  
  216. if(Connc == true)
  217. {
  218. format(String,sizeof(String),"{00FF7F}%s {FFFFFF}se juntou a {1E90FF}Guerra ",nome);
  219. SendClientMessageToAll(-1,String);
  220. SetPlayerColor(playerid,azul);
  221. SetPlayerPos(playerid,3792.3835,-1015.0447,3.3858);
  222. SetPlayerInterior(playerid,0);
  223. Connc = false;
  224. }
  225. else
  226. {
  227. SetPlayerColor(playerid,azul);
  228. SetPlayerPos(playerid,3792.3835,-1015.0447,3.3858);
  229. SetPlayerInterior(playerid,0);
  230.  
  231. }
  232. }
  233. return 1;
  234. }
  235.  
  236. CMD:contar(playerid)
  237. {
  238. if(pInfo[playerid][adm] <1) return SendClientMessage(playerid,vermelho,"Você não é adm");
  239. if(Tempo != 5) return SendClientMessage(playerid,vermelho,"Já tem uma contagem em andamento");
  240. Contagem();
  241. return true;
  242. }
  243.  
  244. CMD:dinheiro(playerid,params[])
  245. {
  246. new grana;
  247. if(sscanf(params,"d",grana)) return SendClientMessage(playerid,vermelho,"Use /dinheiro [quantia]");
  248. if(pInfo[playerid][adm] <2) return SendClientMessage(playerid,vermelho,"Você não tá autorizado a usar esse comando");
  249. GivePlayerMoney(playerid,grana);
  250. SendClientMessage(playerid,verdeclaro,"Você pegou seu dinheiro");
  251. return true;
  252. }
  253.  
  254. CMD:score(playerid,params[])
  255. {
  256. new level;
  257. if(sscanf(params,"d",level)) return SendClientMessage(playerid,vermelho,"Use /score [quantia]");
  258. if(pInfo[playerid][adm] <2) return SendClientMessage(playerid,vermelho,"Você não tá autorizado a usar esse comando");
  259. SetPlayerScore(playerid,level);
  260. SendClientMessage(playerid,verdeclaro,"Você pegou seu score");
  261. return true;
  262. }
  263.  
  264. CMD:ban(playerid,params[])
  265. {
  266. new id,reason[80];
  267. if(pInfo[playerid][adm] <2) return SendClientMessage(playerid,vermelho,"Você não tem permissão para fazer isso!");
  268. if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,vermelho,"USE: /ban [playerid] [rasão]");
  269. GetPlayerName(playerid,nome,sizeof(nome));
  270. GetPlayerName(id,nome1,sizeof(nome1));
  271. format(String,sizeof(String),"%s foi banido by admin %s. Rasão: %s",nome1,nome,reason);
  272. SendClientMessageToAll(vermelho,String);
  273. bani(id,"{FF0000}Você foi banido,caso ache que foi injusto tire print");
  274. return 1;
  275. }
  276.  
  277. CMD:desbanir(playerid,params[])
  278. {
  279. new IP[80], string[24];
  280. if(pInfo[playerid][adm] <1) return SendClientMessage(playerid,vermelho,"Você não tem permissão para fazer isso!");
  281. if(sscanf(params,"s",IP)) return SendClientMessage(playerid,vermelho,"USE: /desban [ip]");
  282. GetPlayerName(playerid,nome,sizeof(nome));
  283. format(String,sizeof(String),"O IP %s foi desbanido by admin %s.",IP,nome);
  284. SendClientMessageToAll(vermelho,String);
  285. format(string, sizeof(string), "unbanip %s", IP);
  286. SendRconCommand(string);
  287. return 1;
  288. }
  289.  
  290. CMD:reparar(playerid)
  291. {
  292. if(pInfo[playerid][adm] <1) return SendClientMessage(playerid,vermelho,"VocÊ não é adm");
  293. RepairVehicle(GetPlayerVehicleID(playerid));
  294. return true;
  295. }
  296.  
  297. CMD:admins(playerid)
  298. {
  299. for(new i=0; i<MAX_PLAYERS; i++)
  300. {
  301. if(pInfo[i][adm] > 0)
  302. {
  303. GetPlayerName(i,nome,sizeof(nome));
  304. format(String,sizeof(String),"%s = %s\n",nome,admins(i));
  305. }
  306. }
  307. ShowPlayerDialog(playerid,982,DIALOG_STYLE_MSGBOX ,"Administradores Online",String,"Ok","");
  308. return true;
  309. }
  310.  
  311. CMD:cg(playerid,params[])
  312. {
  313. new string[128],texto[120];
  314. if(sscanf(params, "s[120]", texto)) return SendClientMessage(playerid, vermelho, "/cg [texto]");
  315. GetPlayerName(playerid, nome, sizeof(nome));
  316. format(string, sizeof(string), "|Chat Gang|%s|%d|: {FFFFFF}%s", nome, playerid, texto);
  317. ChatGang(playerid, GetPlayerColor(playerid), string);
  318. return 1;
  319. }
  320.  
  321.  
  322. CMD:pm(playerid,params[])
  323. {
  324. new id;
  325. if(sscanf(params,"us",id,String)) return SendClientMessage(playerid,vermelho,"Use /pm [id] [msg]");
  326. if(!IsPlayerConnected(id)) return SendClientMessage(playerid,vermelho,"Player não conectado");
  327. GetPlayerName(playerid,nome,sizeof(nome));
  328. if(id == playerid) return SendClientMessage(playerid,vermelho,"Você não pode fazer isso com vc mesmo");
  329. format(String,sizeof(String),"{B8860B}[MP]%s|%d|:{DAA520}%s",nome,playerid,String);
  330. SendClientMessage(id,-1,String);
  331. SendClientMessage(playerid,-1,String);
  332. return true;
  333. }
  334.  
  335. CMD:armas(playerid)
  336. {
  337. if(gTeam[playerid] == Mafiar)
  338. {
  339. if(!IsPlayerInRangeOfPoint(playerid,3.0,3790.1641,-1138.5133,3.3858))
  340. {
  341. SendClientMessage(playerid,vermelho,"Você não está no local correto");
  342. }
  343. else
  344. {
  345. ShowPlayerDialog(playerid,120,DIALOG_STYLE_LIST ,"Armas","Pagar Com Dinheiro\nPagar Com Score","OK","Cancelar");
  346. }
  347. }
  348. if(gTeam[playerid] == Mafiai)
  349. {
  350. if(!IsPlayerInRangeOfPoint(playerid,3.0,3796.4612,-1022.1545,3.3858))
  351. {
  352. SendClientMessage(playerid,vermelho,"Você não está no local correto");
  353. }
  354. else
  355. {
  356. ShowPlayerDialog(playerid,120,DIALOG_STYLE_LIST ,"Armas","Pagar Com Dinheiro\nPagar Com Score","OK","Cancelar");
  357. }
  358. }
  359. return true;
  360. }
  361.  
  362. CMD:mudar(playerid)
  363. {
  364. ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Mudar","{90EE90}Cada vez que você mudar de gangue\n{FFB90F}Você sera penalizado com {FF0000}R$-100,00 {FF0000}por ter abandonado sua equipe\n{00E5EE}Ainda deseja trocar de gangue ?","Mudar","Cancelar");
  365. pInfo[playerid][morreu]--;
  366. return true;
  367. }
  368.  
  369.  
  370. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  371. {
  372. if(!success)
  373. {
  374. format(String,sizeof(String),"{FF0000}Você digitou {FFFFFF}%s {FF0000}e esse comando não existe",cmdtext);
  375. SendClientMessage(playerid,-1,String);
  376. return 1;
  377. }
  378. return 1;
  379. }
  380. public OnPlayerRequestClass(playerid, classid)
  381. {
  382. SetPlayerInterior(playerid,10);
  383. SetPlayerPos(playerid,1952.8192,1038.6272,992.8594);
  384. SetPlayerFacingAngle(playerid, 140.09);
  385. SetPlayerCameraPos(playerid,1947.6125,1032.8049,992.4688);
  386. SetPlayerCameraLookAt(playerid,1952.8192,1038.6272,992.8594);
  387. ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
  388. TextDrawShowForPlayer(playerid,Textdraw5);
  389. TextDrawShowForPlayer(playerid,Textdraw6);
  390. TextDrawShowForPlayer(playerid,Textdraw7);
  391. format(String,sizeof(String),"ID: ~g~%d",playerid);
  392. TextDrawSetString(Textdraw1,String);
  393. if((classid >= 0) && (classid <= 2))
  394. {
  395. gTeam[playerid] = Mafiar;
  396. SetPlayerTeam(playerid,Mafiar);
  397. GameTextForPlayer(playerid,"~r~Mafia Russa",7000,5);
  398. }
  399. if((classid >= 3) && (classid <= 5))
  400. {
  401.  
  402. SetPlayerTeam(playerid,Mafiai);
  403. gTeam[playerid] = Mafiai;
  404. GameTextForPlayer(playerid,"~b~Mafia Italiana",7000,5);
  405. }
  406. return 1;
  407. }
  408.  
  409.  
  410.  
  411. public OnGameModeInit()
  412. {
  413. UsePlayerPedAnims();
  414. SetGameModeText("Mafia's War");
  415.  
  416. ShowPlayerMarkers(1);
  417. ShowNameTags(1);
  418. EnableStuntBonusForAll(1);
  419.  
  420.  
  421. SetTimer("textos3d", 1000, true);
  422. SetTimer("atualizartextdraw", 1000, true);
  423. SetTimer("SendMSG", 300000, true);
  424.  
  425. Textdraw4 = TextDrawCreate(343.000000, 431.000000, "~r~Treino x1 ~by~ALOK ~y~v1.0");
  426. TextDrawBackgroundColor(Textdraw4, 255);
  427. TextDrawFont(Textdraw4, 2);
  428. TextDrawLetterSize(Textdraw4, 0.300000, 1.700000);
  429. TextDrawColor(Textdraw4, -1);
  430. TextDrawSetOutline(Textdraw4, 0);
  431. TextDrawSetProportional(Textdraw4, 1);
  432. TextDrawSetShadow(Textdraw4, 1);
  433. TextDrawSetSelectable(Textdraw4, 0);
  434.  
  435. Textdraw5 = TextDrawCreate(650.000000, 3.000000, "_");
  436. TextDrawBackgroundColor(Textdraw5, 255);
  437. TextDrawFont(Textdraw5, 1);
  438. TextDrawLetterSize(Textdraw5, 1.100000, 14.000000);
  439. TextDrawColor(Textdraw5, -1);
  440. TextDrawSetOutline(Textdraw5, 0);
  441. TextDrawSetProportional(Textdraw5, 1);
  442. TextDrawSetShadow(Textdraw5, 1);
  443. TextDrawUseBox(Textdraw5, 1);
  444. TextDrawBoxColor(Textdraw5, 51);
  445. TextDrawTextSize(Textdraw5, 0.000000, 0.000000);
  446. TextDrawSetSelectable(Textdraw5, 0);
  447.  
  448. return 1;
  449. }
  450.  
  451. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  452. {
  453. if(dialogid == REGISTRO)
  454. {
  455. if(response)
  456. {
  457. if(!strlen(inputtext))
  458. {
  459. GetPlayerName(playerid, nome, sizeof(nome));
  460. format(String, sizeof(String), "{FF0000}Digite uma senha válida para continuar", nome);
  461. ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  462. return 1;
  463. }
  464. GetPlayerName(playerid, nome, sizeof(nome));
  465. format(String, sizeof(String), CONTAS, nome);
  466. DOF2_CreateFile(String);
  467. DOF2_SetString(String,"Senha",inputtext);
  468. DOF2_SetInt(String,"Dinheiro",0);
  469. DOF2_SetInt(String,"Score", 0);
  470. DOF2_SetInt(String,"Adm", 0);
  471. DOF2_SetInt(String,"Matou",0);
  472. DOF2_SetInt(String,"Morreu",0);
  473.  
  474.  
  475. return 1;
  476. }
  477. else
  478. {
  479.  
  480. Kicka(playerid,"Você Foi Kickado Porque Não Quis Se Registrar!!");
  481. return 1;
  482. }
  483. }
  484. if(dialogid == LOGIN)
  485. {
  486. if(response)
  487. {
  488. if(!strlen(inputtext))
  489. {
  490. GetPlayerName(playerid, nome, sizeof(nome));
  491. format(String, sizeof(String), "{00FF7F}%s a senha que você\n digitou está incorreta\n{FFD700}Por favor digite\n{EED5B7}a senha correta para logar", nome);
  492. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  493. return 1;
  494. }
  495. GetPlayerName(playerid, nome, sizeof(nome));
  496. format(String, sizeof(String), CONTAS, nome);
  497. if(!strcmp(inputtext,DOF2_GetString(String,"Senha"),false))
  498. {
  499. SetarPlayer(playerid);
  500.  
  501. SendClientMessage(playerid,0x00FF00FF,"Logado com sucesso,bem vindo");
  502. return 1;
  503. }
  504. else
  505. {
  506.  
  507. format(String, sizeof(String), "{00FF7F}%s a senha que você\n digitou está incorreta\n{FFD700}Por favor digite\n{EED5B7}a senha correta para logar",nome);
  508. ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
  509. }
  510. return 1;
  511. }
  512. else
  513. {
  514. Kick(playerid);
  515.  
  516. return 1;
  517. }
  518. }
  519.  
  520.  
  521. if(dialogid == 8) {
  522. if(response) {
  523. SetPlayerHealth(playerid,0);
  524. GivePlayerMoney(playerid,-100);
  525. Connc = true;
  526. ForceClassSelection(playerid);
  527. TextDrawHideForPlayer(playerid,Textdraw0);
  528. TextDrawHideForPlayer(playerid,Textdraw1);
  529. TextDrawHideForPlayer(playerid,Textdraw2);
  530. TextDrawHideForPlayer(playerid,Textdraw3);
  531. TextDrawHideForPlayer(playerid,Textdraw4);
  532. }
  533. return 1;
  534. }
  535.  
  536. if(dialogid == 500)
  537. {
  538. if(response)
  539. {
  540. ShowPlayerDialog(playerid,501,DIALOG_STYLE_LIST ,"Missões Groove","Roubar Drogas\nRoubar todas as armas\nRoubar Grana","Escolher","Cancelar");
  541. }
  542. return true;
  543. }
  544.  
  545. if(dialogid == 125)
  546. {
  547. if(response)
  548. {
  549. if(listitem == 0)
  550. {
  551. if(GetPlayerMoney(playerid)<10000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  552. GivePlayerMoney(playerid,-10000);
  553. GivePlayerWeapon(playerid,25,50);
  554. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  555. }
  556. if(listitem == 1)
  557. {
  558. if(GetPlayerMoney(playerid)<10000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  559. GivePlayerMoney(playerid,-10000);
  560. GivePlayerWeapon(playerid,26,100);
  561. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  562. }
  563. if(listitem == 2)
  564. {
  565. if(GetPlayerMoney(playerid)<10000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  566. GivePlayerMoney(playerid,-10000);
  567. GivePlayerWeapon(playerid,27,80);
  568. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  569. }
  570. }
  571. return true;
  572. }
  573.  
  574. if(dialogid == 124)
  575. {
  576. if(response)
  577. {
  578. if(listitem == 0)
  579. {
  580. if(GetPlayerMoney(playerid)<5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  581. GivePlayerMoney(playerid,-5000);
  582. GivePlayerWeapon(playerid,22,200);
  583. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  584. }
  585. if(listitem == 1)
  586. {
  587. if(GetPlayerMoney(playerid)<5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  588. GivePlayerMoney(playerid,-5000);
  589. GivePlayerWeapon(playerid,23,250);
  590. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  591. }
  592. if(listitem == 2)
  593. {
  594. if(GetPlayerMoney(playerid)<5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  595. GivePlayerMoney(playerid,-5000);
  596. GivePlayerWeapon(playerid,24,150);
  597. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  598. }
  599. }
  600. return true;
  601. }
  602.  
  603. //Corpo a corpo
  604. if(dialogid == 123)
  605. {
  606. if(response)
  607. {
  608. if(listitem == 0)
  609. {
  610. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  611. GivePlayerMoney(playerid,-200);
  612. GivePlayerWeapon(playerid,1,1);
  613. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  614. }
  615. if(listitem == 1)
  616. {
  617. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  618. GivePlayerMoney(playerid,-200);
  619. GivePlayerWeapon(playerid,2,1);
  620. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  621. }
  622. if(listitem == 2)
  623. {
  624. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  625. GivePlayerMoney(playerid,-200);
  626. GivePlayerWeapon(playerid,3,1);
  627. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  628. }
  629. if(listitem == 3)
  630. {
  631. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  632. GivePlayerMoney(playerid,-200);
  633. GivePlayerWeapon(playerid,4,1);
  634. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  635. }
  636. if(listitem == 4)
  637. {
  638. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  639. GivePlayerMoney(playerid,-200);
  640. GivePlayerWeapon(playerid,5,1);
  641. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  642. }
  643. if(listitem == 5)
  644. {
  645. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  646. GivePlayerMoney(playerid,-200);
  647. GivePlayerWeapon(playerid,8,1);
  648. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  649. }
  650. }
  651. return true;
  652. }
  653.  
  654.  
  655. if(dialogid == 126)
  656. {
  657. if(response)
  658. {
  659. if(listitem == 0)
  660. {
  661. if(GetPlayerMoney(playerid)<15000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  662. GivePlayerMoney(playerid,-15000);
  663. GivePlayerWeapon(playerid,28,1000);
  664. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  665. }
  666. if(listitem == 1)
  667. {
  668. if(GetPlayerMoney(playerid)<15000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  669. GivePlayerMoney(playerid,-15000);
  670. GivePlayerWeapon(playerid,29,1000);
  671. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  672. }
  673. if(listitem == 2)
  674. {
  675. if(GetPlayerMoney(playerid)<15000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  676. GivePlayerMoney(playerid,-15000);
  677. GivePlayerWeapon(playerid,32,1000);
  678. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  679. }
  680. }
  681. return true;
  682. }
  683.  
  684. if(dialogid == 127)
  685. {
  686. if(response)
  687. {
  688. if(listitem == 0)
  689. {
  690. if(GetPlayerMoney(playerid)<20000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  691. GivePlayerMoney(playerid,-20000);
  692. GivePlayerWeapon(playerid,30,400);
  693. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  694. }
  695. if(listitem == 1)
  696. {
  697. if(GetPlayerMoney(playerid)<20000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  698. GivePlayerMoney(playerid,-20000);
  699. GivePlayerWeapon(playerid,31,400);
  700. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  701. }
  702. }
  703. return true;
  704. }
  705.  
  706. if(dialogid == 128)
  707. {
  708. if(response)
  709. {
  710. if(listitem == 0)
  711. {
  712. if(GetPlayerMoney(playerid)<30000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  713. GivePlayerMoney(playerid,-30000);
  714. GivePlayerWeapon(playerid,33,60);
  715. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  716. }
  717. if(listitem == 1)
  718. {
  719. if(GetPlayerMoney(playerid)<30000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  720. GivePlayerMoney(playerid,-30000);
  721. GivePlayerWeapon(playerid,34,40);
  722. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  723. }
  724. }
  725. return true;
  726. }
  727.  
  728. if(dialogid == 137)
  729. {
  730. if(response)
  731. {
  732. if(listitem == 0)
  733. {
  734. if(GetPlayerMoney(playerid)<100) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  735. GivePlayerMoney(playerid,-100);
  736. GivePlayerWeapon(playerid,44,1);
  737. SendClientMessage(playerid,verdeclaro,"Você recebeu seu óculos");
  738. }
  739. if(listitem == 1)
  740. {
  741. if(GetPlayerMoney(playerid)<100) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  742. GivePlayerMoney(playerid,-100);
  743. GivePlayerWeapon(playerid,45,1);
  744. SendClientMessage(playerid,verdeclaro,"Você recebeu seu óculos");
  745. }
  746. if(listitem == 2)
  747. {
  748. if(GetPlayerMoney(playerid)<50) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  749. GivePlayerMoney(playerid,-50);
  750. GivePlayerWeapon(playerid,43,100);
  751. SendClientMessage(playerid,verdeclaro,"Você recebeu sua câmera");
  752. }
  753. if(listitem == 3)
  754. {
  755. if(GetPlayerMoney(playerid)<200) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  756. GivePlayerMoney(playerid,-200);
  757. GivePlayerWeapon(playerid,42,3000);
  758. SendClientMessage(playerid,verdeclaro,"Você recebeu seu extintor");
  759. }
  760. if(listitem == 4)
  761. {
  762. if(GetPlayerMoney(playerid)<600) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  763. GivePlayerMoney(playerid,-600);
  764. GivePlayerWeapon(playerid,46,1);
  765. SendClientMessage(playerid,verdeclaro,"Você recebeu seu paraquedas");
  766. }
  767. if(listitem == 5)
  768. {
  769. if(GetPlayerMoney(playerid)<200000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  770. GivePlayerMoney(playerid,-200000);
  771. GivePlayerWeapon(playerid,38,500);
  772. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  773. }
  774. if(listitem == 6)
  775. {
  776. if(GetPlayerMoney(playerid)<200000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  777. GivePlayerMoney(playerid,-200000);
  778. GivePlayerWeapon(playerid,37,1000);
  779. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  780. }
  781. if(listitem == 7)
  782. {
  783. if(GetPlayerMoney(playerid)<150000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  784. GivePlayerMoney(playerid,-150000);
  785. GivePlayerWeapon(playerid,35,50);
  786. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  787. }
  788. if(listitem == 8)
  789. {
  790. if(GetPlayerMoney(playerid)<150000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  791. GivePlayerMoney(playerid,-150000);
  792. GivePlayerWeapon(playerid,36,30);
  793. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  794. }
  795. }
  796. return true;
  797. }
  798.  
  799. if(dialogid == 138)
  800. {
  801. if(response)
  802. {
  803. if(listitem == 0)
  804. {
  805. if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  806. GivePlayerMoney(playerid,-5000);
  807. GivePlayerWeapon(playerid,16,20);
  808. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  809. }
  810. if(listitem == 1)
  811. {
  812. if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  813. GivePlayerMoney(playerid,-5000);
  814. GivePlayerWeapon(playerid,17,10);
  815. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  816. }
  817. if(listitem == 2)
  818. {
  819. if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  820. GivePlayerMoney(playerid,-5000);
  821. GivePlayerWeapon(playerid,18,20);
  822. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  823. }
  824. if(listitem == 3)
  825. {
  826. if(GetPlayerMoney(playerid)<5000) return SendClientMessage(playerid,vermelho,"Você não tem dinheiro suficiente");
  827. GivePlayerMoney(playerid,-5000);
  828. GivePlayerWeapon(playerid,39,25);
  829. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  830. }
  831. }
  832. return true;
  833. }
  834.  
  835.  
  836. if(dialogid == 120)
  837. {
  838. if(response)
  839. {
  840. if(listitem == 0)
  841. {
  842. ShowPlayerDialog(playerid,121,DIALOG_STYLE_LIST ,"Armas Dinheiro","Armas Corpo a Corpo[Preço 200]\nPistolas[Preço 5000]\nShotGuns[Preço 10000]\nMetralhadoras[Preço 15000]\nArmas de Assault[Preço 20000]\nRifle[Preço 30000]\nArmas Especiais[Preço variado]\nArmas lançaveis[Preço 5000]\nKit Gang Básico[Grátis]","OK","Cancelar");
  843. }
  844. if(listitem == 1)
  845. {
  846. ShowPlayerDialog(playerid,122,DIALOG_STYLE_LIST ,"Armas Score","Armas Corpo a Corpo[Preço 3]\nPistolas[Preço 5]\nShotGuns[Preço 10]\nMetralhadoras[Preço 15]\nArmas de Assault[Preço 20]\nRifle[Preço 20]\nArmas Especiais[Preço variado]\nArmas lançaveis[Preço 5\nKit Gang Básico[Grátis]","OK","Cancelar");
  847. }
  848. }
  849. return true;
  850. }
  851. if(dialogid == 122)
  852. {
  853. if(response)
  854. {
  855. if(listitem == 0)
  856. {
  857. ShowPlayerDialog(playerid,129,DIALOG_STYLE_LIST ,"Corpo A Corpo","Soco ingles\nTaco de Golfe\nBastão da policia\nFaca\nBastão de Baseball\nKatana","OK","Cancelar");
  858. }
  859. if(listitem == 1)
  860. {
  861. ShowPlayerDialog(playerid,130,DIALOG_STYLE_LIST ,"Pistolas","9 milimetros\n9 milimetros com silenciador\nDesert Eagle","OK","Cancelar");
  862. }
  863. if(listitem == 2)
  864. {
  865. ShowPlayerDialog(playerid,131,DIALOG_STYLE_LIST ,"Shotgun","Shotgun\nShotgun de cano serrado\nShotgun de combate","OK","Cancelar");
  866. }
  867. if(listitem == 3)
  868. {
  869. ShowPlayerDialog(playerid,132,DIALOG_STYLE_LIST ,"Metralhadoras","Uzi\nMp5\nTec-9","OK","Cancelar");
  870. }
  871. if(listitem == 4)
  872. {
  873. ShowPlayerDialog(playerid,133,DIALOG_STYLE_LIST ,"Armas de Assault","AK-47\nM4","OK","Cancelar");
  874. }
  875. if(listitem == 5)
  876. {
  877. ShowPlayerDialog(playerid,134,DIALOG_STYLE_LIST ,"Rifles","Country Rifle\nSniper Rifle","OK","Cancelar");
  878. }
  879. if(listitem == 6)
  880. {
  881. ShowPlayerDialog(playerid,135,DIALOG_STYLE_LIST ,"Armas Especiais","Óculos de visão noturna[Preço 1]\nÓculos de visão térmica[Preço 1]\nCamera[Preço 1]\nExtintor de incêndio[Preço 2]\nParaquedas[Preço 6]\nMinigun[Preço 200]\nLança Chamas[Preço 200]\nRPG[Preço 150]\nHS FOGUETE[Preço 150]","OK","Cancelar");
  882. }
  883. if(listitem == 7)
  884. {
  885. ShowPlayerDialog(playerid,136,DIALOG_STYLE_LIST ,"Armas Lançaveis","Granada\nGás Lacrimogêneo\nCoquetel Motolov\nCarga Explosiva","OK","Cancelar");
  886. }
  887. if(listitem == 8)
  888. {
  889. ResetPlayerWeapons(playerid);
  890. GivePlayerWeapon(playerid,8,1);
  891. GivePlayerWeapon(playerid,22,50);
  892. GivePlayerWeapon(playerid,25,10);
  893. GivePlayerWeapon(playerid,29,100);
  894. GivePlayerWeapon(playerid,30,50);
  895. GivePlayerWeapon(playerid,16,5);
  896. SendClientMessage(playerid,vermelho,"Você recebeu o kit grátis");
  897. }
  898. }
  899. return true;
  900. }
  901. //Armas Lançaveis
  902. if(dialogid == 136)
  903. {
  904. if(response)
  905. {
  906. if(listitem == 0)
  907. {
  908. if(GetPlayerScore(playerid) <5) return SendClientMessage(playerid,vermelho,"Você não tem score suficiente");
  909. SetPlayerScore(playerid,GetPlayerScore(playerid)-5);
  910. GivePlayerWeapon(playerid,16,20);
  911. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  912. }
  913. if(listitem == 1)
  914. {
  915. if(GetPlayerScore(playerid) <5) return SendClientMessage(playerid,vermelho,"Você não tem score suficiente");
  916. SetPlayerScore(playerid,GetPlayerScore(playerid)-5);
  917. GivePlayerWeapon(playerid,17,10);
  918. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  919. }
  920. if(listitem == 2)
  921. {
  922. if(GetPlayerScore(playerid) <5) return SendClientMessage(playerid,vermelho,"Você não tem score suficiente");
  923. SetPlayerScore(playerid,GetPlayerScore(playerid)-5);
  924. GivePlayerWeapon(playerid,18,20);
  925. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  926. }
  927. if(listitem == 3)
  928. {
  929. if(GetPlayerScore(playerid) <5) return SendClientMessage(playerid,vermelho,"Você não tem score suficiente");
  930. SetPlayerScore(playerid,GetPlayerScore(playerid)-5);
  931. GivePlayerWeapon(playerid,39,25);
  932. SendClientMessage(playerid,verdeclaro,"Você recebeu sua arma");
  933. }
  934. }
  935. return true;
  936. }
  937.  
  938. if(dialogid == dialogr)
  939. {
  940. if(response)
  941. {
  942. if(aceitou == false) return SendClientMessage(playerid,verdeclaro,"Obrigado por aceitar novamente as regras");
  943. SendClientMessage(playerid,verdeclaro,"Obrigado por aceitar as regras,como recompensa ganhou +5 scores e +5000 de dinheiro");
  944. GivePlayerMoney(playerid,5000);
  945. SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
  946. aceitou = false;
  947. }
  948. else
  949. {
  950. GetPlayerName(playerid,nome,sizeof(nome));
  951. format(String,sizeof(String),"{00FF00}%s {FFFFFF}foi kickado por não aceitar as {FF0000}regras",nome);
  952. SendClientMessageToAll(-1,String);
  953. Kicka(playerid,"Foi kickado por não aceitar as regras");
  954. return 1;
  955. }
  956. }
  957. return 1;
  958. }
  959.  
  960. public OnGameModeExit()
  961. {
  962. DOF2_Exit();
  963. return 1;
  964. }
  965.  
  966. SetarPlayer(playerid)
  967. {
  968. GetPlayerName(playerid, nome, sizeof(nome));
  969. format(contastexto, sizeof(contastexto), CONTAS, nome);
  970. GivePlayerMoney(playerid, DOF2_GetInt(contastexto,"Dinheiro"));
  971. SetPlayerScore(playerid, DOF2_GetInt(contastexto,"Score"));
  972. pInfo[playerid][matou] = DOF2_GetInt(contastexto,"Matou");
  973. pInfo[playerid][morreu] = DOF2_GetInt(contastexto,"Morreu");
  974. pInfo[playerid][adm] = DOF2_GetInt(contastexto,"Adm");
  975. return 1;
  976. }
  977.  
  978.  
  979. SalvarContas(playerid)
  980. {
  981. GetPlayerName(playerid,nome,sizeof(nome));
  982. format(String,sizeof(String),CONTAS,nome);
  983. DOF2_SetInt(String,"Adm",pInfo[playerid][adm]);
  984. DOF2_SetInt(String,"Score", GetPlayerScore(playerid));
  985. DOF2_SetInt(String,"Dinheiro", GetPlayerMoney(playerid));
  986. DOF2_SetInt(String,"Matou",pInfo[playerid][matou]);
  987. DOF2_SetInt(String,"Morreu",pInfo[playerid][morreu]);
  988. DOF2_SaveFile();
  989. return 1;
  990. }
  991.  
  992.  
  993. admins(playerid)
  994. {
  995.  
  996. if(pInfo[playerid][adm] == 1)
  997. String = "Estágiario";
  998. else if(pInfo[playerid][adm] == 2)
  999. String = "Administrador";
  1000. else if(pInfo[playerid][adm] == 3)
  1001. String = "Dono";
  1002. return String;
  1003. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement