Advertisement
Guest User

Untitled

a guest
Apr 6th, 2012
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.05 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <zcmd>
  4. #include <DOF2>
  5. #include <foreach>
  6. #include <streamer>
  7.  
  8. //=========================================================== Defines ==========================================================//
  9.  
  10. #define ContasPlayer "/Contas/%s.ini"
  11. #define INPUT DIALOG_STYLE_INPUT
  12. #define MSGBOX DIALOG_STYLE_MSGBOX
  13. #define LISTA DIALOG_STYLE_LIST
  14. #define LocaldeUso IsPlayerInRangeOfPoint
  15.  
  16. //========================================================== Defines Das Cores =========================================================//
  17.  
  18. #define VERDE 0x21DD00FF
  19. #define VERMELHO 0xFF030FFF
  20. #define VERMELHO_ESCURO 0xE60000FF
  21. #define VERMELHO_CLARO 0xFB0000FF
  22. #define AMARELO 0xFFFF00FF
  23. #define LARANJA 0xF97804FF
  24. #define AZUL_CLARO 0x00C2ECFF
  25. #define ROXO 0xB360FDFF
  26. #define ROXO_CLARO 0xB8B8FFAA
  27. #define BRANCO 0xFFFFFFFF
  28. #define PRETO 0x000000FF
  29. #define AZUL 0x1229FAFF
  30. #define VERDE_CLARO 0x38FF06FF
  31. #define ROSA_SHOK 0xE100E1FF
  32. #define VERDE_ESCURO 0x008040FF
  33. #define CINZA 0xCECECEFF
  34. #define ROSA 0xD52DFFFF
  35. #define CINZA_ESCURO 0x626262FF
  36. #define VERDE_AGUA 0x03D687FF
  37.  
  38. //========================================================== Enum ==========================================================//
  39.  
  40.  
  41. enum udyalan
  42. {
  43. Admin,
  44. bool: Banido = false,
  45. Sexo
  46. };
  47. new JogadorInfo[MAX_PLAYERS][udyalan];
  48.  
  49.  
  50.  
  51. //============================================================== Forward ==============================================================//
  52.  
  53. //============================================================== News ==============================================================//
  54.  
  55. new bool: Afk[MAX_PLAYERS];
  56. new Float: x, Float:y, Float:z;
  57. new GpsComprado[MAX_PLAYERS];
  58. new TabletComprado[MAX_PLAYERS];
  59. new pm[MAX_PLAYERS];
  60. new Text: TextEmbaixo;
  61. new senha[128];
  62. new id;
  63. new PlayerPM[MAX_PLAYERS];
  64. new Adminlevel;
  65. new ComprandoArma[MAX_PLAYERS];
  66. new ErroSenha[MAX_PLAYERS];
  67.  
  68. //============================================================== Stocks =============================================================//
  69.  
  70. stock PegarNome(playerid)
  71. {
  72. new Nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
  73. return Nome;
  74. }
  75.  
  76. stock ReturnUser(Nome[])
  77. {
  78. if(IsNumeric(Nome)) return strval(Nome);
  79. for(new i = 0; i < MAX_PLAYERS; i++)
  80. {
  81. if(IsPlayerConnected(i))
  82. {
  83. new Name[24]; GetPlayerName(i,Name,24);
  84. if(strcmp(Name,Nome,true)==0) return i;
  85. }
  86. }
  87. return INVALID_PLAYER_ID;
  88. }
  89.  
  90. Salvar(playerid)
  91. {
  92. new Float:vida, Float:colete;
  93. GetPlayerHealth(playerid, vida);
  94. GetPlayerArmour(playerid, colete);
  95. GetPlayerSkin(playerid);
  96. new contas[32];
  97. format(contas, sizeof(contas), ContasPlayer, PegarNome(playerid));
  98. DOF2_SetInt(contas, "Admin", JogadorInfo[playerid][Admin]);
  99. DOF2_SetInt(contas, "Dinheiro", GetPlayerMoney(playerid));
  100. DOF2_SetFloat(contas, "Vida", vida);
  101. DOF2_SetFloat(contas, "Colete", colete);
  102. DOF2_SetInt(contas, "Score", GetPlayerScore(playerid));
  103. DOF2_SetInt(contas, "GPS", GpsComprado[playerid]);
  104. DOF2_SetInt(contas, "Tablet", TabletComprado[playerid]);
  105. DOF2_SetInt(contas, "Skin", GetPlayerSkin(playerid));
  106. DOF2_SaveFile();
  107. return true;
  108. }
  109.  
  110. Carregar(playerid)
  111. {
  112. new contas[32];
  113. format(contas, sizeof(contas),ContasPlayer,PegarNome(playerid));
  114. if(DOF2_FileExists(contas))
  115. {
  116. JogadorInfo[playerid][Admin] = DOF2_GetInt(contas, "Admin");
  117. GivePlayerMoney(playerid, DOF2_GetInt(contas, "Dinheiro"));
  118. SetPlayerHealth(playerid, DOF2_GetFloat(contas, "Vida"));
  119. SetPlayerArmour(playerid, DOF2_GetFloat(contas, "Colete"));
  120. SetPlayerScore(playerid, DOF2_GetInt(contas, "Score"));
  121. DOF2_GetInt(contas,"GPS", GpsComprado[playerid]);
  122. DOF2_GetInt(contas,"Tablet", TabletComprado[playerid]);
  123. SetPlayerSkin(playerid, DOF2_GetInt(contas, "Skin"));
  124. }
  125. return true;
  126. }
  127.  
  128. stock IsNumeric(const string[])
  129. {
  130. for (new i = 0, j = strlen(string); i < j; i++)
  131. if(string[i] > '9' || string[i] < '0') return 0;
  132.  
  133. return true;
  134. }
  135.  
  136. stock adminMessage(color, const string[])
  137. {
  138. foreach(Player, i)
  139. {
  140. if(JogadorInfo[i][Admin] > 0)
  141. {
  142. SendClientMessage(i, color, string);
  143. }
  144. }
  145. return true;
  146. }
  147.  
  148.  
  149.  
  150.  
  151. main()
  152. {
  153. print(" ");
  154. print(" ");
  155. print(" SERVIDOR CARREGADO...!");
  156. print("_____________________");
  157. print("Gamemode Criado por Udyalan");
  158. print(" ");
  159. }
  160.  
  161. public OnGameModeInit()
  162. {
  163.  
  164. DisableInteriorEnterExits();
  165. UsePlayerPedAnims();
  166. SetGameModeText("Criaçao New Pawn");
  167.  
  168. //=========================================================== TextDraw ===========================================================//
  169.  
  170. TextEmbaixo = TextDrawCreate(1.000000,435.000000, " Comandos úteis: /relatorio /admins ");
  171. TextDrawUseBox(TextEmbaixo , 1);
  172. TextDrawBoxColor(TextEmbaixo , 0x00000066);
  173. TextDrawTextSize(TextEmbaixo ,641.000000,0.000000);
  174. TextDrawAlignment(TextEmbaixo ,0);
  175. TextDrawBackgroundColor(TextEmbaixo , 0x000000ff);
  176. TextDrawFont(TextEmbaixo ,3);
  177. TextDrawLetterSize(TextEmbaixo ,0.499999,1.300000);
  178. TextDrawColor(TextEmbaixo ,0xffffffff);
  179. TextDrawSetOutline(TextEmbaixo ,1);
  180. TextDrawSetProportional(TextEmbaixo ,1);
  181. TextDrawSetShadow(TextEmbaixo ,1);
  182.  
  183. //========================================================== Fim TextDraw ==========================================================//
  184.  
  185. //========================================================== Pickups ==========================================================//
  186.  
  187. AddStaticPickup(357, 1, 1791.5205, -1164.1974, 23.8281, 0);
  188. AddStaticPickup(356, 1, 313.7375,-133.8456,999.6016, 0);
  189.  
  190. //========================================================= TextLabel =========================================================//
  191.  
  192. Create3DTextLabel("Loja de Arma Aperte\n F ou Enter para entrar", VERDE_CLARO, 1791.5205, -1164.1974, 23.8281, 5.0, 0, 0);
  193. Create3DTextLabel("Loja de Arma Aperte\n F ou Enter para usar", VERDE_CLARO, 313.7375,-133.8456,999.6016, 5.0, 0, 0);
  194.  
  195. return true;
  196. }
  197. public OnGameModeExit()
  198. {
  199. DOF2_Exit();
  200. return true;
  201. }
  202.  
  203. public OnPlayerRequestClass(playerid, classid)
  204. {
  205. return true;
  206. }
  207.  
  208. public OnPlayerConnect(playerid)
  209. {
  210. TextDrawShowForPlayer(playerid, TextEmbaixo);
  211. //=============================================== Sisteam de Login e Registro =====================================================/
  212. new contas[32], conta[32];
  213. new string4[65];
  214. format(contas, sizeof(contas),ContasPlayer,PegarNome(playerid));
  215. JogadorInfo[playerid][Banido] = DOF2_GetBool(contas, "Ban");
  216. if(JogadorInfo[playerid][Banido] == false)
  217. {
  218. if(!DOF2_FileExists(contas))
  219. {
  220. new string2[59];
  221. format(string2, sizeof(string2),"%s Bem Vindo ao Servidor Testando 123",PegarNome(playerid));
  222. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_PASSWORD,"Registro",string2,"Registrar","Cancelar");
  223. }
  224. else
  225. {
  226. new string2[59];
  227. format(string2, sizeof(string2),"%s Bem Vindo ao Servidor Testando 123",PegarNome(playerid));
  228. ShowPlayerDialog(playerid, 12, DIALOG_STYLE_PASSWORD,"Logar",string2,"Logar","Cancelar");
  229. }
  230. }
  231.  
  232. else if(JogadorInfo[playerid][Banido] == true)
  233. {
  234. format(conta, sizeof(conta),"Bans\%s.ini", PegarNome(playerid));
  235. if(DOF2_FileExists(conta))
  236. {
  237. format(string4, sizeof(string4),"Horario do Banimento %s\nMotivio do Banimento %s", DOF2_GetString(conta, "Horario do Banimento"), DOF2_GetString(conta, "Motivo do Banimento"));
  238. ShowPlayerDialog(playerid, 23, MSGBOX, "Banimento", string4, "OK","Cancelar");
  239. SendClientMessage(playerid, -1, "Você está Banido para Mais informaçoes Acesse o Forum: www.testando.132");
  240. Kick(playerid);
  241. }
  242. return true;
  243. }
  244.  
  245.  
  246. for(new i = 1; i < MAX_PLAYERS; i++)
  247. {
  248. if(IsPlayerConnected(i))
  249. {
  250. new string[85];
  251. format(string, sizeof(string), "%s Entrou no servidor Somando %i Players Online", PegarNome(playerid), i+1);
  252. SendClientMessageToAll(VERDE_CLARO, string);
  253. }
  254. return true;
  255. }
  256.  
  257.  
  258. //=============================================== Sisteam de Login e Registro FIM =================================================/
  259.  
  260. return true;
  261. }
  262. public OnPlayerDisconnect(playerid, reason)
  263. {
  264. TextDrawHideForPlayer(playerid, TextEmbaixo);
  265. Salvar(playerid);
  266. return true;
  267. }
  268.  
  269. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  270. {
  271. if(newkeys & KEY_SECONDARY_ATTACK)
  272. {
  273. if(LocaldeUso(playerid, 2.0, 1791.5205, -1164.1974, 23.8281)) //ENTRADA LOJA DE ARMA
  274. {
  275. SetPlayerPos(playerid, 314.820983,-141.431991,999.601562);
  276. SetPlayerInterior(playerid, 7);
  277. SetPlayerFacingAngle(playerid, 0);
  278. GameTextForPlayer(playerid, "Bem Vindo a Loja de Arma", 2000, 1);
  279. return true;
  280. }
  281. if(LocaldeUso(playerid, 2.0, 314.820983,-141.431991,999.6015621)) // SAIDA LOJA DE ARMA
  282. {
  283. SetPlayerPos(playerid, 1791.5205, -1164.1974, 23.8281);
  284. SetPlayerInterior(playerid, 0);
  285. SetPlayerFacingAngle(playerid, 0);
  286. return true;
  287. }
  288. if(LocaldeUso(playerid, 1.0, 313.7375,-133.8456,999.6016)) // MENU LOJA DE ARMA
  289. {
  290. ShowPlayerDialog(playerid, 16, LISTA, "Loja de Arma", "Knife \nBaseball Bat \nSilenced 9mm \nDesert Eagle \nShotgun \nCountry Rifle \nSpraycan \nParachute \nAK-47 \nM4 \nMP5", "OK", "Cancelar");
  291. return true;
  292. }
  293. return true;
  294. }
  295. return true;
  296. }
  297.  
  298. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  299. {
  300. if(!success)
  301. {
  302. new string2[41];
  303. format(string2, 46, "[ERRO] O comando %s não existe!",cmdtext); return SendClientMessage(playerid, VERDE_CLARO, string2);
  304. }
  305. return true;
  306. }
  307.  
  308. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  309. {
  310.  
  311. switch(dialogid)
  312. {
  313. case 1:
  314. {
  315. if(response)
  316. {
  317. switch(listitem)
  318. {
  319. case 0:
  320. {
  321. cmd_pm(playerid, "");
  322. }
  323. case 1:
  324. {
  325. cmd_bpm(playerid);
  326. }
  327. case 2:
  328. {
  329. cmd_verpm(playerid, "");
  330. }
  331. case 3:
  332. {
  333. cmd_vendertablet(playerid);
  334. }
  335. }
  336. }
  337. }
  338.  
  339.  
  340. case 5:
  341. {
  342. if(response == 1)
  343. {
  344. if(!IsPlayerConnected(ReturnUser(inputtext))) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  345. PlayerPM[playerid] = ReturnUser(inputtext);
  346. ShowPlayerDialog(playerid, 6 , INPUT,"Sistema de Mensagem","Digite o Texto","OK","Cancelar");
  347. }
  348. }
  349.  
  350. case 6:
  351. {
  352. if(response == 1)
  353. {
  354. new string2[75];
  355. format(string2, sizeof(string2), "{28DEFF} %s: {FFDC18} %s", PegarNome(playerid), inputtext);
  356. SendClientMessage(PlayerPM[playerid], 0xE558FFAA, string2);
  357. SendClientMessage(playerid, 0xE558FFAA, "Messagen Enviada com sucesso");
  358. }
  359. }
  360.  
  361. case 7:
  362. {
  363. if(response == 1)
  364. {
  365. new pms[60],string2[61];
  366. if(pm[id] == 0)
  367. {
  368. if(!IsPlayerConnected(ReturnUser(inputtext))) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  369. PlayerPM[playerid] = ReturnUser(inputtext);
  370. format(string2, sizeof(string2),"Nome: [%s] ID:[%i] PM: Connectado", PegarNome(id), id);
  371. strcat(pms,string2);
  372. ShowPlayerDialog(playerid, 2, MSGBOX, "PMS Desbloqueado", pms, "OK", "");
  373. }
  374. else if(pm[id] == 1)
  375. {
  376. if(!IsPlayerConnected(ReturnUser(inputtext))) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  377. PlayerPM[playerid] = ReturnUser(inputtext);
  378. format(string2, sizeof(string2),"Nome: [%s] ID:[%i] PM: Blockado", PegarNome(id), id);
  379. strcat(pms,string2);
  380. ShowPlayerDialog(playerid, 3, MSGBOX, "PMS Bloqueado", pms, "OK", "");
  381. }
  382. }
  383. }
  384.  
  385. case 11:
  386. {
  387. if(response)
  388. {
  389. if(strlen(inputtext) < 4 || strlen(inputtext) > 15)
  390. {
  391. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_PASSWORD,"Registro","Digite entre 4-15 Caracteres para se registrar","Registrar","Cancelar");
  392. }
  393. new h, m, s, a, ms, d;
  394. new contas[32];
  395. format(contas, sizeof(contas),ContasPlayer,PegarNome(playerid));
  396. if(!DOF2_FileExists(contas)) DOF2_CreateFile(contas);
  397. DOF2_SetInt(contas, "Admin",0);
  398. DOF2_SetInt(contas, "Dinheiro", 1500);
  399. GivePlayerMoney(playerid, DOF2_GetInt(contas, "Dinheiro"));
  400. DOF2_SetInt(contas, "Score", 1);
  401. SetPlayerScore(playerid, DOF2_GetInt(contas, "Score"));
  402. DOF2_SetInt(contas, "Vida", 100);
  403. SetPlayerHealth(playerid, DOF2_GetInt(contas, "Vida"));
  404. DOF2_SetInt(contas, "Colete", 100);
  405. SetPlayerArmour(playerid, DOF2_GetInt(contas, "Colete"));
  406. DOF2_SetInt(contas, "GPS", 0);
  407. DOF2_SetInt(contas, "Tablet", 0);
  408. DOF2_SetString(contas, "Senha", inputtext);
  409. new string2[32];
  410. gettime(h, m, s);
  411. getdate(a, ms, d);
  412. format(string2, sizeof(string2),"%i/%i/%i ás %i:%i:%i", d,ms,a,h,m,s);
  413. DOF2_SetString(contas,"Dia do Registro", string2);
  414. DOF2_SaveFile();
  415. new str[256];
  416. format(str, sizeof(str), "Aqui Vai umas Informaçoes \nLogin:%s\nSenha:%s\nBom Seu Cadastro Está quase completo\nPrencha algumas informaçoes para concluir seu Cadastro", PegarNome(playerid), inputtext);
  417. ShowPlayerDialog(playerid, 21, MSGBOX, "Informaçoes", str, "OK", "Sair");
  418. if(!response)
  419. {
  420. SendClientMessage(playerid, 0xFFAB10AA, "Você foi Kickado por nao se Registrar");
  421. Kick(playerid);
  422. }
  423. }
  424. }
  425.  
  426. case 21:
  427. {
  428. if(response)
  429. {
  430. ShowPlayerDialog(playerid, 22, INPUT, "Cadastro - Senha de Segurança", "Digite Sua Senha", "OK", "Cancelar");
  431. }
  432. if(!response)
  433. {
  434. Kick(playerid);
  435. }
  436. }
  437.  
  438. case 22:
  439. {
  440. if(response)
  441. {
  442. format(senha, sizeof(senha), inputtext, 0);
  443. new contas[32];
  444. format(contas, sizeof(contas), ContasPlayer, PegarNome(playerid));
  445. DOF2_SetString(contas, "Senha de Segurança", inputtext);
  446. ShowPlayerDialog(playerid, 23, LISTA, "Cadastro - Sexo", "Homem\nMulher","OK","Cancelar");
  447. }
  448. }
  449.  
  450. case 23:
  451. {
  452. switch(listitem)
  453. {
  454. case 0:
  455. {
  456. SetPlayerSkin(playerid, 23);
  457. SetSpawnInfo(playerid, 0 , 23, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
  458. SpawnPlayer(playerid);
  459. ShowPlayerDialog(playerid, 24, MSGBOX, "Cadastro - Sexo", "Cero Você é Homem Termine o Cadastro Dando OK","OK","Cancelar");
  460. }
  461. case 1:
  462. {
  463. SetSpawnInfo(playerid, 0 , 192, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
  464. SpawnPlayer(playerid);
  465. ShowPlayerDialog(playerid, 24, MSGBOX, "Cadastro - Sexo", "Cero Você é Mulher Termine o Cadastro Dando OK","OK","Cancelar");
  466. }
  467. }
  468. }
  469.  
  470. case 24:
  471. {
  472. if(response)
  473. {
  474. new h, m, s, a, ms, d, completo[256];
  475. gettime(h, m, s);
  476. getdate(a, ms, d);
  477. format(completo, sizeof(completo), "Parabens - %s, seu Cadastro está completo você já Poder Jogar\nSenha de Segurança Digitado - %s Obs: Ela sera Usado para recuperaçao de Senha\nDia de Seu Registro - %i/%i/%i ás %i:%i:%i\n\nAtt:Equipe 4fun", PegarNome(playerid), senha, d,ms,a,h,m,s);
  478. ShowPlayerDialog(playerid, 25, MSGBOX, "Cadastro - Completo", completo, "OK", "Cancelar");
  479. DOF2_SaveFile();
  480. }
  481. if(!response)
  482. {
  483. Kick(playerid);
  484. }
  485. }
  486.  
  487.  
  488. case 12:
  489. {
  490. if(response)
  491. {
  492. new contas[32];
  493. format(contas, sizeof(contas),ContasPlayer,PegarNome(playerid));
  494. if(strcmp(inputtext, DOF2_GetString(contas, "Senha"), true )== 0)
  495. {
  496. Carregar(playerid);
  497. SetSpawnInfo(playerid, 0 ,DOF2_GetInt(contas, "Skin"), 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
  498. SpawnPlayer(playerid);
  499. }
  500. else if(ErroSenha[playerid] < 4)
  501. {
  502. ErroSenha[playerid] ++;
  503. ShowPlayerDialog(playerid, 12, DIALOG_STYLE_PASSWORD,"Logar","Senha Errada Caso erre 5 Vezes Levara Ban","Logar","Cancelar");
  504. }
  505. else if(ErroSenha[playerid] == 4)
  506. {
  507. new str[64];
  508. new string2 [256];
  509. new string3 [64];
  510. new conta[32];
  511. new h, m, s, a, ms, d;
  512. gettime(h, m, s);
  513. getdate(a, ms, d);
  514. format(string2, sizeof(string2),"%s Você foi Banido do Make Your Life\n", PegarNome(playerid));
  515. strcat(str, string2);
  516. strcat(str, "Por errar a Senha 5 vezes para rever Banimento\n ");
  517. format(string2, sizeof(string2),"Horario do Banimento: %i/%i/%i ás %i:%i:%i\n", a,ms,d,h,m,s);
  518. strcat(str, string3);
  519. strcat(str, "Tire Print de Seu Banimento e Poste Forum: http://makeyourlifebr.forumeiros.com/");
  520. ShowPlayerDialog(playerid, 18, MSGBOX, "Banimento de Senha", str, "OK", "Cancelar");
  521. format(contas, sizeof(conta), ContasPlayer, PegarNome(playerid));
  522. DOF2_SetBool(conta,"Ban",JogadorInfo[id][Banido] = true);
  523. DOF2_SetString(contas,"Motivo", "Erro Senha");
  524. DOF2_SaveFile();
  525. Kick(playerid);
  526. }
  527. return true;
  528. }
  529. if(!response)
  530. {
  531. SendClientMessage(playerid, 0xFFAB10AA, "Você foi Kickado por nao se Logar");
  532. Kick(playerid);
  533. }
  534. }
  535. // ======================================================= Loja de Arma ======================================================= //
  536.  
  537. case 16:
  538. {
  539. if(response)
  540. {
  541. switch(listitem)
  542. {
  543. case 0:
  544. {
  545. SetPVarInt(playerid, "wep", 4);
  546. ComprandoArma[playerid] = 1;
  547. }
  548. case 1:
  549. {
  550. SetPVarInt(playerid, "wep", 5);
  551. ComprandoArma[playerid] = 1;
  552. }
  553. case 2:
  554. {
  555. SetPVarInt(playerid, "wep", 23);
  556. ComprandoArma[playerid] = 2;
  557. }
  558. case 3:
  559. {
  560. SetPVarInt(playerid, "wep", 24);
  561. ComprandoArma[playerid] = 2;
  562. }
  563. case 4:
  564. {
  565. SetPVarInt(playerid, "wep", 25);
  566. ComprandoArma[playerid] = 3;
  567. }
  568. case 5:
  569. {
  570. SetPVarInt(playerid, "wep", 33);
  571. ComprandoArma[playerid] = 3;
  572. }
  573. case 6:
  574. {
  575. SetPVarInt(playerid, "wep", 41);
  576. ComprandoArma[playerid] = 1;
  577. }
  578. case 7:
  579. {
  580. SetPVarInt(playerid, "wep", 46);
  581. ComprandoArma[playerid] = 1;
  582. }
  583. case 8:
  584. {
  585. SetPVarInt(playerid, "wep", 30);
  586. ComprandoArma[playerid] = 2;
  587. }
  588. case 9:
  589. {
  590. SetPVarInt(playerid, "wep", 31);
  591. ComprandoArma[playerid] = 2;
  592. }
  593. case 10:
  594. {
  595. SetPVarInt(playerid, "wep", 29);
  596. ComprandoArma[playerid] = 2;
  597. }
  598. }
  599. ShowPlayerDialog(playerid, 17, INPUT, "Muniçao", "Digite o Tanto de Muniçao","OK", "Cancelar");
  600. }
  601. }
  602.  
  603. case 17:
  604. {
  605. if(response)
  606. {
  607. if(GetPlayerMoney(playerid) < ComprandoArma[playerid] * strval(inputtext)) return SendClientMessage(playerid,-1,"Você não tem {F8000C}grana {FFFFFF}suficiente.");
  608. GivePlayerMoney(playerid, -ComprandoArma[playerid] * strval(inputtext));
  609. GivePlayerWeapon(playerid, GetPVarInt(playerid,"wep") , strval(inputtext));
  610. }
  611. }
  612.  
  613. case 19:
  614. {
  615. if(response)
  616. {
  617. new string2[128], level;
  618. JogadorInfo[playerid][Admin] = Adminlevel;
  619. format(string2, sizeof(string2),"%s é o Mais Novo Admin do Make Your Life",PegarNome(playerid));
  620. SendClientMessageToAll(AZUL_CLARO, string2);
  621. new contas[32];
  622. format(contas, sizeof(contas), ContasPlayer, PegarNome(playerid));
  623. DOF2_SetInt(contas, "Admin", level);
  624. DOF2_SaveFile();
  625. }
  626. if(!response)
  627. {
  628. new string4[70];
  629. format(string4, sizeof(string4),"%s recusou Ser Admin do Servidor 4fun", PegarNome(id));
  630. SendClientMessageToAll(LARANJA, string4);
  631. }
  632. }
  633.  
  634. }
  635. return 1;
  636. }
  637.  
  638. //======================================================== Comandos Players ========================================================//
  639. CMD:gps(playerid)
  640. {
  641. if(GpsComprado[playerid] == 1)
  642. {
  643. ShowPlayerDialog(playerid,8 ,LISTA,"Gps","Local","Aceitar","Cancelar");
  644. }
  645. else if(GpsComprado[playerid] == 0)
  646. {
  647. return SendClientMessage(playerid, VERDE_CLARO, "Você não Tem 1 GPS vá na Loja de Eletronicos e Compre 1");
  648. }
  649. return true;
  650. }
  651.  
  652.  
  653. CMD:comprargps(playerid)
  654. {
  655. if(GpsComprado[playerid] == 0)
  656. {
  657. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid,-1,"Você não tem grana suficiente.");
  658. GivePlayerMoney(playerid, -600);
  659. SendClientMessage(playerid, AZUL_CLARO, "Você Comprou 1 Gps {00FFC8}/gps");
  660. GpsComprado[playerid] = 1;
  661. }
  662. else if (GpsComprado[playerid] == 1)
  663. {
  664. SendClientMessage(playerid, -1, "Você já tem 1 GPS");
  665. }
  666. return true;
  667. }
  668.  
  669. CMD:vendergps(playerid)
  670. {
  671. if(GpsComprado[playerid] == 1)
  672. {
  673. SendClientMessage(playerid, AZUL_CLARO, "Você Vendeu Seu Gps");
  674. GpsComprado[playerid] = 0;
  675. GivePlayerMoney(playerid, 500);
  676. }
  677. else if (GpsComprado[playerid] == 0)
  678. {
  679. SendClientMessage(playerid, AZUL_CLARO, "Você Não tem 1 Gps para Vender!");
  680. }
  681. return true;
  682. }
  683.  
  684. CMD:comprartablet(playerid)
  685. {
  686. if(TabletComprado[playerid] == 0)
  687. {
  688. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid,-1,"Você não tem grana suficiente.");
  689. GivePlayerMoney(playerid, -600);
  690. TabletComprado[playerid] = 1;
  691. SendClientMessage(playerid, -1, "Você Comprou 1 Table /uasrtablet");
  692. }
  693. else if(TabletComprado[playerid] == 1)
  694. {
  695. SendClientMessage(playerid, -1, "Você já tem 1 Tablet");
  696. }
  697. return true;
  698. }
  699.  
  700. CMD:usartablet(playerid)
  701. {
  702. if(TabletComprado[playerid] == 1)
  703. {
  704. ShowPlayerDialog(playerid, 4, LISTA,"Table","Enviar Menssagen\nBloquear/Desbloquear Messagen\nVer Pm\nVender Tablet","OK","Cancelar");
  705. }
  706. else if (TabletComprado[playerid] == 0)
  707. {
  708. return SendClientMessage(playerid, VERMELHO, "Vá na Loja de Eletronicos e Compre 1");
  709. }
  710. return true;
  711. }
  712.  
  713. CMD:vendertablet(playerid)
  714. {
  715. if(TabletComprado[playerid] >= 1)
  716. {
  717. SendClientMessage(playerid, AZUL, "Você Vendeu Seu Tablet");
  718. TabletComprado[playerid] = 0;
  719. GivePlayerMoney(playerid, 500);
  720. }
  721. else if (TabletComprado[playerid] == 0)
  722. {
  723. SendClientMessage(playerid, ROXO_CLARO, "Você Não tem 1 Tablet para Vender!");
  724. }
  725. return true;
  726. }
  727.  
  728. CMD:verpm(playerid, params[])
  729. {
  730. ShowPlayerDialog(playerid, 7, INPUT, "Sistema de Ver PM","Digite o ID/NOME do Player","OK","Cacenlar");
  731. return true;
  732. }
  733.  
  734. CMD:pm(playerid, params[])
  735. {
  736. if(pm[id] == 0)
  737. {
  738. ShowPlayerDialog(playerid, 5, INPUT, "Sistema de Menssagem","Digite o ID/NOME do Player","OK","Cacenlar");
  739. }
  740. else return SendClientMessage(playerid, VERDE, "{F8000C}PM Desse Player está Bloqueado");
  741. return true;
  742. }
  743.  
  744. CMD:bpm(playerid)
  745. {
  746. if(pm[playerid] == 1)
  747. {
  748. pm[playerid] = 0;
  749. SendClientMessage(playerid, VERDE_CLARO, "PM Desbloqueado");
  750. }
  751. else if(pm[playerid] == 0)
  752. {
  753. pm[playerid] = 1;
  754. SendClientMessage(playerid, AZUL_CLARO, "PM Bloqueado para Desbloquear /bpm");
  755. }
  756. return true;
  757. }
  758.  
  759.  
  760. CMD:afk (playerid, params[])
  761. {
  762. new texto[128], string2[128];
  763. if(Afk[playerid] == true) return SendClientMessage(playerid, -1, "Você já está AFK");
  764. if(sscanf(params, "s[128]", texto)) return SendClientMessage(playerid, -1, "Use: /afk [motivo]");
  765. Afk[playerid] = true;
  766. {
  767. format(string2, sizeof(string2),"%s Ficou AFK Motivo : %s", PegarNome(playerid), texto);
  768. SendClientMessageToAll(AZUL_CLARO, string2);
  769. TogglePlayerControllable(playerid, 0);
  770. }
  771. return true;
  772. }
  773.  
  774. CMD:sairafk (playerid)
  775. {
  776. if(Afk[playerid] == false) return SendClientMessage(playerid, -1," Você não está AFK.");
  777. Afk[playerid] = false;
  778. {
  779. new string2[55];
  780. format(string2, sizeof(string2),"%s Saiu do Modo AFK", PegarNome(playerid));
  781. SendClientMessageToAll(AZUL_CLARO, string2);
  782. TogglePlayerControllable(playerid, 1);
  783. }
  784. return true;
  785. }
  786.  
  787. CMD:afks(playerid)
  788. {
  789. foreach(Player, i)
  790. {
  791. if(Afk[i] == true)
  792. {
  793. new string2[48];
  794. format(string2, sizeof(string2), "Nome: %s || Modo: Afk\n", PegarNome(i));
  795. ShowPlayerDialog(playerid, 20, DIALOG_STYLE_MSGBOX, "Sistema de Afk", string2, "OK", "");
  796. }
  797. }
  798. return true;
  799. }
  800.  
  801.  
  802. //========================================================== Comandos Admin ==========================================================//
  803.  
  804. CMD:admins (playerid)
  805. {
  806. foreach(Player, i)
  807. {
  808. if(JogadorInfo[i][Admin])
  809. {
  810. new string2[60];
  811. format(string2, sizeof(string2), "Nome: %s || Administrador Level: %i\n", PegarNome(i), JogadorInfo[i][Admin]);
  812. ShowPlayerDialog(playerid, 20, DIALOG_STYLE_MSGBOX, "Administradores Online", string2, "OK", "");
  813. }
  814. else SendClientMessage(playerid, -1, "Nenhum Administrador Online");
  815. }
  816. return true;
  817. }
  818.  
  819.  
  820. CMD:relatorio (playerid, params[])
  821. {
  822. new texto[128];
  823. if(sscanf(params, "s[128]", texto)) return SendClientMessage(playerid, -1, "Use: /relatorio [texto]");
  824. {
  825. new string2[128];
  826. format(string2, sizeof(string2), "Relatorio de: %s %s", PegarNome(playerid), texto);
  827. adminMessage(AZUL_CLARO, string2);
  828. }
  829. return true;
  830. }
  831.  
  832. CMD:kick (playerid, params[])
  833. {
  834. new texto[128];
  835. if(JogadorInfo[playerid][Admin] < 2) return SendClientMessage(playerid, -1, "Você nao é Admin ou nao é Admin level 2");
  836. if(sscanf(params, "us[128]",id, texto)) return SendClientMessage(playerid, -1, "Use: /kick [id] [motivo]");
  837. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  838. {
  839. new string2[128];
  840. format(string2, sizeof(string2),"Admin: %s Kickou %s Motivo: %s", PegarNome(playerid), PegarNome(id), texto);
  841. SendClientMessageToAll(ROXO_CLARO, string2);
  842. format(string2, sizeof(string2),"Você foi Kickado do Servidor Make Your Life\n\n\nMotivo: %s", texto);
  843. ShowPlayerDialog(playerid, 14, MSGBOX, "Sistema de kick", string2, "OK", "");
  844. Kick(id);
  845. }
  846. return true;
  847. }
  848.  
  849. CMD:desbanir (playerid, params[])
  850. {
  851. new
  852. contas[32],
  853. conta[20],
  854. h,
  855. m,
  856. s,
  857. a,
  858. ms,
  859. d,
  860. texto[128],
  861. string4[65]
  862. ;
  863. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  864. if(sscanf(params, "s[20]s[128]", conta, texto)) return SendClientMessage(playerid, -1, "Use: /desbanir [nome] [motivo]");
  865. format(contas, sizeof(contas), ContasPlayer, conta);
  866. if(!DOF2_FileExists(contas)) return SendClientMessage(playerid, -1, "Esta conta nao está banida");
  867. DOF2_Unset(contas, "Ban");
  868. format(contas, sizeof(contas),"Desbanido/%s.ini", conta);
  869. gettime(h, m, s);
  870. getdate(a, ms, d);
  871. if(!DOF2_FileExists(contas))
  872. {
  873. DOF2_CreateFile(contas);
  874. format(string4, sizeof(string4),"%i/%i/%i As %i:%i:%i", a,ms,d,h,m,s);
  875. DOF2_SetString(contas, "Horario do Desbanimento", string4);
  876. DOF2_SetString(contas, "Motivo do Desbanimento", texto);
  877. }
  878. new fn[60];
  879. format(fn, sizeof(fn), "%s Debaniu o Player - %s", PegarNome(playerid), conta);
  880. SendClientMessageToAll(VERDE, fn);
  881. DOF2_SaveFile();
  882. return true;
  883. }
  884.  
  885. CMD:lojadearma (playerid)
  886. {
  887. SetPlayerPos(playerid, 1791.5205, -1164.1974, 23.8281);
  888. SendClientMessage(playerid, -1, "voce foi na loja de arma");
  889. return true;
  890. }
  891.  
  892. CMD:ban (playerid, params[])
  893. {
  894. new h, m, s, a, ms, d, texto[128];
  895. new strcat2[128];
  896. new string3[50];
  897. new string4[50];
  898. new conta[32];
  899. new string2[85];
  900. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  901. if(sscanf(params, "us[128]",id, texto)) return SendClientMessage(playerid, -1, "Use: /ban [id] [motivo]");
  902. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  903. {
  904. format(string2, sizeof(string2),"Admin: %s Baniu: %s [%i] Motivo:%s", PegarNome(playerid),PegarNome(id),id,texto);
  905. SendClientMessageToAll(-1, string2);
  906. format(string2, sizeof(string2),"%s Você foi banido do Servidor \n", PegarNome(id));
  907. strcat(strcat2, string2);
  908. format(string3, sizeof(string3),"Pelo Admin: %s",PegarNome(playerid));
  909. strcat(strcat2, string3);
  910. gettime(h, m, s);
  911. getdate(a, ms, d);
  912. format(string4, sizeof(string4),"%i/%i/%i As %i:%i:%i\n", a,ms,d,h,m,s);
  913. strcat(strcat2, string4);
  914. ShowPlayerDialog(id, 13, MSGBOX, "Sistema de Ban",strcat2, "OK", "");
  915. new contas[32];
  916. format(contas, sizeof(contas),ContasPlayer, PegarNome(id));
  917. DOF2_SetBool(contas,"Ban",JogadorInfo[id][Banido] = true);
  918. format(conta, sizeof(conta),"Bans/%s.ini", PegarNome(id));
  919. if(!DOF2_FileExists(conta)) DOF2_CreateFile(conta);
  920. {
  921. format(string4, sizeof(string4),"%i/%i/%i As %i:%i:%i", a,ms,d,h,m,s);
  922. DOF2_SetString(conta, "Horario do Banimento", string4);
  923. DOF2_SetString(conta, "Motivo do Banimento", texto);
  924. }
  925. DOF2_SaveFile();
  926. Kick(id);
  927. }
  928. return true;
  929. }
  930.  
  931. CMD:ir (playerid, params[])
  932. {
  933. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  934. if(sscanf(params, "u",id)) return SendClientMessage(playerid, -1, "Use: /ir [id]");
  935. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  936. GetPlayerPos(id, Float:x, Float:y, Float:z);
  937. if(IsPlayerInAnyVehicle(playerid))
  938. {
  939. new VehicleID = GetPlayerVehicleID(playerid);
  940. SetVehiclePos(VehicleID, x, y, z);
  941. LinkVehicleToInterior(VehicleID, GetPlayerInterior(id));
  942. }
  943. else
  944. SetPlayerPos(playerid, x, y, z);
  945. new string2[70];
  946. new string3[55];
  947. format(string2, sizeof(string2), "{AC98FF}Admin: {28DEFF}%s {AC98FF}foi Até você", PegarNome(playerid));
  948. SendClientMessage(id, -1, string2);
  949. format(string3, sizeof(string3), "{AC98FF}Você foi até : {28DEFF}%s",PegarNome(id));
  950. SendClientMessage(playerid, -1, string3);
  951. return true;
  952. }
  953.  
  954. CMD:trazer (playerid, params[])
  955. {
  956. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  957. if(sscanf(params, "u",id)) return SendClientMessage(playerid, -1, "Use: /ir [id]");
  958. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  959. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  960. if(IsPlayerInAnyVehicle(id))
  961. {
  962.  
  963. new VehicleID = GetPlayerVehicleID(id);
  964. SetVehiclePos(VehicleID, x, y, z);
  965. LinkVehicleToInterior(VehicleID, GetPlayerInterior(playerid));
  966. }
  967. else
  968. SetPlayerPos(id, x, y, z);
  969. new string2[68];
  970. new string3[55];
  971. format(string2, sizeof(string2), "{AC98FF}Admin: {28DEFF}%s {AC98FF}Lhe puxou", PegarNome(playerid));
  972. SendClientMessage(id, -1, string2);
  973. format(string3, sizeof(string3), "{AC98FF}Você puxou: {28DEFF}%s ",PegarNome(id));
  974. SendClientMessage(playerid, -1, string3);
  975. return true;
  976. }
  977.  
  978. CMD:av (playerid, params[])
  979. {
  980. new texto[50];
  981. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  982. if(sscanf(params, "s[128]",texto)) return SendClientMessage(playerid, -1, "Use: /av [texto]");
  983. SendClientMessageToAll(0xFFFBF8AA, "|_ {3AFF30}M {F8000C}Y {0808FF}L {FFFFFF}_[ {FFC400}Aviso Dos Admins {FFFFFF}]_ {3AFF30}M {F8000C}Y {0808FF}L {FFFFFF}_|");
  984. new string2[70];
  985. format(string2, sizeof(string2), "{28DEFF}%s : {ABFC9D}%s", PegarNome(playerid), texto);
  986. SendClientMessageToAll(AZUL_CLARO, string2);
  987. return true;
  988. }
  989.  
  990. CMD:daradmin(playerid, params[])
  991. {
  992. new level;
  993. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Você não é um admin RCON.");
  994. if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid, VERDE_CLARO, "Use /daradmin [ID] [Level]");
  995. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  996. if(level < 1 || level > 5) return SendClientMessage(playerid,-1,"Use de 1 à 5 levels");
  997. JogadorInfo[id][Admin] = level;
  998. Adminlevel = level;
  999. new str[128], string2[128], string3[128];
  1000. format(string3, sizeof(string3), "Admin: %s ofereceu Admin Level: %i á %s", PegarNome(playerid), level, PegarNome(id));
  1001. SendClientMessageToAll(CINZA, string3);
  1002. format(string2, sizeof(string2), "Admin: %s Deseja lhe dar Admin Level: %i\n\n", PegarNome(playerid), level);
  1003. strcat(str, string2);
  1004. strcat(str, "\nCaso deseje Aceitar Ser Administrador click em Aceitar caso deseje Recusar click em Recusar");
  1005. ShowPlayerDialog(id, 19, MSGBOX, "Sistema Dar Admin", str, "Aceitar", "Recusar");
  1006. return true;
  1007. }
  1008.  
  1009. CMD:darvida (playerid, params[])
  1010. {
  1011. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  1012. new Float:hp;
  1013. if(sscanf(params, "uf", id, hp)) return SendClientMessage(playerid, AZUL_CLARO, "Use: /darvida [id] [vida]");
  1014. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  1015. if(hp < 1 || hp > 100) return SendClientMessage(playerid, -1, "Minimo: 1 - Maximo: 100");
  1016. SetPlayerHealth(id, hp);
  1017. return true;
  1018. }
  1019.  
  1020. CMD:darcolete (playerid, params[])
  1021. {
  1022. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  1023. new Float:colete;
  1024. if(sscanf(params, "if", id, colete)) return SendClientMessage(playerid, -1, "Use: /darcolete [id] [colete]");
  1025. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  1026. if(colete < 1 || colete > 100) return SendClientMessage(playerid, AZUL_CLARO, "Minimo: 1 - Maximo: 100");
  1027. SetPlayerArmour(id, colete);
  1028. return true;
  1029. }
  1030.  
  1031. CMD:explodir(playerid, params[])
  1032. {
  1033. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  1034. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  1035. if(sscanf(params, "i", id)) return SendClientMessage(playerid, ROXO_CLARO, "/porfogo [id]");
  1036. GetPlayerPos(id, x, y, z);
  1037. CreateExplosion(x, y, z, 3, 5.0);
  1038. new string2[50];
  1039. format(string2, sizeof(string2), "O Admin: %s Explodiu: %s",PegarNome(playerid), PegarNome(id));
  1040. SendClientMessageToAll(VERDE_CLARO, string2);
  1041. return true;
  1042. }
  1043. CMD:dararma (playerid, params[])
  1044. {
  1045. new arma, municao;
  1046. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Você não é um Admin");
  1047. if(sscanf(params, "uii", id, arma, municao)) return SendClientMessage(playerid, -1, "Use: /dararma [id] [arma] [munição]");
  1048. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xAC98FFAA, "Player Não Connectado");
  1049. if(arma < 1 || arma > 46) return SendClientMessage(playerid, AZUL_CLARO, "Minimo: 1 Maximo: 46");
  1050. if(municao < 1 || municao > 9999) return SendClientMessage(playerid, -1, "Minimo: 1 Maximo: 9999");
  1051. GivePlayerWeapon(id, arma, municao);
  1052. return true;
  1053. }
  1054.  
  1055. CMD:veh (playerid, params[])
  1056. {
  1057. new car, cor1, cor2;
  1058. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1059. if(sscanf(params, "iii", car, cor1, cor2)) return SendClientMessage(playerid, -1, "Use: /veh [id Carro] [Cor 1] [Cor 2]");
  1060. if(car < 400 || car > 611) return SendClientMessage(playerid, -1, "Erro Veículo: 400 à 611.");
  1061. GetPlayerPos(playerid, x, y, z);
  1062. new carid = CreateVehicle(car,x, y, z, 0.0, cor1, cor2, 99999999999);
  1063. LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
  1064. SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
  1065. PutPlayerInVehicle(playerid, car, 0);
  1066. new string2[45];
  1067. format(string2, sizeof(string2), "Veiculo de ID: %i Criado Carro id: %i", carid, car);
  1068. SendClientMessage(playerid, ROXO_CLARO, string2);
  1069. return true;
  1070. }
  1071.  
  1072. CMD:tempo (playerid, params[])
  1073. {
  1074. new tempo;
  1075. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1076. if(sscanf(params, "i", tempo)) return SendClientMessage(playerid, -1, "Use: /tempo [id]");
  1077. if(tempo < 1 || tempo > 45) return SendClientMessage(playerid, -1, "Erro Tempo: 1-45.");
  1078. SetWeather(tempo);
  1079. new string2[55];
  1080. format(string2, sizeof(string2), "Admin: %s Setou o Tempo para: %i", PegarNome(playerid), tempo);
  1081. SendClientMessageToAll(AZUL_CLARO, string2);
  1082. return true;
  1083. }
  1084.  
  1085. CMD:dargrana (playerid, params[])
  1086. {
  1087. new grana;
  1088. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1089. if(sscanf(params, "ui", id, grana)) return SendClientMessage(playerid, -1, "Use: /dargrana [id] [grana]");
  1090. if(grana < 1 || grana > 99999999) return SendClientMessage(playerid, -1, "Erro Grana: 1-9999999.");
  1091. GivePlayerMoney(id, grana);
  1092. new string2[58];
  1093. format(string2, sizeof(string2), "Admin: %s te deu %i de Dinheiro", PegarNome(playerid), grana);
  1094. SendClientMessage(id, VERDE_CLARO, string2);
  1095. return true;
  1096. }
  1097.  
  1098. CMD:setgrana (playerid, params[])
  1099. {
  1100. new grana;
  1101. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1102. if(sscanf(params, "ui", id, grana)) return SendClientMessage(playerid, -1, "Use: /setgrana [id] [grana]");
  1103. if(grana < 1 || grana > 9999999) return SendClientMessage(playerid, -1, "Erro Set Grana: 1-9999999.");
  1104. GivePlayerMoney(id, -grana);
  1105. new string2[39];
  1106. format(string2, sizeof(string2), "Admin: %s Tirou %i de sua grana", PegarNome(playerid), grana);
  1107. SendClientMessage(id, AZUL_CLARO, string2);
  1108. return true;
  1109. }
  1110.  
  1111. CMD:tapa (playerid, params[])
  1112. {
  1113. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1114. if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Use: /tapa [id]");
  1115. GetPlayerPos(id, x, y, z);
  1116. SetPlayerPos(id, x, y, z+12);
  1117. new string2[77];
  1118. format(string2, sizeof(string2), "%s Ganhou 1 tapa do Admin: %s", PegarNome(id), PegarNome(playerid));
  1119. SendClientMessageToAll(ROXO_CLARO, string2);
  1120. return true;
  1121. }
  1122.  
  1123. CMD:matar (playerid, params[])
  1124. {
  1125. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1126. if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Use: /matar [id]");
  1127. SetPlayerHealth(id, 0.0);
  1128. new string2[38];
  1129. new string3[35];
  1130. format(string2, sizeof(string2), "Admin: %s Te Matou",PegarNome(playerid));
  1131. SendClientMessage(id, VERDE_CLARO, string2);
  1132. format(string3, sizeof(string3), "Você matou: %s",PegarNome(id));
  1133. SendClientMessage(id,AZUL_CLARO, string3);
  1134. return true;
  1135. }
  1136.  
  1137. CMD:tapao (playerid, params[])
  1138. {
  1139. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1140. if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Use: /tapao [id]");
  1141. GetPlayerPos(id, x, y, z);
  1142. SetPlayerPos(id, x, y, z+100);
  1143. new string2[75];
  1144. format(string2, sizeof(string2), "%s Ganhou 1 tapao do Admin: %s", PegarNome(id), PegarNome(playerid));
  1145. SendClientMessageToAll( AZUL_CLARO, string2);
  1146. return true;
  1147. }
  1148.  
  1149. CMD:congelar (playerid, params[])
  1150. {
  1151. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1152. if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Use: /congelar [id]");
  1153. TogglePlayerControllable(id, 0);
  1154. new string2[79];
  1155. format(string2, sizeof(string2), "%s Foi congelado pelo Admin: %s", PegarNome(id), PegarNome(playerid));
  1156. SendClientMessageToAll(AZUL_CLARO, string2);
  1157. return true;
  1158. }
  1159.  
  1160. CMD:descongelar (playerid, params[])
  1161. {
  1162. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1163. if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Use: /congelar [id]");
  1164. TogglePlayerControllable(id, 1);
  1165. new string2[82];
  1166. format(string2, sizeof(string2), "%s Foi Descongelado pelo Admin: %s", PegarNome(id), PegarNome(playerid));
  1167. SendClientMessageToAll(AZUL_CLARO, string2);
  1168. return true;
  1169. }
  1170.  
  1171. CMD:setskin (playerid, params[])
  1172. {
  1173. new skin;
  1174. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1175. if(sscanf(params, "ui", id, skin)) return SendClientMessage(playerid, -1, "Use: /setskin [id] [id skin]");
  1176. if(skin < 1 || skin > 299) return SendClientMessage(playerid, -1, "Erro Skin: 1-299.");
  1177. SetPlayerSkin(id, skin);
  1178. new string2[50];
  1179. format(string2, sizeof(string2), "%s Mudou sua Skin para: %i",PegarNome(playerid) ,skin);
  1180. SendClientMessage(id, VERDE_CLARO, string2);
  1181. format(string2, sizeof(string2), "Você mudou a Skin de: %s",PegarNome(id));
  1182. SendClientMessage(playerid, ROXO_CLARO, string2);
  1183. return true;
  1184. }
  1185.  
  1186. CMD:retirararmas (playerid, params[])
  1187. {
  1188. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1189. if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Use: /retirararmas [id]");
  1190. ResetPlayerWeapons(id);
  1191. new string2[59];
  1192. format(string2, sizeof(string2), "Admin: %s Retirou todas suas armas.",PegarNome(playerid));
  1193. SendClientMessage(id, ROXO_CLARO, string2);
  1194. format(string2, sizeof(string2), "Você retirou todas armas de: %s",PegarNome(id));
  1195. SendClientMessage(playerid, ROXO_CLARO, string2);
  1196. return true;
  1197. }
  1198.  
  1199. CMD:retirararmasall (playerid, params[])
  1200. {
  1201. if(JogadorInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "Erro: Você não é admin!!.");
  1202. for(new i=0;i<MAX_PLAYERS;i++)
  1203. ResetPlayerWeapons(i);
  1204. new string2[72];
  1205. format(string2, sizeof(string2), "Admin: %s Retirou Armas de Todo Mundo do Server!",PegarNome(playerid));
  1206. SendClientMessageToAll( VERDE, string2);
  1207. SendClientMessage(playerid, VERDE_CLARO, "Você retirou todas armas do Server");
  1208. return true;
  1209. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement