Advertisement
Guest User

Base RPG - iou dogi havi a phoni?

a guest
May 19th, 2012
2,825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 174.83 KB | None | 0 0
  1. //Atualizado DOF2
  2. // Créditos: dPlaYer_ ( [LF]PlaYer )  
  3. #include <a_samp>
  4. #include <zcmd>
  5. #include <sscanf2>
  6. #include <DOF2>
  7.  
  8. #define DIRETORIO  "/Jogadores/%s.ini"
  9. #define DBANCO  "/Jogadores/Banco/%s.ini"
  10.  
  11. #define paislogin    1996
  12. #define REGISTRO     1997
  13. #define LOGIN        1998
  14. #define SPAWNJ       1999
  15.  
  16. #define pMenuProf    5059
  17. #define pHonestas    5060
  18. #define pHonestas2   5061
  19. #define pCriminosas  5062
  20. #define pGoverno     5063
  21. #define pMafia       5064
  22. #define pTransporte  5065
  23.  
  24. #define MenuBancoH   5024
  25.  
  26. //======= [ Cores ] =====
  27. #define Vermelho                    0xFF0000AA
  28. #define Branco                      0xFFFFFFAA
  29. #define newadm                      0x46BBAA00
  30. #define Amarelo                     0xFFFF00FF
  31. #define Verde                       0x00D700AA
  32. #define Green                       0x16EB43FF
  33. #define Red                         0xff0000ff
  34. #define Laranja                     0xFF6600AA
  35. //========== [ Salarios ] ==========
  36. #define SeguroDesemprego    65
  37. #define Salario_Caminhao    600
  38. #define Salario_MTaxi       450
  39. #define Salario_Taxi        480
  40. #define Salario_Maquinista  450
  41. #define Salario_PolicialM   1200
  42. #define Salario_PolicialC   1400
  43. #define Salario_PolicialF   1500
  44. #define Salario_VDrogas     800
  45. #define Salario_TrafArmas   1150
  46. #define Salario_GuardaTr    810
  47. #define Salario_Advogado    1500
  48. #define Salario_VSorvete    250
  49. #define Salario_Paramedico  950
  50. #define Salario_Hacker      1240
  51.  
  52. #define Fianca              4500
  53. #define MAX_TEMPO_AFK       5
  54. #define MAX_CARROS          350
  55.  
  56. #define VALOR_LITRO 2.0                           //- Definir valor por litro da gasolina
  57. #define DIALOG_GAS  24                            //- ID Do Dialog para Colocar Gasolina
  58. //========== [ Empregos ] ==========
  59. #define Desempregado    0
  60. #define Caminhoneiro    1
  61. #define MotoTaxi        2
  62. #define Taxista         3
  63. #define Maquinista      4
  64. #define PolicialM       5
  65. #define PolicialC       6
  66. #define PolicialF       7
  67. #define VDrogas         8
  68. #define TrafArmas       9
  69. #define GuardaTransito  10
  70. #define Advogado        11
  71. #define VSorvete        12
  72. #define Paramedico      13
  73. #define Hacker          14
  74.  
  75. new pGasolina[MAX_PLAYERS];
  76.  
  77. new Text:gText3[MAX_PLAYERS];
  78. new Text:TGasosa[MAX_PLAYERS];
  79. new Text:BemVindo;
  80. new Text:ImagemConnect;
  81.  
  82. new proximocarro;
  83. new incar[MAX_PLAYERS];
  84. new scar[MAX_PLAYERS];
  85.  
  86. new AreaPosto[MAX_PLAYERS];
  87.  
  88. //========= [ Portões ] ==========
  89. new PortaoDP;
  90. new PortaoDP2;
  91. new ElevadorDP;
  92. new ElevadorCima = 0;
  93. new PortaoAberto = 0;
  94. new Portao2Aberto = 0;
  95. //========= [ Pickups ] ==========
  96. new EntrarPref;
  97. new SaidaPref;
  98. //===========[ Forwards ]===========
  99. forward PostosG();
  100. forward Gasolina();
  101. forward IsNumeric(const string[]);
  102. forward CriarVeiculo2(m,Float:x,Float:y,Float:z,Float:r,c,d);
  103. forward Liberar(playerid);
  104. forward LoteriaPublic();
  105. forward AntAfk(playerid);
  106. forward GanharExp(playerid);
  107. forward CheckCurriculo(playerid);
  108. forward ReprovarC(playerid);
  109. forward ChecarPing(playerid);
  110. forward AtualizarGrana();
  111. forward TempoExpMinuto();
  112. forward BanLog(string[]);
  113. forward PayDay();
  114. forward AtualizarChatBubble();
  115. forward LogarProf(playerid);
  116. forward AcessoBanco(playerid);
  117. forward Firewall(playerid);
  118. forward FirewallLigado();
  119. forward Avisado(playerid);
  120. forward LimiteGrana(playerid);
  121.  
  122. new Mutecmd[MAX_PLAYERS]= 0;
  123. new Aviso[MAX_PLAYERS]= 0;
  124.  
  125. //======[ Roubo ao Banco ]======
  126. new Assalto[MAX_PLAYERS] = 0;
  127. new FirewallOn[MAX_PLAYERS] = 0;
  128. new RoubarBanco[MAX_PLAYERS] = 0;
  129. new KillFirewall[MAX_PLAYERS];
  130. new bool:AcessoOn[MAX_PLAYERS];
  131. new KillAcesso;
  132. new KillFirewallOn;
  133. new KillFirewallOn2;
  134. new KillFirewallOn3;
  135. new KillTransferencia;
  136. new cudigos[MAX_PLAYERS];
  137. new Codigos[4][256] =
  138. {
  139.     "TROLLED",
  140.     "MEGUSTA",
  141.     "POKERFC",
  142.     "NOKUZIN"
  143. };
  144. //=====[ S. Caças ]=====
  145. //new CacaInProgress[MAX_PLAYERS] = 0;
  146. //new QtCacas[MAX_PLAYERS] = 0;
  147. //=====[ S. Caças ]=====
  148.  
  149. new vfile[128];
  150. new StringLg[256];
  151.  
  152. new Preso[MAX_PLAYERS]= 0;
  153. new TempoPreso[MAX_PLAYERS] = 0;
  154.  
  155. new Autorizado[MAX_PLAYERS];
  156.  
  157. new bool:SenhaBanco[MAX_PLAYERS];
  158. new LogadoBanco[MAX_PLAYERS];
  159.  
  160. new podedm;
  161.  
  162. // == Loteria ==
  163. new NumeroLoto[MAX_PLAYERS];
  164. new TGanhador;
  165. new DinheiroAcumuladoLoto;
  166. new vernumerosorteado[MAX_PLAYERS];
  167. new TaJogando[MAX_PLAYERS];
  168.  
  169. new PlanoMedico[MAX_PLAYERS] = 0;
  170.  
  171. new pAdmin[MAX_PLAYERS];
  172.  
  173. // Level Systen
  174. new Experiencia[MAX_PLAYERS];
  175. new pLevel[MAX_PLAYERS];
  176. new TempoLevelMinuto[MAX_PLAYERS];
  177.  
  178. //=== [ Profissão ] ===
  179. new Profissao[MAX_PLAYERS];
  180. new reprovado[MAX_PLAYERS], aprovado[MAX_PLAYERS];
  181.  
  182. new GranaEx[MAX_PLAYERS];
  183.  
  184. enum pInfo
  185. {
  186.     Logado,
  187.     pBrasil,
  188.     pPortugal
  189. }
  190.  
  191. new pFase[MAX_PLAYERS][pInfo];
  192.  
  193. enum pPos
  194. {
  195.     Float:LastX,
  196.     Float:LastY,
  197.     Float:LastZ,
  198. }
  199. new
  200.     PlayerLastPos[MAX_PLAYERS][pPos],
  201.     PlayerAfkTicks[MAX_PLAYERS],
  202.     pAFK[MAX_PLAYERS],
  203.     Text:AfkText,
  204.     Text:AfkBackText,
  205.     Float:PlayerPosAfk[3];
  206.  
  207. main(){}
  208.  
  209. public OnGameModeInit()
  210. {
  211.     print("\n\nººººººººººººº ** Servidor Ligado ** ººººººººººººº\n\n");
  212.     SendRconCommand("hostname * Base RPG [RPG v1.0 - 2012] *");
  213.     SendRconCommand("mapname Brasil RPG");
  214.     SetGameModeText("Base RPG v1.0");
  215.     //textdrawns
  216.     for (new i=0;i<MAX_PLAYERS;i++)
  217.     {
  218.  
  219.         gText3[i] = TextDrawCreate(498.000000, 75.000000, "~g~$~w~000000000");
  220.         TextDrawBackgroundColor(gText3[i], 255);
  221.         TextDrawFont(gText3[i], 3);
  222.         TextDrawLetterSize(gText3[i], 0.559998, 2.599998);
  223.         TextDrawColor(gText3[i], -1);
  224.         TextDrawSetOutline(gText3[i], 0);
  225.         TextDrawSetProportional(gText3[i], 1);
  226.         TextDrawSetShadow(gText3[i], 1);
  227.  
  228.         TGasosa[i] = TextDrawCreate(30,326, " ");
  229.         TextDrawFont(TGasosa[i],1);
  230.         TextDrawBackgroundColor(TGasosa[i], 0x000000FF);
  231.         TextDrawSetOutline(TGasosa[i], 1);
  232.         TextDrawColor(TGasosa[i], 0xFFFFFFFF);
  233.         TextDrawShowForPlayer (i, TGasosa[i]);
  234.  
  235.     }
  236.     //-
  237.     if(!fexist("Banidos.ini")) DOF2_CreateFile("Banidos.ini");
  238.     new string[256];
  239.     for(new carro = 0; carro < MAX_CARROS; carro++)
  240.     {
  241.         format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  242.         if(DOF2_FileExists(string))
  243.         {
  244.             new carroid;
  245.             //carroid = AddStaticVehicle(DOF2_GetInt(string, "Modelo"), DOF2_GetFloat(string, "CordX"), DOF2_GetFloat(string, "CordY"), DOF2_GetFloat(string, "CordZ"), DOF2_GetFloat(string, "Angulo"), DOF2_GetInt(string, "Cor1"), DOF2_GetInt(string, "Cor2"));
  246.             DOF2_SetInt(string, "Id", carroid);
  247.             //SetVehicleNumberPlate(carro, "{FF0000}[ {000000}Sem Dono {FF0000}]");
  248.             SetVehicleNumberPlate(carroid = CreateVehicle(DOF2_GetInt(string,"Modelo"), DOF2_GetFloat(string,"CordX"), DOF2_GetFloat(string,"CordY"), DOF2_GetFloat(string,"CordZ"), DOF2_GetFloat(string,"Angulo"), DOF2_GetInt(string,"Cor1"), DOF2_GetInt(string,"Cor2"),9999999), DOF2_GetString(string,"Placa"));
  249.             proximocarro++;
  250.         }
  251.     }
  252.     UsePlayerPedAnims();
  253.     DisableInteriorEnterExits();
  254.     EnableStuntBonusForAll(0);
  255.     TGanhador = 0;
  256. //    LotoQuantiaGrana = DinheiroLotoSortear();
  257.     SetTimers();
  258.     TempoExpMinuto();
  259.     //=== [ Pickups ] ====
  260.     EntrarPref = CreatePickup(1239, 1318, 1480.8987, -1770.6410, 18.7958, -1);
  261.     SaidaPref = CreatePickup(1239, 1318, 389.3070, 173.6391, 1008.3828, -1);
  262.     //=== [ 3d Label ] ===
  263.     Create3DTextLabel("Prefeitura\nDe\nLos Santos",-1,1480.8987, -1770.6410, 18.7958,60.0,0);// Prefeitura Entrada
  264.     Create3DTextLabel("Saida",-1,389.3070, 173.6391, 1008.3828,60.0,0);// Prefeitura Saida
  265.     Create3DTextLabel("\n/profissoes",-1,362.4499,173.8849,1008.3828,60.0,0);// comando pra peg
  266.     //===[ Textdraws' ] ===
  267.     AfkText = TextDrawCreate(168.000000,319.000000,"Voce esta bloqueado de upar!");
  268.     TextDrawAlignment(AfkText,0);
  269.     TextDrawBackgroundColor(AfkText,0x000000ff);
  270.     TextDrawFont(AfkText,1);
  271.     TextDrawLetterSize(AfkText,1.000000,2.699999);
  272.     TextDrawColor(AfkText,0xffffffff);
  273.     TextDrawSetOutline(AfkText,1);
  274.     TextDrawSetProportional(AfkText,1);
  275.     TextDrawSetShadow(AfkText,1);
  276.  
  277.     BemVindo = TextDrawCreate(168.000000,319.000000,"  ~b~Base RPG [v1.0]");
  278.     TextDrawAlignment(BemVindo,0);
  279.     TextDrawBackgroundColor(BemVindo,0x000000ff);
  280.     TextDrawFont(BemVindo,1);
  281.     TextDrawLetterSize(BemVindo,1.000000,2.699999);
  282.     TextDrawColor(BemVindo,0xffffffff);
  283.     TextDrawSetOutline(BemVindo,1);
  284.     TextDrawSetProportional(BemVindo,1);
  285.     TextDrawSetShadow(BemVindo,1);
  286.  
  287.     ImagemConnect = TextDrawCreate(1.000000, -1.000000, "loadsuk:loadsc6");
  288.     TextDrawBackgroundColor(ImagemConnect, 255);
  289.     TextDrawFont(ImagemConnect, 4);
  290.     TextDrawLetterSize(ImagemConnect, 0.500000, 1.000000);
  291.     TextDrawColor(ImagemConnect, -1);
  292.     TextDrawSetOutline(ImagemConnect, 0);
  293.     TextDrawSetProportional(ImagemConnect, 1);
  294.     TextDrawSetShadow(ImagemConnect, 1);
  295.     TextDrawUseBox(ImagemConnect, 1);
  296.     TextDrawBoxColor(ImagemConnect, 255);
  297.     TextDrawTextSize(ImagemConnect, 645.000000, 450.000000);
  298.  
  299.     AfkBackText = TextDrawCreate(248.000000,351.000000,"Para ser desbloqueado de upar Use: ~r~/~w~sairafk");
  300.     TextDrawAlignment(AfkBackText,0);
  301.     TextDrawBackgroundColor(AfkBackText,0x000000ff);
  302.     TextDrawFont(AfkBackText,1);
  303.     TextDrawLetterSize(AfkBackText,0.299999,1.100000);
  304.     TextDrawColor(AfkBackText,0xffffffff);
  305.     TextDrawSetOutline(AfkBackText,1);
  306.     TextDrawSetProportional(AfkBackText,1);
  307.     TextDrawSetShadow(AfkBackText,1);
  308.     //-
  309.     PortaoDP = CreateObject(980,1540.68652344,-1627.59179688,15.15620422,0.00000000,0.00000000,90.00000000);
  310.     PortaoDP2 = CreateObject(980,1589.98474121,-1638.26818848,15.21242142,0.00000000,0.00000000,359.99523926); //object(airportgate) (1)
  311.     ElevadorDP = CreateObject(976,1561.68164062,-1641.38964844,12.56751347,270.79650879,0.00000000,90.00000000); //object(phils_compnd_gate)
  312.     for(new i=1; i<MAX_VEHICLES; i++)
  313.     {
  314.         SetVehicleNumberPlate(i, "{FF0000}[ {000000}BaseRPG {FF0000}]");
  315.     }
  316.     return 1;
  317. }
  318.  
  319. public OnGameModeExit()
  320. {
  321.     DOF2_Exit();
  322.     return 1;
  323. }
  324.  
  325. public OnRconLoginAttempt(ip[], password[], success)
  326. {
  327.     if(!success)
  328.     {
  329.         printf("Rcon Errada!! - IP %s - Senha Usada: %s",ip, password);
  330.         new pip[16];
  331.         for(new i=0; i<MAX_PLAYERS; i++)
  332.         {
  333.             GetPlayerIp(i, pip, sizeof(pip));
  334.             if(!strcmp(ip, pip, true))
  335.             {
  336.                 SendClientMessage(i, 0xFFFFFFFF, "Senha Errada!. Bye!");
  337.                 Kick(i);
  338.             }
  339.         }
  340.     }
  341.     return 1;
  342. }
  343.  
  344. public OnPlayerRequestClass(playerid, classid)
  345. {
  346.     TextDrawShowForPlayer(playerid, ImagemConnect);
  347.     TextDrawShowForPlayer(playerid, BemVindo);
  348.     if(pFase[playerid][Logado] == 0)
  349.     {
  350.         ShowPlayerDialog(playerid, SPAWNJ, DIALOG_STYLE_MSGBOX,"Registro/Login", "Bem Vindo Ao servidor!\nClique em continuar para prosseguir o seu registro/login!", "Continuar", "");
  351.         SetPlayerCameraPos(playerid,2683.2480,-1676.5824,36.8194);
  352.         SetPlayerCameraLookAt(playerid,2686.4868,-1680.4825,36.8194);
  353.         SetPlayerPos(playerid, 2701.9219,-1697.5417,30.5223);
  354.         SetPlayerInterior(playerid, 0);
  355.         SetPlayerSkin(playerid, 70);
  356.         TextDrawHideForPlayer(playerid, gText3[playerid]);
  357.         ApplyAnimation(playerid, "STRIP", "strip_E", 4.0, 1, 1, 1, 1, 0);
  358.     }
  359.     if(pFase[playerid][Logado] == 1)
  360.     {
  361.         SpawnPlayer(playerid);
  362.         //TextDrawHideForPlayer(playerid, gText3[playerid]);
  363.         TextDrawShowForPlayer(playerid, gText3[playerid]);
  364.     }
  365.     if(classid == 1 || classid == 0 && !IsPlayerAdmin(playerid))
  366.     {
  367.         //SendClientMessage(playerid,Verde,"This skin is only for admins!");
  368.         return 0;
  369.     }
  370.     return 1;
  371. }
  372.  
  373. public OnPlayerConnect(playerid)
  374. {
  375.     pFase[playerid][Logado] = 0;
  376.     pAFK[playerid] = 0;
  377.     ResetPlayerGranaEx(playerid);
  378.     new string[128];
  379.     format(string,sizeof string,"{00FF00}~> {FFFAFA}%s {FFFAFA}[ {00FF00}%d {FFFAFA}] Conectou-se ao Servidor.",pName(playerid),playerid);
  380.     SendClientMessageToAll(-1, string);
  381.     printf("%s [ID: %d] logou-se ao servidor.",pName(playerid), playerid);
  382.     // Check Ban
  383.     new aname[MAX_PLAYER_NAME];
  384.     new nomepl[MAX_PLAYER_NAME];
  385.     if(DOF2_GetInt("NicksBan.ini",pName(playerid)) == 1)
  386.     {
  387.         SendClientMessage(playerid, 0x11B1FFAA, "Você foi Kickado Motivo: Você está banido!");
  388.         format(string, sizeof(string), "%s (%d) Foi Kickado [Motivo]: Nick está Banido!", aname,playerid);
  389.         SendClientMessageToAll(Laranja, string);
  390.         Kick(playerid);
  391.         return 1;
  392.     }
  393.     //
  394.     if(DOF2_GetInt("Banidos.ini",pName(playerid)) == 1)
  395.     {
  396.         SendClientMessage(playerid, 0x11B1FFAA, "Você foi Kickado [Motivo]: Conta está banida!");
  397.         format(string, sizeof(string), "%s (%d) Foi Kickado [Motivo]: Conta está banida", aname,playerid);
  398.         SendClientMessageToAll(Laranja, string);
  399.         Kick(playerid);
  400.         return 1;
  401.     }
  402.     if(DOF2_GetInt(vfile,"Banido") == 1)
  403.     {
  404.         new Ip[30];
  405.         GetPlayerIp(playerid, Ip, sizeof(Ip));
  406.         SendClientMessage(playerid,Verde,"~> Log Ban <~");
  407.         format(string, sizeof(string),"Nick: %s", nomepl);
  408.         SendClientMessage(playerid,-1,string);
  409.         format(string, sizeof(string),"Banido Por: %s", DOF2_GetString(vfile,"BanPor"));
  410.         SendClientMessage(playerid,-1,string);
  411.         format(string, sizeof(string),"Motivo: %s", DOF2_GetString(vfile,"BanMotivo"));
  412.         SendClientMessage(playerid,-1,string);
  413.         format(string, sizeof(string),"Data: %s", DOF2_GetString(vfile,"Login"));
  414.         SendClientMessage(playerid,-1,string);
  415.         if(DOF2_GetInt(vfile,"TBan") == 1)
  416.         {
  417.             format(string, sizeof(string),"Banido Até:%d/%d/%d as %d:%d", DOF2_GetInt(vfile,"BanAteD"), DOF2_GetInt(vfile,"BanAteME"), DOF2_GetInt(vfile,"BanAteY"), DOF2_GetInt(vfile,"BanAteH"), DOF2_GetInt(vfile,"BanAteMI"));
  418.             SendClientMessage(playerid,-1,string);
  419.             new year, month,day;
  420.             getdate(year, month, day);
  421.             new h, m, s;
  422.             gettime(h, m, s);
  423.             if(year > DOF2_GetInt(vfile,"BanAteY"))
  424.             {
  425.                 SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
  426.                 DOF2_SetInt(vfile, "Banido", 0);
  427.                 DOF2_SetInt(vfile,"TBan", 0);
  428.                 return 1;
  429.             }
  430.             if(year == DOF2_GetInt(vfile,"BanAteY"))
  431.             {
  432.                 if(month > DOF2_GetInt(vfile,"BanAteME"))
  433.                 {
  434.                     SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
  435.                     DOF2_SetInt(vfile, "Banido", 0);
  436.                     DOF2_SetInt(vfile,"TBan", 0);
  437.                     return 1;
  438.                 }
  439.                 if(month == DOF2_GetInt(vfile,"BanAteME"))
  440.                 {
  441.                     if(day > DOF2_GetInt(vfile,"BanAteD"))
  442.                     {
  443.                         SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
  444.                         DOF2_SetInt(vfile, "Banido", 0);
  445.                         DOF2_SetInt(vfile,"TBan", 0);
  446.                         return 1;
  447.                     }
  448.                     if(day == DOF2_GetInt(vfile,"BanAteD"))
  449.                     {
  450.                         if(h > DOF2_GetInt(vfile,"BanAteH"))
  451.                         {
  452.                             SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
  453.                             DOF2_SetInt(vfile, "Banido", 0);
  454.                             DOF2_SetInt(vfile,"TBan", 0);
  455.                             return 1;
  456.                         }
  457.                         if(h == DOF2_GetInt(vfile,"BanAteH"))
  458.                         {
  459.                             if(m >= DOF2_GetInt(vfile,"BanAteMI"))
  460.                             {
  461.                                 SendClientMessage(playerid,-1,"Seu tempo de banimento acabou, pode voltar a jogar!");
  462.                                 DOF2_SetInt(vfile, "Banido", 0);
  463.                                 DOF2_SetInt(vfile,"TBan", 0);
  464.                                 return 1;
  465.                             }
  466.                         }
  467.                     }
  468.                 }
  469.             }
  470.         }
  471.         SendClientMessage(playerid,Verde,"~> Log Ban <~");
  472.         DOF2_SetString(vfile,"Ip", Ip);
  473.         SendDeathMessage(INVALID_PLAYER_ID, playerid, 0);
  474.         Kick(playerid);
  475.     }
  476.     return 1;
  477. }
  478.  
  479. public OnPlayerDisconnect(playerid, reason)
  480. {
  481.     printf("%s [ID: %d] desconectou-se do servidor.",pName(playerid), playerid);
  482.     //Desconectar();
  483.     Desconectar(playerid);
  484.     new
  485.         string[128],
  486.         name[MAX_PLAYER_NAME];
  487.     GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  488.     switch(reason)
  489.     {
  490.         case 0: format(string,sizeof string,"{00FF00}~> {FFFAFA}%s saiu do servidor. {00FF00}({FFFAFA}Crash{00FF00}/{FFFAFA}Conexão{00FF00})",name);
  491.         case 1: format(string,sizeof string,"{00FF00}~> {FFFAFA}%s saiu do servidor. {00FF00}({FFFAFA}Vontade Própia{00FF00})",name);
  492.         case 2: format(string,sizeof string,"{00FF00}~> {FFFAFA}%s saiu do servidor. {00FF00}({FFFAFA}Kickado{00FF00}/{FFFAFA}Banido{00FF00})",name);
  493.     }
  494.     SendClientMessageToAll(-1,string);
  495.     pFase[playerid][Logado] = 0;
  496.     LogadoBanco[playerid] = 0;
  497.     new grana;
  498.     grana = GetPlayerGranaEx(playerid);
  499.     DOF2_SetInt(vfile, "Dinheiro", grana);
  500.     return 1;
  501. }
  502.  
  503. public OnPlayerSpawn(playerid)
  504. {
  505.     LogarProf(playerid);
  506.     TextDrawHideForPlayer(playerid, ImagemConnect);
  507.     TextDrawHideForPlayer(playerid, BemVindo);
  508.     if(Preso[playerid] == 1)
  509.     {
  510.         if(GetPlayerWantedLevel(playerid) == 1)
  511.         {
  512.             SetPlayerInterior(playerid, 6);
  513.             Assalto[playerid] = 0;
  514.             Preso[playerid] = 1;
  515.             GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
  516.             SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
  517.             TempoPreso[playerid] = SetTimerEx("Liberar", 120000, false, "i", playerid);
  518.             ResetPlayerWeapons(playerid);
  519.         }
  520.         else if(GetPlayerWantedLevel(playerid) == 2)
  521.         {
  522.             SetPlayerInterior(playerid, 6);
  523.             Assalto[playerid] = 0;
  524.             Preso[playerid] = 1;
  525.             GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
  526.             SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
  527.             TempoPreso[playerid] = SetTimerEx("Liberar", 240000, false, "i", playerid);
  528.             ResetPlayerWeapons(playerid);
  529.         }
  530.         else if(GetPlayerWantedLevel(playerid) == 3)
  531.         {
  532.             SetPlayerInterior(playerid, 6);
  533.             Assalto[playerid] = 0;
  534.             Preso[playerid] = 1;
  535.             GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
  536.             SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
  537.             TempoPreso[playerid] = SetTimerEx("Liberar", 480000, false, "i", playerid);
  538.             ResetPlayerWeapons(playerid);
  539.         }
  540.         else if(GetPlayerWantedLevel(playerid) == 4)
  541.         {
  542.             SetPlayerInterior(playerid, 6);
  543.             Assalto[playerid] = 0;
  544.             Preso[playerid] = 1;
  545.             GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
  546.             SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
  547.             TempoPreso[playerid] = SetTimerEx("Liberar", 600000, false, "i", playerid);
  548.             ResetPlayerWeapons(playerid);
  549.         }
  550.         else if(GetPlayerWantedLevel(playerid) == 5)
  551.         {
  552.             SetPlayerInterior(playerid, 6);
  553.             Assalto[playerid] = 0;
  554.             Preso[playerid] = 1;
  555.             GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
  556.             SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
  557.             TempoPreso[playerid] = SetTimerEx("Liberar", 720000, false, "i", playerid);
  558.             ResetPlayerWeapons(playerid);
  559.         }
  560.         else if(GetPlayerWantedLevel(playerid) == 6)
  561.         {
  562.             SetPlayerInterior(playerid, 6);
  563.             Assalto[playerid] = 0;
  564.             Preso[playerid] = 1;
  565.             GameTextForPlayer(playerid, "~w~PRESO!", 3000, 0);
  566.             SetPlayerPos(playerid, 264.5996, 77.7367, 1001.0391);
  567.             TempoPreso[playerid] = SetTimerEx("Liberar", 840000, false, "i", playerid);
  568.             ResetPlayerWeapons(playerid);
  569.         }
  570.     }
  571.     return 1;
  572. }
  573.  
  574. public OnPlayerDeath(playerid, killerid, reason)
  575. {
  576.     SendDeathMessage(killerid,playerid,reason);
  577.     new aname[MAX_PLAYER_NAME];
  578.     if(podedm == 0)
  579.     {
  580.          SendClientMessage(killerid, Amarelo, "* Você foi preso por fazer dm em local proibido!");
  581.          SpawnPlayer(killerid);
  582.          SetPlayerPos(killerid, 264.4181,77.3247,1001.0391);
  583.          SetPlayerHealth(killerid, 99999);
  584.          SetPlayerInterior(killerid, 6);
  585.          ResetPlayerWeapons(killerid);
  586.          DOF2_SetInt(aname, "Preso", 1);
  587.     }
  588.     return 1;
  589. }
  590.  
  591. public OnVehicleSpawn(vehicleid)
  592. {
  593.     return 1;
  594. }
  595.  
  596. public OnVehicleDeath(vehicleid, killerid)
  597. {
  598.     return 1;
  599. }
  600.  
  601. public OnPlayerText(playerid, text[])
  602. {
  603.     new sChat[256],
  604.         sNome[MAX_PLAYER_NAME];
  605.     if(pAdmin[playerid] > 1)
  606.     {
  607.         GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
  608.         format(sChat, 128, "[Adm Lv : %d] - %s (%d) : %s", pAdmin[playerid], sNome, playerid, text);
  609.         for(new i; i != GetMaxPlayers(); i++)
  610.             SendClientMessage(i, -1, sChat);
  611.     }
  612.     if(!pAdmin[playerid])
  613.     {
  614.         GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
  615.         format(sChat, 128, "%s (%d) : %s", sNome, playerid, text);
  616.         for(new i; i != GetMaxPlayers(); i++)
  617.             SendClientMessage(i, -1, sChat);
  618.     }
  619.     if(pAFK[playerid] == 1)
  620.     {
  621.         SendClientMessage(playerid, Vermelho, "* Saia do Modo AFK Primeiro! Use: /sairafk");
  622.         return 0;
  623.     }
  624.     if(AcessoOn[playerid] == true)
  625.     {
  626.         new codigos = random(sizeof(Codigos));
  627.         cudigos = Codigos[codigos];
  628.         if(strfind(text, Codigos[codigos], true) == 0)
  629.         {
  630.             KillTimer(KillFirewall[playerid]);
  631.             KillAcesso = SetTimerEx("AcessoBanco", 1000, 20, "i", playerid);
  632.             KillTransferencia = SetTimerEx("LimiteGrana", 27000, false, "i", playerid);
  633.             format(sChat, sizeof(sChat), "* %s conseguiu derrubar o firewall", pName(playerid));
  634.             SendClientMessageToAll(0x7FFF00AA, sChat);
  635.             Assalto[playerid] = 1;
  636.             return 0;
  637.         }
  638.         else
  639.         {
  640.             SendClientMessage(playerid, 0xFF0000FF, "(ERRO) Codigo Inválido!");
  641.             return 0;
  642.         }
  643.     }
  644.     return 0;
  645. }
  646.  
  647. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  648. {
  649.  
  650. new string[128], IP[24];
  651. if(dialogid == REGISTRO)
  652. {
  653.     if(!response)
  654.     {
  655.        SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao registrar!.");
  656.        Kick(playerid);
  657.     }
  658.     else {
  659.     if(!strlen(inputtext))
  660.     {
  661.         format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {FF0000}Não Registrada\n{FFFAFA}Digite uma Senha e Clique em Registrar", pName(playerid));
  662.         ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", StringLg, "Registrar", "Sair");
  663.     }
  664.     DOF2_CreateFile(vfile);
  665.     format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
  666.     DOF2_SetString(vfile, "Senha", inputtext);
  667.     GetPlayerIp(playerid, IP, sizeof(IP));
  668.     DOF2_SetString(vfile, "Login", pName(playerid));
  669.     DOF2_SetString(vfile, "IP", IP);
  670.     DOF2_SetString(vfile, "Level", "0");
  671.     DOF2_SetString(vfile, "ExpJogador", "0");
  672.     DOF2_SetString(vfile, "LevelAdmin", "0");
  673.     DOF2_SetString(vfile, "Dinheiro", "0");
  674.     DOF2_SetString(vfile, "Procurado", "0");
  675.     DOF2_SetString(vfile, "Preso", "0");
  676.     DOF2_SetString(vfile, "Skin", "1");
  677.     DOF2_SetString(vfile, "Gasolina", "20");
  678.     DOF2_SetString(vfile, "VipL", "0");
  679.     DOF2_SetString(vfile, "Avisos", "0");
  680.     DOF2_SetString(vfile, "TContaBancaria", "0");
  681.     DOF2_SetString(vfile, "HabTerrestre", "0");
  682.     DOF2_SetString(vfile, "Pais", "Nenhum");
  683.     DOF2_SetString(vfile, "HabAerea", "0");
  684.     DOF2_SetString(vfile, "HabNautica", "0");
  685.     DOF2_SetString(vfile, "Profissao", "0");
  686.     DOF2_SetString(vfile,"Porte", "0");
  687.     GivePlayerGranaEx(playerid,500);
  688.     ShowPlayerDialog(playerid, paislogin, DIALOG_STYLE_MSGBOX, "Registro", "Agora\tSelecione o Seu Pais", "Brasil", "Portugal");
  689.     GameTextForPlayer(playerid, "~w~Registrado", 8000, 1);
  690.     PlayerPlaySound(playerid, 1057, 0, 0, 0);
  691.     pFase[playerid][Logado] = 1;
  692.     return 1;
  693.     }
  694. }
  695.  
  696. if(dialogid == DIALOG_GAS)
  697. {
  698.     if(!response)
  699.         return SendClientMessage(playerid, 0xFFFFFFFF, "Você não colocou gasolina");
  700.     new sGasolinaT = strval(inputtext),quantia = sGasolinaT*floatround(VALOR_LITRO);
  701. /*    if(GetPlayerGranaEx(playerid) < quantia)
  702.         return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro para isto");*/
  703.     if(quantia <= 0 || GetPlayerGranaEx(playerid) < VALOR_LITRO)
  704.         return SendClientMessage(playerid, 0xFFFFFFFF, "Você não tem dinheiro para isto");
  705.     if(sGasolinaT > 100 || sGasolinaT <= 0)
  706.         return SendClientMessage(playerid, 0xFFFFFFFF, "Quantia Inválida");
  707.     format(string,60, "* Você completou seu tanque com '[%d]' litros de combustível. Valor: [ %dR$ ]",sGasolinaT,quantia);
  708.     SendClientMessage(playerid, Amarelo, string);
  709.     DOF2_SetInt (vfile, "Gasolina", pGasolina[playerid] + sGasolinaT);
  710.     GivePlayerGranaEx(playerid,-quantia);
  711.     return 1;
  712. }
  713.  
  714. if(dialogid == 4501)// Menu
  715. {
  716.     if(response)
  717.     {
  718.         if(listitem == 0)
  719.         {//Salvar posição
  720.             if(IsPlayerInAnyVehicle(playerid))
  721.             {
  722.                 new aname[MAX_PLAYER_NAME];
  723.                 GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  724.                 new Float:carroX,Float:carroY,Float:carroZ,Float:carroA;
  725.                 new vid;
  726.                 vid = GetPlayerVehicleID(playerid);
  727.                 GetVehiclePos(vid, carroX, carroY, carroZ);
  728.                 GetVehicleZAngle(vid, carroA);
  729.                 new pname[MAX_PLAYER_NAME];
  730.                 GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  731.                 for(new carro = 0; carro < MAX_CARROS; carro++)
  732.                 {
  733.                     format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  734.                     if(strcmp(DOF2_GetString(string, "Dono"), pname, true) == 0)
  735.                     {
  736.                         DOF2_SetFloat(string, "CordX", Float:carroX);
  737.                         DOF2_SetFloat(string, "CordY", Float:carroY);
  738.                         DOF2_SetFloat(string, "CordZ", Float:carroZ);
  739.                         DOF2_SetFloat(string, "Angulo", Float:carroA);
  740.                         SendClientMessage(playerid, Verde, "Seu carro foi salvo na sua posição.");
  741.                     }
  742.                 }
  743.                 SendClientMessage(playerid, Verde, "* A posição do seu veiculo foi salva com sucesso.");
  744.             }
  745.             else {
  746.                 SendClientMessage(playerid, 0xff6633AA, "* Você precisa estar em seu veiculo para salvar a posição.");
  747.             }
  748.         }
  749.         if(listitem == 1)
  750.         {//Alterar cor 1
  751.             format(string, sizeof(string), "Alterar Cor 1\n\nDigite o número da cor desejada e aperte \"Alterar\".\n\n ~ !");
  752.             ShowPlayerDialog(playerid, 4502, DIALOG_STYLE_INPUT, "Meu Carro", string, "Alterar", "Cancelar");
  753.         }
  754.         if(listitem == 2)
  755.         {//Alterar cor 2
  756.             format(string, sizeof(string), "Alterar Cor 2\n\nDigite o número da cor desejada e aperte \"Alterar\".\n\n ~ !");
  757.             ShowPlayerDialog(playerid, 4503, DIALOG_STYLE_INPUT, "Meu Carro", string, "Alterar", "Cancelar");
  758.         }
  759.         if(listitem == 3)
  760.         {// Respawnar carro
  761.             new pname[MAX_PLAYER_NAME];
  762.             GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  763.             for(new carro = 0; carro < MAX_CARROS; carro++) {
  764.                 format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  765.                 if(strcmp(DOF2_GetString(string, "Dono"), pname, true) == 0)
  766.                 {
  767.                     DestroyVehicle(DOF2_GetInt(string, "Id"));
  768.                     new carroid;
  769.                     //carroid = AddStaticVehicle(DOF2_GetInt(string, "Modelo"), DOF2_GetFloat(string, "CordX"), DOF2_GetFloat(string, "CordY"), DOF2_GetFloat(string, "CordZ"), DOF2_GetFloat(string, "Angulo"), DOF2_GetInt(string, "Cor1"), DOF2_GetInt(string, "Cor2"));
  770.                     DOF2_SetInt(string, "Id", carroid);
  771.                     SetVehicleNumberPlate(carroid = CreateVehicle(DOF2_GetInt(string,"Modelo"), DOF2_GetFloat(string,"CordX"), DOF2_GetFloat(string,"CordY"), DOF2_GetFloat(string,"CordZ"), DOF2_GetFloat(string,"Angulo"), DOF2_GetInt(string,"Cor1"), DOF2_GetInt(string,"Cor2"),false), DOF2_GetString(string,"Placa"));
  772.                 }
  773.             }
  774.             SendClientMessage(playerid, Amarelo, "* Veiculo respawnado!");
  775.         }
  776.         if(listitem == 4)
  777.         {//Alterar nome
  778.             format(string, sizeof(string), "Alterar nome do veiculo\n\nDigite o novo nome do veiculo e clique em \"Alterar\"!");
  779.             ShowPlayerDialog(playerid, 4504, DIALOG_STYLE_INPUT, "Nome do veiculo", string, "Alterar", "Cancelar");
  780.         }
  781.     }
  782.     if(listitem == 5)//Alterar placa
  783.     {
  784.         format(string, sizeof(string),"Alterar Placa\n\nDigite sua nova placa e clique em Alterar\"Alterar\"");
  785.         ShowPlayerDialog(playerid, 4505, DIALOG_STYLE_INPUT,"Meu Carro", string,"Alterar","Cancelar");
  786.     }
  787.     if(listitem == 6)                                 // Ativar Dono2
  788.     {
  789.         new pname[MAX_PLAYER_NAME];
  790.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  791.         format(string, sizeof(string), "/Carros/carro%d.ini", DOF2_GetInt(vfile,string));
  792.         if(strcmp(DOF2_GetString(string,"Dono"), pname, false) == 0) {
  793.             if(DOF2_GetInt(string,"cDono2") == 0) {
  794.                 DOF2_SetInt(string,"cDono2", 1);
  795.                 SendClientMessage(playerid, Amarelo,"* Sistema de 2º dono ativado!");
  796.                 return 1;
  797.             }
  798.             else {
  799.                 DOF2_SetInt(string,"cDono2", 0);
  800.                 SendClientMessage(playerid, Amarelo,"* Sistema de 2º dono desativado!");
  801.                 return 1;
  802.             }
  803.         }
  804.         return 1;
  805.     }
  806.     if(listitem == 7)                                 // Definir 2º dono
  807.     {
  808.         format(string, sizeof(string),"Definir 2º dono\n\nDigite o nome do 2º dono e clique em \"Definir\".\n\n ~ TheLife!");
  809.         ShowPlayerDialog(playerid, 4506, DIALOG_STYLE_INPUT,"Meu Carro", string,"Definir","Cancelar");
  810.     }
  811.     if(listitem == 8)                                 // Alarme
  812.     {
  813.         format(string, sizeof(string), "/Carros/carro%d.ini", DOF2_GetInt(vfile,string));
  814.         if(strcmp(DOF2_GetString(string,"Dono"), pName(playerid), false) == 0)
  815.         {
  816.             new mot, lu, alar, por, cap, porma, ob;
  817.             GetVehicleParamsEx(DOF2_GetInt(string,"Id"), mot, lu, alar, por, cap, porma, ob);
  818.             if(DOF2_GetInt(string,"Alarme") == 0)
  819.             {
  820.                 DOF2_SetInt(string,"Alarme", 1);
  821.                 SendClientMessage(playerid, Amarelo,"Alarme ativado!");
  822.                 return 1;
  823.             }
  824.             else {
  825.                 DOF2_SetInt(string,"Alarme", 0);
  826.                 SetVehicleParamsEx(DOF2_GetInt(string,"Id"), mot, lu, VEHICLE_PARAMS_OFF, por, cap, porma, ob);
  827.                 SendClientMessage(playerid, Amarelo,"Alarme desativado!");
  828.                 return 1;
  829.             }
  830.         }
  831.         return 1;
  832.     }
  833.  
  834.     if(listitem == 7)
  835.     {// Vender carro
  836.         new pname[MAX_PLAYER_NAME];
  837.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  838.         for(new carro = 0; carro < MAX_CARROS; carro++) {
  839.             format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  840.             if(strcmp(DOF2_GetString(string, "Dono"), pname, true) == 0) {
  841.                 DOF2_SetString(string, "Dono", "Nenhum");
  842.                 DOF2_SetInt(string, "cDono", 0);
  843.                 GivePlayerGranaEx(playerid, DOF2_GetInt(string, "Preco"));
  844.             }
  845.         }
  846.     }
  847. }
  848.  
  849. if(dialogid == 4506)
  850. {
  851.     new nomepl[MAX_PLAYER_NAME];
  852.     GetPlayerName(playerid, nomepl, sizeof(nomepl));
  853.     if(response == 1)
  854.     {
  855.         new string2[256];
  856.         new aname[MAX_PLAYER_NAME];
  857.         GetPlayerName(playerid, aname, sizeof(aname));
  858.         if(strlen(inputtext) <= 24)
  859.         {
  860.             new pname[MAX_PLAYER_NAME];
  861.             GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  862.             //format(string2,sizeof(string2),"CarroID%d",scar[playerid]);
  863.             format(string, sizeof(string), "/Carros/carro%d.ini", DOF2_GetInt(vfile,string2));
  864.             if(strcmp(DOF2_GetString(string,"Dono"), aname, true) == 0) {
  865.                 if(DOF2_FileExists(tfile(inputtext)))
  866.                 {
  867.                     DOF2_SetString(string,"Dono2", inputtext);
  868.                     SetVehicleNumberPlate(DOF2_GetInt(string,"Id"), inputtext);
  869.                     format(string2,sizeof(string2),"O 2º dono do carro agora é %s",inputtext);
  870.                     SendClientMessage(playerid, 0x408080FF,string2);
  871.                 } else return SendClientMessage(playerid, Vermelho,"Este jogador não existe!");
  872.                 return 1;
  873.             }
  874.         }
  875.         else {
  876.             SendClientMessage(playerid, Vermelho,"O nome é de no máximo 24 caracteres");
  877.         }
  878.     }
  879. }
  880.  
  881.  
  882. if(dialogid == 4505)
  883. {
  884.     new nomepl[MAX_PLAYER_NAME];
  885.     GetPlayerName(playerid, nomepl, sizeof(nomepl));
  886.     if(response == 1)
  887.     {
  888.         new aname[MAX_PLAYER_NAME];
  889.         GetPlayerName(playerid, aname, sizeof(aname));
  890.         if(strlen(inputtext) <= 8)
  891.         {
  892.             new string2[256];
  893.             new pname[MAX_PLAYER_NAME];
  894.             GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  895.             format(vfile, sizeof(vfile), DIRETORIO, pname);
  896.             format(string2,sizeof(string2),"CarroID%d",scar[playerid]);
  897.             format(string2, sizeof(string2), "/Carros/carro%d.ini", DOF2_GetInt(vfile,string2));
  898.             if(strcmp(DOF2_GetString(string2,"Dono"), aname, true) == 0) {
  899.                 DOF2_SetString(string2,"Placa", inputtext);
  900.                 SetVehicleNumberPlate(DOF2_GetInt(string2,"Id"), inputtext);
  901.                 SendClientMessage(playerid, 0x408080FF,"* Placa do carro alterada, para atualizar respawne o carro > Use: /meucarro <!");
  902.                 return 1;
  903.             }
  904.         }
  905.         else {
  906.             SendClientMessage(playerid, Vermelho,"Placa máxima de 8 caracteres");
  907.         }
  908.     }
  909. }
  910.  
  911.  
  912. if(dialogid == 4504)
  913. {
  914.     new nomepl[MAX_PLAYER_NAME];
  915.     GetPlayerName(playerid, nomepl, sizeof(nomepl));
  916.     if(response == 1) {
  917.         new aname[MAX_PLAYER_NAME];
  918.         GetPlayerName(playerid, aname, sizeof(aname));
  919.         for(new carro = 0; carro < MAX_CARROS; carro++) {
  920.             format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  921.             if(strcmp(DOF2_GetString(string, "Dono"), aname, true) == 0) {
  922.                 DOF2_SetString(string, "Nome", inputtext);
  923.                 SendClientMessage(playerid, 0xC0C0C0AA, "* Nome do veiculo alterado com sucesso.");
  924.                 return 1;
  925.             }
  926.         }
  927.     }
  928. }
  929.  
  930. if(dialogid == 4502)
  931. {
  932.     new nomepl[MAX_PLAYER_NAME];
  933.     GetPlayerName(playerid, nomepl, sizeof(nomepl));
  934.     if(response == 1)
  935.     {
  936.         new aname[MAX_PLAYER_NAME];
  937.         GetPlayerName(playerid, aname, sizeof(aname));
  938.         if(!IsNumeric(inputtext))
  939.         {
  940.             SendClientMessage(playerid, Vermelho, "* Valor inválido.");
  941.             return 1;
  942.         }
  943.         else {
  944.             for(new carro = 0; carro < MAX_CARROS; carro++) {
  945.                 format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  946.                 if(strcmp(DOF2_GetString(string, "Dono"), aname, true) == 0) {
  947.                     DOF2_SetInt(string, "Cor1", strval(inputtext));
  948.                     ChangeVehicleColor(DOF2_GetInt(string, "Id"), DOF2_GetInt(string, "Cor1"), DOF2_GetInt(string, "Cor2"));
  949.                 }
  950.             }
  951.         }
  952.     }
  953. }
  954.  
  955.  
  956. if(dialogid == 4503)
  957. {
  958.     new nomepl[MAX_PLAYER_NAME];
  959.     GetPlayerName(playerid, nomepl, sizeof(nomepl));
  960.     if(response == 1) {
  961.         new aname[MAX_PLAYER_NAME];
  962.         GetPlayerName(playerid, aname, sizeof(aname));
  963.         if(!IsNumeric(inputtext)) {
  964.             SendClientMessage(playerid, Vermelho, "* Valor inválido.");
  965.             return 1;
  966.         }
  967.         else {
  968.             for(new carro = 0; carro < MAX_CARROS; carro++) {
  969.                 format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  970.                 if(strcmp(DOF2_GetString(string, "Dono"), aname, true) == 0) {
  971.                     DOF2_SetInt(string, "Cor2", strval(inputtext));
  972.                     ChangeVehicleColor(DOF2_GetInt(string, "Id"), DOF2_GetInt(string, "Cor1"), DOF2_GetInt(string, "Cor2"));
  973.                 }
  974.             }
  975.         }
  976.     }
  977. }
  978.  
  979. if(dialogid == 9459)
  980. {
  981.     if(response)
  982.     {
  983.         DOF2_SetString(vfile, "Senha", inputtext);
  984.         format(string, sizeof(string), "(INFO) %s sua senha foi alterada com sucesso!", pName(playerid));
  985.         SendClientMessage(playerid, 0xCDCDB4AA, string);
  986.         format(string, sizeof(string), "(INFO) Sua nova senha: %s", inputtext);
  987.         SendClientMessage(playerid, 0xCDCDB4AA, string);
  988.         }
  989.     return 1;
  990. }
  991.  
  992. if(dialogid == MenuBancoH)
  993. {
  994.     //
  995. }
  996.  
  997. if(dialogid == pMenuProf)
  998. {
  999.     if(response)
  1000.     {
  1001.         if(listitem == 0)
  1002.         {
  1003.             ShowPlayerDialog(playerid, pHonestas, DIALOG_STYLE_LIST, "Profissões - Honestas", "Vendedor de Sorvete - Level 0\n<- Voltar", "Selecionar", "Fechar");
  1004.         }
  1005.         if(listitem == 1)
  1006.         {
  1007.             ShowPlayerDialog(playerid, pHonestas2, DIALOG_STYLE_LIST, "Profissões - Honestas 2", "Troll Face\nVoltar", "Selecionar", "Fechar");
  1008.         }
  1009.         if(listitem == 2)
  1010.         {
  1011.             ShowPlayerDialog(playerid, pCriminosas, DIALOG_STYLE_LIST, "Profissões - Criminosas", "Vendedor de Drogas - Level 20\nTraficante de Armas - Level 15\nVoltar", "Selecionar", "Fechar");
  1012.         }
  1013.         if(listitem == 3)
  1014.         {
  1015.             ShowPlayerDialog(playerid, pGoverno, DIALOG_STYLE_LIST, "Profissões - Governo", "Policia Militar - Level 40\nPolicia Civil - Level 50\nPolicia Federal - Level 70\nAdvogado - Level 30\nGuarda de Transito - Level 25\nVoltar", "Selecionar", "Fechar");
  1016.         }
  1017.         if(listitem == 4)
  1018.         {
  1019.             ShowPlayerDialog(playerid, pTransporte, DIALOG_STYLE_LIST, "Profissões - Transporte", "Caminhoneiro - Level 15\nMoto Taxista - Level 10\nTaxista - Level 10\nMaquinista - Level 5\nVoltar", "Selecionar", "Fechar");
  1020.         }
  1021.         if(listitem == 5)
  1022.         {
  1023.             ShowPlayerDialog(playerid, pMafia, DIALOG_STYLE_LIST, "Profissões - Mafia", "Hacker - Level 50\nVoltar", "Selecionar", "Fechar");
  1024.         }
  1025.     }
  1026. }
  1027.  
  1028. if(dialogid == pCriminosas)
  1029. {
  1030.     if(response)
  1031.     {
  1032.         if(listitem == 0)
  1033.         {
  1034.             if(pLevel[playerid] >= 19)
  1035.             {
  1036.                 Profissao[playerid] = VDrogas;
  1037.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1038.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1039.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1040.                 TogglePlayerControllable(playerid, 1);
  1041.             }
  1042.             else {
  1043.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1044.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1045.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1046.                 TogglePlayerControllable(playerid, 1);
  1047.             }
  1048.             if(listitem == 1)
  1049.             {
  1050.             if(pLevel[playerid] >= 19)
  1051.             {
  1052.                 Profissao[playerid] = TrafArmas;
  1053.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1054.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1055.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1056.                 TogglePlayerControllable(playerid, 1);
  1057.             }
  1058.             else {
  1059.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1060.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1061.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1062.                 TogglePlayerControllable(playerid, 1);
  1063.                 }
  1064.             }
  1065.             if(listitem == 2) // Voltar
  1066.             {
  1067.                 ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
  1068.             }
  1069.             return 1;
  1070.         }
  1071.     }
  1072. }
  1073.  
  1074. if(dialogid == pMafia)
  1075. {
  1076.     if(response)
  1077.     {
  1078.         if(listitem == 1)
  1079.         {
  1080.             if(pLevel[playerid] >= 49)
  1081.             {
  1082.                 Profissao[playerid] = Hacker;
  1083.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1084.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1085.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1086.                 TogglePlayerControllable(playerid, 1);
  1087.             }
  1088.             else {
  1089.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1090.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1091.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1092.                 TogglePlayerControllable(playerid, 1);
  1093.             }
  1094.         }
  1095.         if(listitem == 0) // Voltar
  1096.         {
  1097.             ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
  1098.         }
  1099.         return 1;
  1100.     }
  1101. }
  1102.  
  1103. if(dialogid == pGoverno)
  1104. {
  1105.     if(response)
  1106.     {
  1107.         if(listitem == 0)
  1108.         {
  1109.             if(pLevel[playerid] >= 39)
  1110.             {
  1111.                 Profissao[playerid] = PolicialM;
  1112.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1113.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1114.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1115.                 TogglePlayerControllable(playerid, 1);
  1116.             }
  1117.             else {
  1118.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1119.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1120.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1121.                 TogglePlayerControllable(playerid, 1);
  1122.             }
  1123.             if(listitem == 1)
  1124.             {
  1125.                 if(pLevel[playerid] >= 49)
  1126.                 {
  1127.                     Profissao[playerid] = PolicialC;
  1128.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1129.                     aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1130.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1131.                     TogglePlayerControllable(playerid, 1);
  1132.                 }
  1133.                 else {
  1134.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1135.                     reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1136.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1137.                     TogglePlayerControllable(playerid, 1);
  1138.                 }
  1139.             }
  1140.             if(listitem == 2)
  1141.             {
  1142.                 if(pLevel[playerid] >= 69)
  1143.                 {
  1144.                     Profissao[playerid] = PolicialF;
  1145.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1146.                     aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1147.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1148.                     TogglePlayerControllable(playerid, 1);
  1149.                 }
  1150.                 else {
  1151.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1152.                     reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1153.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1154.                     TogglePlayerControllable(playerid, 1);
  1155.                 }
  1156.             }
  1157.             if(listitem == 3)
  1158.             {
  1159.                 if(pLevel[playerid] >= 29)
  1160.                 {
  1161.                     Profissao[playerid] = Advogado;
  1162.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1163.                     aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1164.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1165.                     TogglePlayerControllable(playerid, 1);
  1166.                 }
  1167.                 else {
  1168.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1169.                     reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1170.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1171.                     TogglePlayerControllable(playerid, 1);
  1172.                 }
  1173.             }
  1174.             if(listitem == 4)
  1175.             {
  1176.                 if(pLevel[playerid] >= 24)
  1177.                 {
  1178.                     Profissao[playerid] = GuardaTransito;
  1179.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1180.                     aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1181.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1182.                     TogglePlayerControllable(playerid, 1);
  1183.                 }
  1184.                 else {
  1185.                     SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1186.                     reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1187.                     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1188.                     TogglePlayerControllable(playerid, 1);
  1189.                 }
  1190.             }
  1191.             if(listitem == 5) // Voltar
  1192.             {
  1193.                 ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
  1194.             }
  1195.             return 1;
  1196.         }
  1197.     }
  1198. }
  1199.  
  1200. if(dialogid == pTransporte)
  1201. {
  1202.     if(response)
  1203.     {
  1204.         if(listitem == 0)
  1205.         {
  1206.             if(pLevel[playerid] >= 14)
  1207.             {
  1208.                 Profissao[playerid] = Caminhoneiro;
  1209.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1210.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1211.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1212.                 TogglePlayerControllable(playerid, 1);
  1213.             }
  1214.             else {
  1215.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1216.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1217.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1218.                 TogglePlayerControllable(playerid, 1);
  1219.             }
  1220.             if(listitem == 1)
  1221.             {
  1222.             if(pLevel[playerid] >= 9)
  1223.             {
  1224.                 Profissao[playerid] = MotoTaxi;
  1225.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1226.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1227.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1228.                 TogglePlayerControllable(playerid, 1);
  1229.             }
  1230.             else {
  1231.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1232.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1233.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1234.                 TogglePlayerControllable(playerid, 1);
  1235.                 }
  1236.             }
  1237.             if(listitem == 2)
  1238.             {
  1239.             if(pLevel[playerid] >= 9)
  1240.             {
  1241.                 Profissao[playerid] = Taxista;
  1242.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1243.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1244.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1245.                 TogglePlayerControllable(playerid, 1);
  1246.             }
  1247.             else {
  1248.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1249.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1250.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1251.                 TogglePlayerControllable(playerid, 1);
  1252.                 }
  1253.             }
  1254.             if(listitem == 3)
  1255.             {
  1256.             if(pLevel[playerid] >= 4)
  1257.             {
  1258.                 Profissao[playerid] = Maquinista;
  1259.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1260.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1261.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1262.                 TogglePlayerControllable(playerid, 1);
  1263.             }
  1264.             else {
  1265.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1266.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1267.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1268.                 TogglePlayerControllable(playerid, 1);
  1269.                 }
  1270.             }
  1271.             if(listitem == 4) // Voltar
  1272.             {
  1273.                 ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
  1274.             }
  1275.             return 1;
  1276.         }
  1277.     }
  1278. }
  1279.  
  1280.  
  1281. if(dialogid == pHonestas)
  1282. {
  1283.     if(response)
  1284.     {
  1285.             if(listitem == 0)
  1286.             {
  1287.             if(pLevel[playerid] >= 0)
  1288.             {
  1289.                 Profissao[playerid] = VSorvete;
  1290.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1291.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1292.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1293.                 TogglePlayerControllable(playerid, 1);
  1294.             }
  1295.             else {
  1296.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1297.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1298.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1299.                 TogglePlayerControllable(playerid, 1);
  1300.             }
  1301.             if(listitem == 1)
  1302.             {
  1303.             if(pLevel[playerid] >= 0)
  1304.             {
  1305.                 Profissao[playerid] = Paramedico;
  1306.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1307.                 aprovado[playerid] = SetTimerEx("CheckCurriculo", 8000, false, "i", playerid);
  1308.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1309.                 TogglePlayerControllable(playerid, 1);
  1310.             }
  1311.             else {
  1312.                 SendClientMessage(playerid, Amarelo, "* Aguarde enquanto o seu currículo é analisado....");
  1313.                 reprovado[playerid] = SetTimerEx("ReprovarC", 8000, false, "i", playerid);
  1314.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1315.                 TogglePlayerControllable(playerid, 1);
  1316.             }
  1317.             if(listitem == 2) // Voltar
  1318.             {
  1319.                 ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
  1320.             }
  1321.             return 1;
  1322.             }
  1323.         }
  1324.     }
  1325. }
  1326.  
  1327. if(dialogid == 1444)
  1328. {
  1329.     new banco[128];
  1330.     format(banco, sizeof(banco), DBANCO, pName(playerid));
  1331.     if(response)
  1332.     {
  1333.         if(strlen(inputtext))
  1334.         {
  1335.             new confirmado[256];
  1336.             confirmado = DOF2_GetString(banco, "SenhaBanco");
  1337.             if(strcmp(inputtext, confirmado, true) == 0)
  1338.             {
  1339.                 SendClientMessage(playerid, -1, "(BANCO) Sua conta bancária foi carregada com sucesso!");
  1340.                 PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1341.                 LogadoBanco[playerid] = 1;
  1342.                 ShowPlayerDialog(playerid, 4242, DIALOG_STYLE_LIST,"Banco","~>    {FFFFFF}[ {00FF00}Sacar {FFFFFF}]\n~>    {FFFFFF}[ {00FF00}Depositar {FFFFFF}]\n~>     {FFFFFF}[ {00FF00}Consultar Saldo {FFFFFF}]\n~>     {FFFFFF}[ {00FF00}Alterar Senha da Conta {FFFFFF}]","Solicitar","Fechar");
  1343.                 if(SenhaBanco[playerid] == true)
  1344.                 {
  1345.                     new str[128];
  1346.                     format(str, sizeof(str), "Nome de usuário: %s\n\nInsira sua nova senha bancária:", pName(playerid));
  1347.                     ShowPlayerDialog(playerid, 4343, DIALOG_STYLE_INPUT, "Conta", str, "Confirmar", "Cancelar");
  1348.                     SenhaBanco[playerid] = false;
  1349.                 }
  1350.             }
  1351.             else {
  1352.                 format(string, sizeof(string), "Senha Incorreta!\n\nNome de usuário: %s\n\nInsira sua senha bancária:", pName(playerid));
  1353.                 ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Conta Bancária", string, "Entrar", "Cancelar");
  1354.                 SendClientMessage(playerid, Vermelho, "(BANCO) Senha Incorreta.");
  1355.             }
  1356.         }
  1357.         else {
  1358.             new str[128];
  1359.             format(str, sizeof(str), "Não deixe o campo em branco!\n\nNome de usuário: %s\n\nInsira sua senha:", pName(playerid));
  1360.             ShowPlayerDialog(playerid, 9997, DIALOG_STYLE_INPUT, "Conta Bancária", str, "Entrar", "Cancelar");
  1361.         }
  1362.     }
  1363. }
  1364.  
  1365. if(dialogid == 4343)
  1366. {
  1367.     new banco[128];
  1368.     format(banco, sizeof(banco), DBANCO, pName(playerid));
  1369.     if(response)
  1370.     {
  1371.         DOF2_SetString(banco, "SenhaBanco", inputtext);
  1372.         format(string, sizeof(string), "(BANCO) %s sua senha bancária foi alterada com sucesso!", pName(playerid));
  1373.         SendClientMessage(playerid, Verde, string);
  1374.         format(string, sizeof(string), "(BANCO) Sua nova senha bancária: %s", inputtext);
  1375.         SendClientMessage(playerid, Verde, string);
  1376.     }
  1377. }
  1378.  
  1379. if(dialogid == 1442)
  1380. {
  1381.     new banco[128];
  1382.     format(banco, sizeof(banco), DBANCO, pName(playerid));
  1383.     if(response)
  1384.     {
  1385.         if(strlen(inputtext))
  1386.         {
  1387.             DOF2_CreateFile(banco);
  1388.             DOF2_SetString(banco, "SenhaBanco", inputtext);
  1389.             DOF2_SetInt(banco, "SaldoBancario", 500);
  1390.             GameTextForPlayer(playerid, "~w~Conta ~n~ Criada", 3000, 1);
  1391.             GivePlayerGranaEx(playerid, 500);
  1392.             SendClientMessage(playerid, -1, "(BANCO) Sua conta bancária foi criada com sucesso!");
  1393.             PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1394.             LogadoBanco[playerid] = 1;
  1395.         }
  1396.         else {
  1397.             new str[128];
  1398.             format(str, sizeof(str), "Não deixe o campo em branco!\n\nNome de usuário: %s\n\nInsira uma senha:", pName(playerid));
  1399.             ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Conta Bancária", str, "Criar", "Cancelar");
  1400.         }
  1401.     }
  1402. }
  1403.  
  1404. if(dialogid == 4242)   // Bank
  1405. {
  1406.     new banco[128];
  1407.     format(banco, sizeof(banco), DBANCO, pName(playerid));
  1408.     new saldo = DOF2_GetInt(banco, "SaldoBancario");
  1409.     if(response)
  1410.     {
  1411.         if(listitem == 0)
  1412.         { // Sacar
  1413.             format(string, sizeof(string), "* Digite a quantia a sacar.");
  1414.             SendClientMessage(playerid, Verde, string);
  1415.             format(StringLg, sizeof(StringLg), "Nome do Usuário: %s\n\nDigite a quantia que deseja sacar e aperte \"Sacar\".\n\n ~ Base RPG", pName(playerid));
  1416.             ShowPlayerDialog(playerid, 100, DIALOG_STYLE_INPUT, "Banco", StringLg, "Sacar", "Sair");
  1417.         }
  1418.         if(listitem == 1)
  1419.         {// Depositar
  1420.             format(string, sizeof(string), "* Digite a quantia a depositar.");
  1421.             SendClientMessage(playerid, Verde, string);
  1422.             format(StringLg, sizeof(StringLg), "Nome do Usuário: %s\n\nDigite a quantia que deseja depositar e aperte \"Depositar\".\n\n ~ Base RPG", pName(playerid));
  1423.             ShowPlayerDialog(playerid, 200, DIALOG_STYLE_INPUT, "Banco", StringLg, "Depositar", "Sair");
  1424.         }
  1425.         if(listitem == 2)
  1426.         {// Ver Saldo
  1427.             format(string, sizeof(string), "\tExtrato Bancário\n\n{FFFAFA}\tNome do Usuário: %s\n\tSaldo Atual: %dR$", pName(playerid), saldo);
  1428.             ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "                 Saldo",string,"Fechar","");
  1429.         }
  1430.         if(listitem == 3)
  1431.         {// Alterar Senha
  1432.             new str[128];
  1433.             format(str, sizeof(str), "** Banco Base RPG **\n\nInsira sua senha antiga:", pName(playerid));
  1434.             ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Senha Conta Bancária", str, "Confirmar", "Cancelar");
  1435.             SenhaBanco[playerid] = true;
  1436.         }
  1437.     }
  1438. }
  1439.  
  1440.  
  1441. if(dialogid == LOGIN)
  1442. {
  1443.     if(!response)
  1444.     {
  1445.        SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao Logar.");
  1446.        Kick(playerid);
  1447.     }
  1448.     else {
  1449.     if(response == 1)
  1450.     {
  1451.         format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
  1452.         new senhaacc[256];
  1453.         senhaacc = DOF2_GetString(vfile, "Senha");
  1454.         if(strcmp(inputtext, senhaacc, true) == 0)
  1455.         {
  1456.             pAdmin[playerid] = DOF2_GetInt(vfile, "LevelAdmin");
  1457.             pGasolina[playerid] = DOF2_GetInt(vfile, "Gasolina");
  1458.             GivePlayerGranaEx(playerid, DOF2_GetInt(vfile, "Dinheiro"));
  1459.             SetPlayerWantedLevel(playerid, DOF2_GetInt(vfile, "Procurado"));
  1460.             Experiencia[playerid] = DOF2_GetInt(vfile, "Experiencia");
  1461.             SetPlayerSkin(playerid, DOF2_GetInt(vfile, "Skin"));
  1462.             Preso[playerid] = DOF2_GetInt(vfile, "Preso");
  1463.             pLevel[playerid] = DOF2_GetInt(vfile, "Level");
  1464.             Profissao[playerid] = DOF2_GetInt(vfile, "Profissao");
  1465.             SetSpawnInfo(playerid, 0, 23, 2491.4192, -1958.0892, 13.58, 13.75, 0, 0, 0, 0, 0, 0 );
  1466.             pFase[playerid][Logado] = 1;
  1467.             GivePlayerGranaEx(playerid, DOF2_GetInt(vfile, "Dinheiro"));
  1468.             SpawnPlayer(playerid);
  1469.             GameTextForPlayer(playerid, "~g~Logado ~n~ Com Sucesso", 8000, 1);
  1470.             PlayerPlaySound(playerid, 1057, 0, 0, 0);
  1471.         }
  1472.         else {
  1473.             SendClientMessage(playerid, Vermelho ,"(x) Senha Incorreta");
  1474.             format(StringLg, sizeof(StringLg), "Senha Incorreta, %s\n Tente Digitar sua Senha Novamente!", pName(playerid));
  1475.             ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", StringLg, "Logar", "Sair");
  1476.             }
  1477.         }
  1478.         else {
  1479.             format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {00FF00}Registrada\n{FFFAFA}Digite sua Senha e Clique em Logar", pName(playerid));
  1480.             ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", StringLg, "Logar", "Sair");
  1481.             return 1;
  1482.             }
  1483.         }
  1484.     }
  1485.  
  1486. if(dialogid == paislogin)
  1487. {
  1488.     if(response == 1)
  1489.     {// BR
  1490.         SetSpawnInfo(playerid, 0, 30, 2491.4192, -1958.0892, 13.58, 13.75, 0, 0, 0, 0, 0, 0 );
  1491.         SetPlayerSkin(playerid, 30);
  1492.         DOF2_SetInt(vfile, "Skin", 30);
  1493.         pFase[playerid][pBrasil] = 1;
  1494.         DOF2_SetString(vfile,"Pais", "Brasil");
  1495.         SpawnPlayer(playerid);
  1496.     }// PT
  1497.     else {
  1498.         SetSpawnInfo(playerid, 0, 50, 2491.4192, -1958.0892, 13.58, 13.75, 0, 0, 0, 0, 0, 0 );
  1499.         SetPlayerSkin(playerid, 50);
  1500.         DOF2_SetInt(vfile, "Skin", 50);
  1501.         DOF2_SetString(vfile,"Pais", "Portugal");
  1502.         pFase[playerid][pPortugal] = 1;
  1503.         SpawnPlayer(playerid);
  1504.     }
  1505.     return 1;
  1506. }
  1507.  
  1508. if(dialogid == SPAWNJ)
  1509. {
  1510.     if(!response)
  1511.     {
  1512.        SendClientMessage(playerid,-1,"{00BFFF}Voce foi kickado por nao registrar/logar.");
  1513.        Kick(playerid);
  1514.     }
  1515.     else {
  1516.     if(response == 1)
  1517.     {
  1518.         format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
  1519.         if(!DOF2_FileExists(vfile))
  1520.         {
  1521.             format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {FF0000}Não Registrada\n{FFFAFA}Digite uma Senha e Clique em Registrar", pName(playerid));
  1522.             ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", StringLg, "Registrar", "Sair");
  1523.         }
  1524.         if(DOF2_FileExists(vfile))
  1525.         {
  1526.             format(StringLg, sizeof(StringLg), "{FFFAFA}Usuario: {FFD700}%s\n{FFFAFA}Conta: {00FF00}Registrada\n{FFFAFA}Digite sua Senha e Clique em Logar", pName(playerid));
  1527.             ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", StringLg, "Logar", "Sair");
  1528.             }
  1529.         }
  1530.     }
  1531. }
  1532. return 1;
  1533. }
  1534.  
  1535. public OnPlayerPickUpPickup(playerid, pickupid)
  1536. {
  1537.     if(pickupid == EntrarPref)
  1538.     {
  1539.          SetPlayerInterior(playerid, 3);
  1540.          GameTextForPlayer(playerid,"~g~Prefeitura", 3000, 1);
  1541.          SetPlayerPos(playerid, 387.3434, 173.8979, 1008.3828);
  1542.     }
  1543.  
  1544.     if(pickupid == SaidaPref)
  1545.     {
  1546.          SetPlayerInterior(playerid, 0);
  1547.          SetPlayerPos(playerid, 1480.9331, -1768.5493, 18.7958);
  1548.     }
  1549.     return 1;
  1550. }
  1551.  
  1552. public ChecarPing(playerid)
  1553. {
  1554.     if(GetPlayerPing(playerid) > 1000) Kick(playerid);
  1555.     return 1;
  1556. }
  1557.  
  1558. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  1559. {
  1560.     if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"");
  1561.     SetPlayerPosFindZ(playerid, fX, fY, fZ);
  1562.     return 1;
  1563. }
  1564.  
  1565. public PostosG()
  1566. for (new i=0;i<MAX_PLAYERS;i++)
  1567. {
  1568.     if(IsPlayerConnected(i))
  1569.     {
  1570.         if(PlayerToPoint(7.0, i, 2221.3298,-1108.0605,26.2748) || PlayerToPoint(7.0, i, 2159.1794,-1004.8632,62.7888) || PlayerToPoint(7.0, i, 2326.2520,-1079.5879,50.0407) || PlayerToPoint(7.0, i, 2058.4858,-979.0306,46.2862)) {
  1571.             AreaPosto[i] = 1;
  1572.             GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
  1573.         }
  1574.         else {
  1575.             if(AreaPosto[i] == 1)
  1576.             {
  1577.                 AreaPosto[i] = 0;
  1578.             }
  1579.             //Posto LV \/
  1580.             if (PlayerToPoint(7.0, i, 2638.9553,1107.1788,10.8203) || PlayerToPoint(7.0, i, 1595.6233,2199.6162,10.8203) || PlayerToPoint(7.0, i, 1940.8671,-1773.2283,13.3906) || PlayerToPoint(5.0, i, -2243.8435,-2560.5598,31.9219)) {
  1581.                 GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
  1582.                 AreaPosto[i] = 1;
  1583.             }
  1584.             else {
  1585.                 if(AreaPosto[i] == 1) {
  1586.                     AreaPosto[i] = 0;
  1587.                 }
  1588.                 //Posto LS/SF \/
  1589.                 if (PlayerToPoint(7.0, i, 1382.3647,459.0785,20.3452) || PlayerToPoint(8.0, i, -1675.4781,413.1594,7.1797) || PlayerToPoint(7.0, i, 655.5922,-565.3943,16.3359) || PlayerToPoint(7.0, i, -1606.3616,-2713.5872,48.5335)) {
  1590.                     GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
  1591.                     AreaPosto[i] = 1;
  1592.                 }
  1593.                 else {
  1594.                     if(AreaPosto[i] == 1) {
  1595.                         AreaPosto[i] = 0;
  1596.                     }
  1597.                     //Posto acima FC \/
  1598.                     if(IsPlayerInPlace(i,576.3771, 1662.789, 619.3304, 1709.206) || PlayerToPoint(7.0, i, 1004.1403,-937.8801,42.1797) || PlayerToPoint(7.0, i, 2202.1230,2476.8582,10.8203) || PlayerToPoint(6.0, i, 417.2369,-1912.7708,1.5641) || PlayerToPoint(6.0, i, 70.3983,1218.9958,18.8117)) {
  1599.                         GameTextForPlayer(i,"~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~w~Posto ~n~ ~b~/abastecer",3000,4);
  1600.                         AreaPosto[i] = 1;
  1601.                     }
  1602.                     else {
  1603.                         if(AreaPosto[i] == 1)
  1604.                         {
  1605.                             AreaPosto[i] = 0;
  1606.                         }
  1607.                     }
  1608.                 }
  1609.             }
  1610.         }
  1611.     }
  1612. }
  1613.  
  1614. public OnVehicleMod(playerid,vehicleid,componentid)
  1615. {
  1616.     printf("Veiculo %d > Estava com o ID: %d > De Nome: %s > Usando o Componente No seu Carro de ID: %d",vehicleid,pName(playerid),playerid,componentid);
  1617.     if(GetPlayerInterior(playerid) == 0)
  1618.     {
  1619.         BanEx(playerid, "Tuning Hack - Mod S0beit"); // Ant-Tunning Hack
  1620.         //Testado e Aprovando :D
  1621.     }
  1622.     return 1;
  1623. }
  1624.  
  1625. public OnPlayerUpdate(playerid)
  1626. {
  1627.     SetPlayerScore(playerid, pLevel[playerid]);
  1628.     return 1;
  1629. }
  1630.  
  1631.  
  1632. public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat)
  1633. {
  1634.     new Float: fVehicle[3];
  1635.     GetVehiclePos(vehicleid, fVehicle[0], fVehicle[1], fVehicle[2]);
  1636.     if(!IsPlayerInRangeOfPoint(playerid, 10, fVehicle[0], fVehicle[1], fVehicle[2]))
  1637.     {
  1638.         return;
  1639.     }
  1640. }
  1641.  
  1642. public LogarProf(playerid)
  1643. {
  1644.     if(Profissao[playerid] == Desempregado)
  1645.     {
  1646.         SetPlayerColor(playerid, -1);
  1647.     }
  1648.     else if(Profissao[playerid] == Caminhoneiro)
  1649.     {
  1650.         SetPlayerColor(playerid, 0x4B687EF6);
  1651.         GivePlayerWeapon(playerid, 7 , 1);
  1652.         SetPlayerSkin(playerid, 8);
  1653.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1654.     }
  1655.     else if(Profissao[playerid] == MotoTaxi)
  1656.     {
  1657.         SetPlayerColor(playerid, 0xCD853FAA);
  1658.         GivePlayerWeapon(playerid, 1 , 1);
  1659.         SetPlayerSkin(playerid, 16);
  1660.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1661.     }
  1662.     else if(Profissao[playerid] == Taxista)
  1663.     {
  1664.         SetPlayerColor(playerid, 0x6F4E8DAA);
  1665.         GivePlayerWeapon(playerid, 5 , 1);
  1666.         SetPlayerSkin(playerid, 61);
  1667.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1668.     }
  1669.     else if(Profissao[playerid] == PolicialM)
  1670.     {
  1671.         SetPlayerColor(playerid, 0x843E65AA);
  1672.         GivePlayerWeapon(playerid,24,500);
  1673.         GivePlayerWeapon(playerid,31,600);
  1674.         GivePlayerWeapon(playerid,29,700);
  1675.         GivePlayerWeapon(playerid,17,400);
  1676.         SetPlayerSkin(playerid, 281);
  1677.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1678.     }
  1679.     else if(Profissao[playerid] == PolicialC)
  1680.     {
  1681.         SetPlayerColor(playerid, 0x007C49AA);
  1682.         GivePlayerWeapon(playerid,24,900);
  1683.         GivePlayerWeapon(playerid,31,800);
  1684.         GivePlayerWeapon(playerid,29,600);
  1685.         GivePlayerWeapon(playerid,17,400);
  1686.         SetPlayerSkin(playerid, 280);
  1687.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1688.     }
  1689.     else if(Profissao[playerid] == PolicialF)
  1690.     {
  1691.         SetPlayerColor(playerid, 0x004E00AA);
  1692.         GivePlayerWeapon(playerid,24,600);
  1693.         GivePlayerWeapon(playerid,31,300);
  1694.         GivePlayerWeapon(playerid,29,300);
  1695.         GivePlayerWeapon(playerid,17,200);
  1696.         SetPlayerSkin(playerid, 283);
  1697.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1698.     }
  1699.     else if(Profissao[playerid] == VDrogas)
  1700.     {
  1701.         SetPlayerColor(playerid, 0x004E00AA);
  1702.         GivePlayerWeapon(playerid, 23, 400);
  1703.         GivePlayerWeapon(playerid, 25, 200);
  1704.         SetPlayerSkin(playerid, 273);
  1705.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1706.     }
  1707.     else if(Profissao[playerid] == TrafArmas)
  1708.     {
  1709.         SetPlayerColor(playerid, 0x485807AA);
  1710.         GivePlayerWeapon(playerid, 28, 400);
  1711.         GivePlayerWeapon(playerid, 30, 300);
  1712.         SetPlayerSkin(playerid, 293);
  1713.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1714.     }
  1715.     else if(Profissao[playerid] == GuardaTransito)
  1716.     {
  1717.         SetPlayerColor(playerid, 0xAA4B27AA);
  1718.         GivePlayerWeapon(playerid,3,1);
  1719.         GivePlayerWeapon(playerid,23,200);
  1720.         SetPlayerSkin(playerid, 284);
  1721.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1722.     }
  1723.     else if(Profissao[playerid] == Advogado)
  1724.     {
  1725.         SetPlayerColor(playerid, 0x8C00F6AA);
  1726.         GivePlayerWeapon(playerid,46,0);
  1727.         SetPlayerSkin(playerid, 59);
  1728.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1729.     }
  1730.     else if(Profissao[playerid] == VSorvete)
  1731.     {
  1732.         SetPlayerColor(playerid, Verde);
  1733.         GivePlayerWeapon(playerid,5,0);
  1734.         SetPlayerSkin(playerid, 229);
  1735.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1736.     }
  1737.     else if(Profissao[playerid] == Paramedico)
  1738.     {
  1739.         SetPlayerColor(playerid, 0x2641FEAA);
  1740.         SetPlayerSkin(playerid, 275);
  1741.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1742.     }
  1743.     else if(Profissao[playerid] == Hacker)
  1744.     {
  1745.         SetPlayerColor(playerid, 0xEEB4B4AA);
  1746.         SetPlayerSkin(playerid, 123);
  1747.         DOF2_SetInt(vfile, "Skin", GetPlayerSkin(playerid));
  1748.     }
  1749.     return 1;
  1750. }
  1751.  
  1752. /*public GanharExp(playerid)
  1753. {
  1754.     for(new i=0; i<MAX_PLAYERS; i++)
  1755.     {
  1756.         if(IsPlayerConnected(i))
  1757.         {
  1758.             DOF2_SetInt(vfile, "TempoExp", DOF2_GetInt(vfile, "TempoExp")+1);
  1759.             static sStr[128];
  1760.             if(DOF2_GetInt(vfile, "TempoExp") >= 1)
  1761.             {
  1762.                 DOF2_SetInt(vfile, "ExpJogador", DOF2_GetInt(vfile, "ExpJogador")+1);
  1763.                 DOF2_SetInt(vfile, "TempoExp",0);
  1764.                 GameTextForPlayer(i,"~g~+1 Exp", 3000, 1);
  1765.                 format(sStr, 64,"[ EXP ] %s Voce ganhou +1 Exp Formando : %d/5 ",pName(playerid),DOF2_GetInt(vfile, "ExpJogador"));
  1766.                 SendClientMessage(i, 0x75EA00AA, sStr);
  1767.             }
  1768.             if(DOF2_GetInt(vfile, "ExpJogador") >= 5)
  1769.             {
  1770.                 format(sStr, 64,"[ Level Up ] Você Passou de Level. -> Level Atual: %d ",DOF2_GetInt(vfile, "Level"));
  1771.                 SendClientMessage(i, 0x75EA00AA, sStr);
  1772.                 GameTextForPlayer(i,"~g~Level ~n~ ~y~UP", 3000, 1);
  1773.                 PlayerPlaySound(i, 1057, 0, 0, 0);
  1774.                 DOF2_SetInt(vfile, "Level", DOF2_GetInt(vfile, "Level")+1);
  1775.                 DOF2_SetInt(vfile, "ExpJogador",0);
  1776.             }
  1777.         }
  1778.     }
  1779.     return 1;
  1780. }*/
  1781.  
  1782. public TempoExpMinuto()
  1783. {
  1784.     for(new i=0; i < MAX_PLAYERS; i++)
  1785.     {
  1786.         if(IsPlayerConnected(i))
  1787.         {
  1788.             if(TempoLevelMinuto[i] == 0)
  1789.             {
  1790.                 TempoLevelMinuto[i] = 10;
  1791.             }
  1792.             if(TempoLevelMinuto[i] == 1)
  1793.             {
  1794.                 TempoLevelMinuto[i] = 10;
  1795.             }
  1796.             else
  1797.             {
  1798.                 TempoLevelMinuto[i]--;
  1799.             }
  1800.         }
  1801.     }
  1802.     return 1;
  1803. }
  1804.  
  1805. public Firewall(playerid)
  1806. {
  1807.     for(new i=0; i < MAX_PLAYERS; i++)
  1808.     {
  1809.         if(IsPlayerConnected(i))
  1810.         {
  1811.             FirewallOn[i] = 1;
  1812.             KillTimer(KillFirewall[i]);
  1813.             SendClientMessage(i, 0xCD0000AA, "* O Firewall do Banco Está desligado, Cuidado com os Hackers! Protejam suas Contas!");
  1814.         }
  1815.     }
  1816.     RoubarBanco[playerid] = 0;
  1817.     SendClientMessage(playerid, 0xCD0000AA, "* Você demorou demais e o firewall foi re-ativado!");
  1818.     KillFirewallOn = SetTimer("FirewallLigado", 60000 * 30, false);
  1819.     AcessoOn[playerid] = false;
  1820.     return 1;
  1821. }
  1822.  
  1823. public FirewallLigado()
  1824. {
  1825.     for(new i=0; i < MAX_PLAYERS; i++)
  1826.     {
  1827.         if(IsPlayerConnected(i))
  1828.         {
  1829.             KillTimer(KillFirewallOn);
  1830.             KillTimer(KillFirewallOn2);
  1831.             KillTimer(KillFirewallOn3);
  1832.             FirewallOn[i] = 0;
  1833.             return 1;
  1834.         }
  1835.     }
  1836.     return 1;
  1837. }
  1838.  
  1839. public LimiteGrana(playerid)
  1840. {
  1841.     for(new i=0; i < MAX_PLAYERS; i++)
  1842.     {
  1843.         if(IsPlayerConnected(i))
  1844.         {
  1845.             FirewallOn[i] = 1;
  1846.         }
  1847.     }
  1848.     KillTimer(KillAcesso);
  1849.     KillTimer(KillTransferencia);
  1850.     RoubarBanco[playerid] = 0;
  1851.     SendClientMessage(playerid, 0xCD0000AA, "* O Firewall do Banco Foi Ativado Novamente!");
  1852.     AcessoOn[playerid] = false;
  1853.     KillFirewallOn2 = SetTimer("FirewallLigado", 60000 * 30, false);
  1854.     return 1;
  1855. }
  1856.  
  1857. public CriarVeiculo2(m,Float:x,Float:y,Float:z,Float:r,c,d)
  1858. {
  1859.     new string[256];
  1860.     format(string, sizeof(string), "/Carros/carro%d.ini", proximocarro);
  1861.     new carroid;
  1862.     carroid = AddStaticVehicle(m, x, y, z, r, c, d);
  1863.     DOF2_SetInt(string, "Id", carroid);
  1864.     proximocarro++;
  1865.     return 1;
  1866. }
  1867.  
  1868. public AcessoBanco(playerid)
  1869. {
  1870.     if(PlayerToPoint(1.0, playerid, 823.0374, 2.9839, 1004.1797))
  1871.     {
  1872.         GivePlayerGranaEx(playerid, 75);
  1873.         AcessoOn[playerid] = false;
  1874.         SendClientMessage(playerid, 0x00B2EEAA, "* Transferindo dinheiro!");
  1875.         SetPlayerWantedLevel(playerid, 3);
  1876.         return 1;
  1877.     }
  1878.     else
  1879.     {
  1880.         for(new i=0; i < MAX_PLAYERS; i++)
  1881.         {
  1882.             if(IsPlayerConnected(i))
  1883.             {
  1884.                 FirewallOn[i] = 1;
  1885.             }
  1886.         }
  1887.         KillTimer(KillAcesso);
  1888.         KillTimer(KillTransferencia);
  1889.         SendClientMessage(playerid, 0xFF0000AA, "* Porta do Firewall desligada!!");
  1890.         RoubarBanco[playerid] = 0;
  1891.         KillFirewallOn3 = SetTimer("FirewallLigado", 60000 * 30, false);
  1892.         AcessoOn[playerid] = false;
  1893.         return 1;
  1894.     }
  1895. }
  1896.  
  1897. public GanharExp()
  1898. {
  1899.     for(new i=0; i < MAX_PLAYERS; i++)
  1900.     {
  1901.         new string[128];
  1902.         format(vfile, sizeof(vfile), DIRETORIO, pName(i));
  1903.         if(IsPlayerConnected(i))
  1904.         {
  1905.             if(pFase[i][Logado] == 1)
  1906.             {
  1907.                 if(Experiencia[i] >= 5)
  1908.                 {
  1909.                     pLevel[i]++;
  1910.                     Experiencia[i] = 0;
  1911.                     TempoLevelMinuto[i] = 10;
  1912.                     format(string, sizeof(string), "[ Level Up ] Você acaba de Ganhar +1 level! Level Atual: %d", pLevel[i]);
  1913.                     SendClientMessage(i, 0x00FF00AA, string);
  1914.                     PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
  1915.                     GameTextForPlayer(i,"~g~Level ~n~ ~y~UP", 3000, 1);
  1916.                     DOF2_SetInt(vfile, "ExpJogador", Experiencia[i]);
  1917.                     DOF2_SetInt(vfile, "Level", pLevel[i]);
  1918.                 }
  1919.                 else
  1920.                 {
  1921.                     Experiencia[i]++;
  1922.                     TempoLevelMinuto[i] = 10;
  1923.                     format(string, sizeof(string), "[ Exp ] Você acaba de Ganhar + 1 Ponto de Experiencia (%d/5)", Experiencia[i]);
  1924.                     SendClientMessage(i, 0x00FF00AA, string);
  1925.                     PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
  1926.                     DOF2_SetInt(vfile, "ExpJogador", Experiencia[i]);
  1927.                 }
  1928.             }
  1929.         }
  1930.     }
  1931.     return 1;
  1932. }
  1933.  
  1934. public AtualizarChatBubble()
  1935. {
  1936.     for(new x=0; x < MAX_PLAYERS; x++)
  1937.     {
  1938.         if(pAdmin[x] > 3)
  1939.         {
  1940.             SetPlayerChatBubble(x, "Administrador", 0x0080C0AA, 100.0, 10000);
  1941.         }
  1942.     }
  1943. }
  1944.  
  1945. public ReprovarC(playerid)
  1946. {
  1947.     KillTimer(reprovado[playerid]);
  1948.     SendClientMessage(playerid, 0x548B54AA, "==============[ Reprovado ]==============");
  1949.     SendClientMessage(playerid, -1, "* O Seu Curriculo foi analizado e reprovado!");
  1950.     SendClientMessage(playerid, -1, "* Para melhorar Seu Curriculo, Você terá que passar de level!");
  1951.     SendClientMessage(playerid, 0x548B54AA, "==============[ Reprovado ]==============");
  1952.     return 1;
  1953. }
  1954.  
  1955. public CheckCurriculo(playerid)
  1956. {
  1957.     format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
  1958.     if(Profissao[playerid] == Caminhoneiro)
  1959.     {
  1960.         KillTimer(aprovado[playerid]);
  1961.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  1962.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  1963.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é Caminhoneiro!");
  1964.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  1965.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  1966.         LogarProf(playerid);
  1967.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  1968.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1969.         TogglePlayerControllable(playerid, 1);
  1970.     }
  1971.     else if(Profissao[playerid] == MotoTaxi)
  1972.     {
  1973.         KillTimer(aprovado[playerid]);
  1974.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  1975.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  1976.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Moto Taxista!");
  1977.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  1978.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  1979.         LogarProf(playerid);
  1980.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  1981.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1982.         TogglePlayerControllable(playerid,1);
  1983.     }
  1984.     else if(Profissao[playerid] == Taxista)
  1985.     {
  1986.         KillTimer(aprovado[playerid]);
  1987.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  1988.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  1989.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Taxista!");
  1990.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  1991.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  1992.         LogarProf(playerid);
  1993.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  1994.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  1995.         TogglePlayerControllable(playerid,1);
  1996.     }
  1997.     else if(Profissao[playerid] == Maquinista)
  1998.     {
  1999.         KillTimer(aprovado[playerid]);
  2000.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2001.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2002.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Maquinista!");
  2003.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2004.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2005.         LogarProf(playerid);
  2006.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2007.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2008.         TogglePlayerControllable(playerid,1);
  2009.     }
  2010.     else if(Profissao[playerid] == PolicialM)
  2011.     {
  2012.         KillTimer(aprovado[playerid]);
  2013.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2014.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2015.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Policial Militar!");
  2016.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2017.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2018.         LogarProf(playerid);
  2019.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2020.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2021.         TogglePlayerControllable(playerid, 1);
  2022.     }
  2023.     else if(Profissao[playerid] == PolicialC)
  2024.     {
  2025.         KillTimer(aprovado[playerid]);
  2026.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2027.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2028.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Policial Civil!");
  2029.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2030.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2031.         LogarProf(playerid);
  2032.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2033.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2034.         TogglePlayerControllable(playerid, 1);
  2035.     }
  2036.     else if(Profissao[playerid] == PolicialF)
  2037.     {
  2038.         KillTimer(aprovado[playerid]);
  2039.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2040.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2041.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Policial Federal!");
  2042.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2043.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2044.         LogarProf(playerid);
  2045.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2046.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2047.         TogglePlayerControllable(playerid, 1);
  2048.     }
  2049.     else if(Profissao[playerid] == VDrogas)
  2050.     {
  2051.         KillTimer(aprovado[playerid]);
  2052.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2053.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2054.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Vendedor de Drogas!");
  2055.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2056.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2057.         LogarProf(playerid);
  2058.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2059.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2060.         TogglePlayerControllable(playerid, 1);
  2061.     }
  2062.     else if(Profissao[playerid] == TrafArmas)
  2063.     {
  2064.         KillTimer(aprovado[playerid]);
  2065.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2066.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2067.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Traficante de Armas!");
  2068.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2069.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2070.         LogarProf(playerid);
  2071.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2072.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2073.         TogglePlayerControllable(playerid, 1);
  2074.     }
  2075.     else if(Profissao[playerid] == GuardaTransito)
  2076.     {
  2077.         KillTimer(aprovado[playerid]);
  2078.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2079.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2080.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Guarda de Transito!");
  2081.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2082.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2083.         LogarProf(playerid);
  2084.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2085.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2086.         TogglePlayerControllable(playerid, 1);
  2087.     }
  2088.     else if(Profissao[playerid] == Advogado)
  2089.     {
  2090.         KillTimer(aprovado[playerid]);
  2091.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2092.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2093.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Advogado!");
  2094.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2095.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2096.         LogarProf(playerid);
  2097.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2098.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2099.         TogglePlayerControllable(playerid, 1);
  2100.     }
  2101.     else if(Profissao[playerid] == VSorvete)
  2102.     {
  2103.         KillTimer(aprovado[playerid]);
  2104.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2105.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2106.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Vendedor de Sorvete!");
  2107.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2108.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2109.         LogarProf(playerid);
  2110.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2111.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2112.         TogglePlayerControllable(playerid, 1);
  2113.     }
  2114.     else if(Profissao[playerid] == Paramedico)
  2115.     {
  2116.         KillTimer(aprovado[playerid]);
  2117.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2118.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2119.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Paramedico!");
  2120.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2121.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2122.         LogarProf(playerid);
  2123.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2124.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2125.         TogglePlayerControllable(playerid, 1);
  2126.     }
  2127.     else if(Profissao[playerid] == Hacker)
  2128.     {
  2129.         KillTimer(aprovado[playerid]);
  2130.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2131.         SendClientMessage(playerid, -1, "* Seu Currículo foi Analisado e Aprovado!");
  2132.         SendClientMessage(playerid, -1, "* Sua Profissão Agora é um Hacker!");
  2133.         SendClientMessage(playerid, -1, "* Veja os Comandos da sua Profissão: /profissao");
  2134.         SendClientMessage(playerid, 0x548B54AA, "==============[ Aprovado ]==============");
  2135.         LogarProf(playerid);
  2136.         DOF2_SetInt(vfile, "Profissao", Profissao[playerid]);
  2137.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2138.         TogglePlayerControllable(playerid, 1);
  2139.     }
  2140.     return 1;
  2141. }
  2142.  
  2143. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2144. {
  2145.     if (newkeys == KEY_SECONDARY_ATTACK && incar[playerid] == 1)
  2146.     {
  2147.         TogglePlayerControllable(playerid, 1);
  2148.         RemovePlayerFromVehicle(playerid);
  2149.         incar[playerid] = 0;
  2150.     }
  2151.     return 1;
  2152. }
  2153.  
  2154. forward Combustivel();
  2155. public Combustivel()
  2156. {
  2157.     for(new i=0;i<MAX_PLAYERS;i++)
  2158.     {
  2159.         new nomepl[MAX_PLAYER_NAME];
  2160.         GetPlayerName(i, nomepl, sizeof(nomepl));
  2161.         format(vfile, sizeof(vfile), DIRETORIO, nomepl);
  2162.         new vid;
  2163.         vid = GetPlayerVehicleID(i);
  2164.         new modelo;
  2165.         modelo = GetVehicleModel(vid);
  2166.         if(!(modelo == 509 || modelo == 510 || modelo == 481))
  2167.         {
  2168.             new estado;
  2169.             estado = GetPlayerVehicleSeat(i);
  2170.             GetPlayerState(i);
  2171.             if(IsPlayerInAnyVehicle(i) == 1)
  2172.             {
  2173.                 if(estado == 0)
  2174.                 {
  2175.                     DOF2_SetInt(vfile, "Gasolina", DOF2_GetInt(vfile, "Gasolina")-1);
  2176.                 }
  2177.                 if(DOF2_GetInt(vfile, "Gasolina") <= 0) {
  2178.                     SendClientMessage(i, Vermelho, "* Seu combustivel acabou, vá até o posto mais próximo abastecer...");
  2179.                     RemovePlayerFromVehicle(i);
  2180.                 }
  2181.             }
  2182.         }
  2183.     }
  2184. }
  2185.  
  2186. /*stock GivePlayerGranaEx(playerid, quantia)
  2187. {
  2188.     ResetPlayerMoney(playerid);
  2189.     GranaEx[playerid] += quantia;
  2190.     GivePlayerGranaEx(playerid, GranaEx[playerid]);
  2191.     return 1;
  2192. }
  2193.  
  2194. stock ResetPlayerGranaEx(playerid)
  2195. {
  2196.     ResetPlayerMoney(playerid);
  2197.     GranaEx[playerid] = 0;
  2198.     return 1;
  2199. }
  2200.  
  2201. stock GetPlayerGranaEx(playerid)
  2202. {
  2203.     return GranaEx[playerid];
  2204. }
  2205. */
  2206. stock GivePlayerGranaEx(playerid, quant)
  2207. {
  2208.     GivePlayerMoney(playerid, GranaEx[playerid] += quant);
  2209.     //return GranaEx[playerid] += quant;
  2210.     return 1;
  2211. }
  2212.    
  2213. stock GetPlayerGranaEx(playerid)
  2214.     return GranaEx[playerid];
  2215.    
  2216. stock ResetPlayerGranaEx(playerid)
  2217.     return GranaEx[playerid] = 0;
  2218.  
  2219. stock tfile(name[])
  2220. {
  2221.     format(vfile, sizeof(vfile), DIRETORIO, name);
  2222.     return vfile;
  2223. }
  2224.  
  2225. public AtualizarGrana()
  2226. {
  2227.     for(new i=0; i < MAX_PLAYERS; i++)
  2228.     {
  2229.         ResetPlayerGranaEx(i);
  2230.         GivePlayerGranaEx(i, GetPlayerGranaEx(i));
  2231.     }
  2232. }
  2233.  
  2234. public OnPlayerStateChange(playerid, newstate, oldstate)
  2235. {
  2236.     new string[256];
  2237.     if(IsPlayerInAnyVehicle(playerid))
  2238.     {
  2239.         if(pGasolina[playerid] == 0)
  2240.         {
  2241.             SendClientMessage(playerid, Vermelho, "* Seu Combustivel Acabou!");
  2242.             RemovePlayerFromVehicle(playerid);
  2243.             TogglePlayerControllable(playerid, 1);
  2244.         }
  2245.     }
  2246.     if(newstate == PLAYER_STATE_DRIVER)
  2247.     {
  2248.         new pname[MAX_PLAYER_NAME];
  2249.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  2250.         for(new carro = 0; carro < MAX_CARROS; carro++)
  2251.         {
  2252.             new vid;
  2253.             vid = GetPlayerVehicleID(playerid);
  2254.             new mot, lu, alar, por, cap, porma, ob;
  2255.             GetVehicleParamsEx(vid, mot, lu, alar, por, cap, porma, ob);
  2256.             SetVehicleParamsEx(vid, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
  2257.             format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  2258.             if(DOF2_FileExists(string))
  2259.             {
  2260.                 if(vid == DOF2_GetInt(string, "Id"))
  2261.                 {
  2262.                     if(DOF2_GetInt(string, "cDono") == 1 || DOF2_GetInt(string,"cDono2") == 1)
  2263.                     {
  2264.                         //if(strcmp(DOF2_GetString(string, "Dono"), pname, true) == 0) {
  2265.                         if(strcmp(DOF2_GetString(string,"Dono"), pname, true) == 0 || strcmp(DOF2_GetString(string,"Dono2"), pname, true) == 0)
  2266.                         {
  2267.                             format(string, sizeof(string), "* %s, bem-vindo ao seu veiculo '%s'", DOF2_GetString(string, "Dono"), DOF2_GetString(string, "Nome"));
  2268.                             SendClientMessage(playerid, 0xC0C0C0AA, string);
  2269.                         } else if(DOF2_GetInt(string,"cDono2") == 1 && DOF2_GetInt(string,"cDono") == 1)
  2270.                         {
  2271.                             format(string, sizeof(string),"Você é o segundo dono do carro (%s) de %s, seja bem vindo !", DOF2_GetString(string,"Nome"),DOF2_GetString(string,"Dono"));
  2272.                             SendClientMessage(playerid, 0xC0C0C0AA, string);
  2273.                         }
  2274.                         else {
  2275.                             if(DOF2_GetInt(string,"Alarme") == 0)
  2276.                             {
  2277.                                 GetVehicleParamsEx(vid, mot, lu, alar, por, cap, porma, ob);
  2278.                                 SetVehicleParamsEx(vid, mot, lu, VEHICLE_PARAMS_ON, por, cap, porma, ob);
  2279.                                 format(string, sizeof(string), "* Este veiculo : '%s' é de '%s' portanto ele deixou o alarme desativado.", DOF2_GetString(string, "Nome"), DOF2_GetString(string, "Dono"));
  2280.                                 SendClientMessage(playerid, 0xff6633AA, string);
  2281.                                 if(DOF2_GetInt(string,"Alarme") == 1)
  2282.                                 {
  2283.                                     for(new i=0; i<MAX_PLAYERS; i++)
  2284.                                     {
  2285.                                         if(IsPlayerConnected(i))
  2286.                                         {
  2287.                                             new tname[MAX_PLAYER_NAME];
  2288.                                             GetPlayerName(i, tname, sizeof(tname));
  2289.                                             if(strcmp(DOF2_GetString(string, "Dono"), tname, true) == 0 && GetPlayerVehicleID(playerid) == DOF2_GetInt(string, "Id")) {
  2290.                                                 format(string, sizeof(string), "* %s (%d) Tentou Roubar seu veiculo!", pname, playerid);
  2291.                                                 SendClientMessage(i, 0xff6633AA, string);
  2292.                                             }
  2293.                                         }
  2294.                                     }
  2295.                                 }
  2296.                             }
  2297.                             RemovePlayerFromVehicle(playerid);
  2298.                         }
  2299.                     }
  2300.                     else {
  2301.                         format(string, sizeof(string), "[ A VENDA ] Este veiculo está a venda para compra-lo use: /comprarcarro.", DOF2_GetInt(string, "Preco"));
  2302.                         SendClientMessage(playerid, -1, string);
  2303.                         SendClientMessage(playerid, -1, "* Para sair aperte 'F' ou ' ENTER '");
  2304.                         incar[playerid] = 1;
  2305.                         TogglePlayerControllable(playerid, 0);
  2306.                     }
  2307.                 }
  2308.             }
  2309.         }
  2310.     }
  2311. }
  2312.  
  2313.  
  2314.  
  2315.  
  2316. public Liberar(playerid)
  2317. {
  2318.     SetPlayerInterior(playerid, 0);
  2319.     SpawnPlayer(playerid);
  2320.     SetPlayerWantedLevel(playerid, 0);
  2321.     Preso[playerid] = 0;
  2322.     SendClientMessage(playerid, 0xA9C4E4AA, "(CADEIA) Você foi solto automáticamente por cumprir a sua pena na cadeia!");
  2323.     KillTimer(TempoPreso[playerid]);
  2324.     return 1;
  2325. }
  2326.  
  2327. public PayDay()
  2328. {
  2329.     new str[128],banco[128], aname[MAX_PLAYER_NAME];
  2330.     for(new i = 0; i<MAX_PLAYERS; i++)
  2331.     {
  2332.         format(banco, sizeof(banco), DBANCO, aname);
  2333.         //if(!DOF2_FileExists(banco))
  2334.         //{
  2335.         if(DOF2_GetInt(vfile, "TContaBancaria") == 0)
  2336.         {
  2337.             SendClientMessage(i, Vermelho, "* Você não tem uma conta bancária, e assim não receberá seu salário.");
  2338.             SendClientMessage(i, Vermelho, "* Para abrir uma conta bancária procure um banco mais próximo de você.");
  2339.             return 1;
  2340.         }
  2341.         if(DOF2_GetInt(vfile, "TContaBancaria") == 1)
  2342.         {
  2343.             format(str, sizeof(str), "* Você recebeu seu salário.");
  2344.             SendClientMessage(i, 0xCAFF95AA, str);
  2345.             PlayerPlaySound(i, 1057, 0, 0, 0);
  2346.         }
  2347.         if(Profissao[i] == Desempregado)
  2348.         {
  2349.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+SeguroDesemprego);
  2350.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2351.             format(str,128,"Você Recebeu o Seguro-Desemprego e Ganhou : %d", SeguroDesemprego);
  2352.             SendClientMessage(i, -1, str);
  2353.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2354.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2355.         }
  2356.         else if(Profissao[i] == Caminhoneiro)
  2357.         {
  2358.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_Caminhao);
  2359.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2360.             format(str,128,"Você trabalha como Caminhoneiro e Ganhou: %d", Salario_Caminhao);
  2361.             SendClientMessage(i, -1, str);
  2362.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2363.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2364.         }
  2365.         else if(Profissao[i] == Taxista)
  2366.         {
  2367.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_Taxi);
  2368.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2369.             format(str,128,"Você trabalha como Taxista e Ganhou: %d", Salario_Taxi);
  2370.             SendClientMessage(i, -1, str);
  2371.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2372.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2373.         }
  2374.         else if(Profissao[i] == MotoTaxi)
  2375.         {
  2376.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_Maquinista);
  2377.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2378.             format(str,128,"Você trabalha como Maquinista e Ganhou: %d", Salario_Maquinista);
  2379.             SendClientMessage(i, -1, str);
  2380.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2381.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2382.         }
  2383.         else if(Profissao[i] == PolicialM)
  2384.         {
  2385.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_PolicialM);
  2386.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2387.             format(str,128,"Você trabalha como Policial Militar e Ganhou: %d", Salario_PolicialM);
  2388.             SendClientMessage(i, -1, str);
  2389.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2390.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2391.         }
  2392.         else if(Profissao[i] == PolicialC)
  2393.         {
  2394.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_PolicialC);
  2395.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2396.             format(str,128,"Você trabalha como Policial Civil e Ganhou: %d", Salario_PolicialC);
  2397.             SendClientMessage(i, -1, str);
  2398.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2399.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2400.         }
  2401.         else if(Profissao[i] == PolicialF)
  2402.         {
  2403.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_PolicialF);
  2404.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2405.             format(str,128,"Você trabalha como Policial Federal e Ganhou: %d", Salario_PolicialF);
  2406.             SendClientMessage(i, -1, str);
  2407.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2408.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2409.         }
  2410.         else if(Profissao[i] == VDrogas)
  2411.         {
  2412.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_VDrogas);
  2413.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2414.             format(str,128,"Você trabalha como Vendedor de Dorgas e Ganhou: %d", Salario_VDrogas);
  2415.             SendClientMessage(i, -1, str);
  2416.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2417.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2418.         }
  2419.         else if(Profissao[i] == TrafArmas)
  2420.         {
  2421.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_TrafArmas);
  2422.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2423.             format(str,128,"Você trabalha como Traficante de Armas e Ganhou: %d", Salario_TrafArmas);
  2424.             SendClientMessage(i, -1, str);
  2425.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2426.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2427.         }
  2428.         else if(Profissao[i] == GuardaTransito)
  2429.         {
  2430.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_GuardaTr);
  2431.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2432.             format(str,128,"Você trabalha como Guarda de Transito e Ganhou: %d", Salario_GuardaTr);
  2433.             SendClientMessage(i, -1, str);
  2434.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2435.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2436.         }
  2437.         else if(Profissao[i] == Advogado)
  2438.         {
  2439.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_Advogado);
  2440.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2441.             format(str,128,"Você trabalha como Advogado e Ganhou: %d", Salario_Advogado);
  2442.             SendClientMessage(i, -1, str);
  2443.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2444.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2445.         }
  2446.         else if(Profissao[i] == VSorvete)
  2447.         {
  2448.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_VSorvete);
  2449.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2450.             format(str,128,"Você trabalha como Vendedor de Sorvete e Ganhou: %d", Salario_VSorvete);
  2451.             SendClientMessage(i, -1, str);
  2452.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2453.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2454.         }
  2455.         else if(Profissao[i] == Paramedico)
  2456.         {
  2457.             DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_Paramedico);
  2458.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2459.             format(str,128,"Você trabalha como Paramedico e Ganhou: %d", Salario_Paramedico);
  2460.             SendClientMessage(i, -1, str);
  2461.             SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2462.             SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2463.         }
  2464.         else if(Profissao[i] == Hacker)
  2465.         DOF2_SetInt(banco, "SaldoBancario", DOF2_GetInt(banco, "SaldoBancario")+Salario_Hacker);
  2466.         SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2467.         format(str,128,"Você trabalha como Hacker e Ganhou: %d", Salario_Hacker);
  2468.         SendClientMessage(i, -1, str);
  2469.         SendClientMessage(i, -1, "* O Seu Pagamento Foi Depositado no Banco!");
  2470.         SendClientMessage(i, 0xCDCD00AA, "==========[ Salário ]============");
  2471.     }
  2472.     return 1;
  2473. }
  2474.  
  2475. public Avisado(playerid)
  2476. {
  2477.     if(IsPlayerConnected(playerid))
  2478.     {
  2479.         if(Aviso[playerid] == 1)
  2480.         {
  2481.             Aviso[playerid]= 0;
  2482.         }
  2483.     }
  2484. }
  2485.  
  2486. forward TextoGaso();
  2487. public TextoGaso()
  2488. {
  2489.     for(new i=0;i<MAX_PLAYERS;i++)
  2490.     {
  2491.         if(IsPlayerConnected(i))
  2492.         {
  2493.             if(IsPlayerInAnyVehicle(i))
  2494.             {
  2495.                 new string3[256];
  2496.                 format(string3, sizeof(string3), "   ~b~%d ~w~Litros",pGasolina[i]);
  2497.                 TextDrawSetString(TGasosa[i], string3);
  2498.             }
  2499.             else {
  2500.                 TextDrawHideForPlayer(i, TGasosa[i]);
  2501.             }
  2502.         }
  2503.     }
  2504. }
  2505.  
  2506.  
  2507. forward TextoGrana();
  2508. public TextoGrana()
  2509. {
  2510.     new string[256];
  2511.     for(new i=0;i<MAX_PLAYERS;i++)
  2512.     {
  2513.         if(IsPlayerConnected(i))
  2514.         {
  2515.             format(string, sizeof(string), "~g~$~w~000000000", GetPlayerGranaEx(i));
  2516.             TextDrawSetString(gText3[i], string);
  2517.             TextDrawShowForPlayer(i, gText3[i]);
  2518.             TextDrawHideForPlayer(i, gText3[i]);
  2519.             }
  2520.         }
  2521.     return 1;
  2522. }
  2523.  
  2524. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  2525. {
  2526.     if(Mutecmd[playerid] == 1)
  2527.     {
  2528.         SendClientMessage(playerid, 0xFF0000AA, "* Você está bloqueado de usar Comandos. Aguarde..");
  2529.         return 1;
  2530.     }
  2531.     if(Aviso[playerid] == 1)
  2532.     {
  2533.         SendClientMessage(playerid, 0xFF0000AA, "* Você foi bloqueado de usar comandos. Motivo: Flood");
  2534.         Mutecmd[playerid] = 1;
  2535.         Aviso[playerid] = 0;
  2536.         return 0;
  2537.     }
  2538.     if(!success)
  2539.     {
  2540.         new strx[64];
  2541.         format(strx, 46, "SERVER: Comando %s - Inexistente!",cmdtext);
  2542.         return SendClientMessage(playerid, Vermelho, strx);
  2543.     }
  2544.     return true;
  2545. }
  2546.  
  2547. public OnPlayerExitedMenu(playerid)
  2548. {
  2549.     TogglePlayerControllable(playerid,1);
  2550.     return 1;
  2551. }
  2552.  
  2553. stock SetPlayerPosEx(playerid,Float:X,Float:Y,Float:Z)
  2554. {
  2555.     PlayerEnterTime[playerid]+=221;
  2556.     SetPlayerPos(playerid,X,Y,Z);
  2557. }
  2558.  
  2559. stock PutPlayerInVehicleEx(playerid,vehicleid,seatid)
  2560. {
  2561.     PlayerEnterTime[playerid]+=221;
  2562.     PutPlayerInVehicle(playerid,vehicleid,seatid);
  2563. }
  2564.  
  2565. stock RemovePlayerFromVehicleEx(playerid)
  2566. {
  2567.     PlayerEnterTime[playerid]+=221;
  2568.     RemovePlayerFromVehicle(playerid);
  2569. }
  2570.  
  2571. stock strrest(const string[], &index)
  2572. {
  2573.     new length = strlen(string);
  2574.     while ((index < length) && (string[index] <= ' '))
  2575.     {
  2576.         index++;
  2577.     }
  2578.     new offset = index;
  2579.     new result[128];
  2580.     while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
  2581.     {
  2582.         result[index - offset] = string[index];
  2583.         index++;
  2584.     }
  2585.     result[index - offset] = EOS;
  2586.     return result;
  2587. }
  2588.  
  2589. stock GetPlayerArea(playerid)
  2590. {
  2591.     new str[130];
  2592.     format(str,sizeof(str),"%s",Zones[GetPlayerZone(playerid)][zone_name]);
  2593.     return str;
  2594. }
  2595.  
  2596. stock chrfind(needle, haystack[], start = 0)
  2597. {
  2598.     while(haystack[start])
  2599.     {
  2600.         if(haystack[start++] == needle)
  2601.         {
  2602.             return start-1;
  2603.         }
  2604.     }
  2605.     return -1;
  2606. }
  2607.  
  2608. stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
  2609. {
  2610.     new RetValue = 0;
  2611.     new Float:X,Float:Y,Float:Z;
  2612.     GetPlayerPos(playerid,X,Y,Z );
  2613.  
  2614.     if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
  2615.     {
  2616.         RetValue = 1;
  2617.     }
  2618.     return RetValue;
  2619. }
  2620.  
  2621. stock SetTimers()
  2622. {
  2623.     SetTimer("Avisado", 2000, 1);
  2624.     SetTimer("Combustivel",180000, 1);
  2625.     SetTimer("ChecarPing", 60000, 1);
  2626.     SetTimer("LoteriaPublic", 600000, 1);
  2627.     SetTimer("AntAfk", 1000, 1);
  2628.     SetTimer("Payday", 2400000 , 1);
  2629.     SetTimer("TextoGrana", 800, 1);
  2630.     SetTimer("TextoGaso", 800, 1);
  2631.     SetTimer("GanharExp", 600000 , 1);
  2632.     SetTimer("AtualizarChatBubble", 10000, true);
  2633.     SetTimer("TempoExpMinuto", 60000, 1);
  2634.     SetTimer("PostosG", 800, 1);
  2635.     SetTimer("AtualizarGrana", 250, 1);
  2636. }
  2637.  
  2638. stock GetPlayerDistanceToPoint(playerid,Float:x,Float:y)
  2639. {
  2640.     new Float:x1,Float:y1,Float:z1;
  2641.     new Float:tmpdis;
  2642.     GetPlayerPos(playerid,x1,y1,z1);
  2643.     tmpdis = floatsqroot(floatpower(floatabs(floatsub(x,x1)),2)+floatpower(floatabs(floatsub(y,y1)),2));
  2644.     return floatround(tmpdis);
  2645. }
  2646.  
  2647. stock IsPlayerFlooding(playerid)
  2648. {
  2649.     if(GetTickCount() - iPlayerChatTime[playerid] < 2000)
  2650.         return 1;
  2651.     return 0;
  2652. }
  2653.  
  2654. stock ConverterTexto(string[])
  2655. {
  2656.     for(new arraysize = 0; arraysize < strlen(string); arraysize++)
  2657.     {
  2658.         if(strfind(string, "â", true) != -1){new pos = strfind(string, "â", true); strdel(string, pos, pos+strlen("â")); strins(string, "™", pos, sizeof(pos));}
  2659.         if(strfind(string, "ã", true) != -1){new pos = strfind(string, "ã", true); strdel(string, pos, pos+strlen("ã")); strins(string, "š", pos, sizeof(pos));}
  2660.         if(strfind(string, "á", true) != -1){new pos = strfind(string, "á", true); strdel(string, pos, pos+strlen("á")); strins(string, "˜", pos, sizeof(pos));}
  2661.         if(strfind(string, "é", true) != -1){new pos = strfind(string, "é", true); strdel(string, pos, pos+strlen("é")); strins(string, "ž", pos, sizeof(pos));}
  2662.         if(strfind(string, "ú", true) != -1){new pos = strfind(string, "ú", true); strdel(string, pos, pos+strlen("ú")); strins(string, "“", pos, sizeof(pos));}
  2663.         if(strfind(string, "ó", true) != -1){new pos = strfind(string, "ó", true); strdel(string, pos, pos+strlen("ó")); strins(string, "¦", pos, sizeof(pos));}
  2664.         if(strfind(string, "ê", true) != -1){new pos = strfind(string, "ê", true); strdel(string, pos, pos+strlen("ê")); strins(string, "Ÿ", pos, sizeof(pos));}
  2665.         if(strfind(string, "í", true) != -1){new pos = strfind(string, "í", true); strdel(string, pos, pos+strlen("í")); strins(string, "¢", pos, sizeof(pos));}
  2666.         if(strfind(string, "ç", true) != -1){new pos = strfind(string, "ç", true); strdel(string, pos, pos+strlen("ç")); strins(string, "œ", pos, sizeof(pos));}
  2667.         if(strfind(string, "ô", true) != -1){new pos = strfind(string, "ô", true); strdel(string, pos, pos+strlen("ô")); strins(string, "§", pos, sizeof(pos));}
  2668.     }
  2669. }
  2670.  
  2671. public AntAfk(playerid)
  2672. {
  2673.     if(!floatcmp(PlayerPosAfk[ 0 ], PlayerLastPos[ playerid ][ LastX ]) && !floatcmp(PlayerPosAfk[ 1 ], PlayerLastPos[ playerid ][ LastY ]))
  2674.     {
  2675.         PlayerAfkTicks[ playerid ] ++;
  2676.     }
  2677.     else {
  2678.         PlayerAfkTicks[ playerid ] = 0;
  2679.     }
  2680.     PlayerLastPos[ playerid ][ LastX ] = PlayerPosAfk[ 0 ];
  2681.     PlayerLastPos[ playerid ][ LastY ] = PlayerPosAfk[ 1 ];
  2682.     PlayerLastPos[ playerid ][ LastZ ] = PlayerPosAfk[ 2 ];
  2683.     if(PlayerAfkTicks[ playerid ] == MAX_TEMPO_AFK * 60)
  2684.     {
  2685.         pAFK[ playerid ] = 1;
  2686.         SendClientMessage( playerid, Amarelo, "[ ANT - AFK ] Você foi bloqueado de passar de nivel!");
  2687.         SetPlayerVirtualWorld( playerid, 1);
  2688.         SetCameraBehindPlayer( playerid );
  2689.         TogglePlayerControllable( playerid, 0);
  2690.         TextDrawShowForPlayer( playerid, AfkText);
  2691.         TextDrawShowForPlayer( playerid, AfkBackText);
  2692.     }
  2693.     return 1;
  2694. }
  2695.  
  2696. public BanLog(string[])
  2697. {
  2698.     new entry[256];
  2699.     format(entry, sizeof(entry), "%s\r\n",string);
  2700.     new File:hFile;
  2701.     hFile = fopen("Ban.log", io_append);
  2702.     fwrite(hFile, entry);
  2703.     fclose(hFile);
  2704. }
  2705.  
  2706. public IsNumeric(const string[])
  2707. {
  2708.     for (new i = 0, j = strlen(string); i < j; i++) if (string[i] > '9' || string[i] < '0') return 0;
  2709.     return 1;
  2710. }
  2711.  
  2712. public LoteriaPublic()
  2713. {
  2714.     new stringcm[256];
  2715.     new numerosorteado = randomEx(0, 99);
  2716.     new rand = random(15000); rand += 5000;
  2717.     DinheiroAcumuladoLoto += rand;
  2718.     for(new i=0; i<MAX_PLAYERS; i++)
  2719.     {
  2720.         if(TaJogando[i] == 1)
  2721.         {
  2722.             if(vernumerosorteado[i] == numerosorteado)
  2723.             {
  2724.                 TGanhador = i;
  2725.             }
  2726.             TaJogando[i] = 0;
  2727.             NumeroLoto[i] = 0;
  2728.         }
  2729.     }
  2730.     if(TGanhador != 0)
  2731.     {
  2732.         format(stringcm, sizeof(stringcm), "( Loteria ) %s ganhou %iR$ Na Loteria!!! - Número Sorteado: %i - Parabens ao Ganhador!", pName(TGanhador), DinheiroAcumuladoLoto, numerosorteado);
  2733.         GivePlayerGranaEx(TGanhador, DinheiroAcumuladoLoto);
  2734.         SendClientMessageToAll(Verde, stringcm);
  2735.         TGanhador = -1;
  2736.     }
  2737.     format(stringcm, sizeof(stringcm), "( Loteria ) Prêmio Acumulado: %iR$ - Número Sorteado: %i - Nenhum Ganhador", DinheiroAcumuladoLoto, numerosorteado); // %i %i = antigo
  2738.     SendClientMessageToAll(Verde, stringcm);
  2739.     return 1;
  2740. }
  2741.  
  2742. stock randomEx(minnum = cellmin,maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
  2743.  
  2744. stock pName(playerid)
  2745. {
  2746.     new aname[24];
  2747.     GetPlayerName(playerid,aname,24);
  2748.     return aname;
  2749. }
  2750.  
  2751.  
  2752. stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  2753. {
  2754.     new Float:oldposx, Float:oldposy, Float:oldposz;
  2755.     new Float:tempposx, Float:tempposy, Float:tempposz;
  2756.     GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  2757.     tempposx = (oldposx -x);
  2758.     tempposy = (oldposy -y);
  2759.     tempposz = (oldposz -z);
  2760.     if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz >-radi)))
  2761.     {
  2762.         return true;
  2763.     }
  2764.     return false;
  2765. }
  2766.  
  2767. stock AtualizarRG(playerid)
  2768. {
  2769.     SendClientMessage(playerid, 0x00FFFFAA, " ");
  2770.     SendClientMessage(playerid, 0x00FFFFAA, " ");
  2771.     new String[128];
  2772.     new terrestre[10], nautica[10], aerea[10], porte[10];
  2773.     static HabTerrestre[MAX_PLAYERS], HabNautica[MAX_PLAYERS], Porte[MAX_PLAYERS], HabAerea[MAX_PLAYERS];
  2774.     format(String, sizeof(String),"» Nome do Personagem : %s",pName(playerid));
  2775.     SendClientMessage(playerid, 0x00FFFFAA,String);
  2776.     format(String, sizeof(String),"Level: [%d] » Saldo Em Mãos: [%d] » Pais: [%s]", pLevel[playerid], GetPlayerGranaEx(playerid), DOF2_GetString(vfile, "Pais"));
  2777.     SendClientMessage(playerid, 0x00FFFFAA,String);
  2778.     format(String, sizeof(String),"Exp: [%d/5] » Skin: [%d] » Saldo Bancario: [%d]", Experiencia[playerid], DOF2_GetInt(vfile,"Skin"), DOF2_GetInt(vfile, "SaldoBancario"));
  2779.     SendClientMessage(playerid, 0x00FFFFAA,String);
  2780.     format(String, sizeof(String),"Habilitação Terreste: [ %s ] » Habilitação Nautica : [ %s ] » Habilitação Aerea : [ %s ] » Porte Legal de Armas : [ %s ]",terrestre, nautica, aerea, porte);
  2781.     SendClientMessage(playerid, 0x00FFFFAA,String);
  2782.     if(HabTerrestre[playerid] == 1)
  2783.     { terrestre = "Sim"; } else { terrestre = "Nao"; }
  2784.     if(HabNautica[playerid] == 1)
  2785.     { nautica = "Sim"; } else { nautica = "Nao"; }
  2786.     if(HabAerea[playerid] == 1) {
  2787.     aerea = "Sim"; } else { aerea = "Nao";
  2788.     }
  2789.     if(Porte[playerid] == 1) { porte = "Sim"; } else { porte = "Nao";
  2790.     }
  2791.     return true;
  2792. }
  2793.  
  2794. stock GetDistanceBetweenPlayers(playerid,playerid2)
  2795. {
  2796.     new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  2797.     new Float:tmpdis;
  2798.     GetPlayerPos(playerid,x1,y1,z1);
  2799.     GetPlayerPos(playerid2,x2,y2,z2);
  2800.     tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  2801.     return floatround(tmpdis);
  2802. }
  2803.  
  2804. stock Desconectar(playerid)
  2805. {
  2806.     new conta[256], banco[256];
  2807.     format(conta, sizeof(conta), DIRETORIO, pName(playerid));
  2808.     format(banco, sizeof(banco), DBANCO, pName(playerid));
  2809.     if(pFase[playerid][Logado] == 1)
  2810.     {
  2811.         DOF2_SetInt(conta, "Procurado", GetPlayerWantedLevel(playerid));
  2812.         DOF2_SetInt(conta, "Gasolina", pGasolina[playerid]);
  2813.         DOF2_SetInt(conta, "Level", pLevel[playerid]);
  2814.         DOF2_SetInt(conta, "ExpJogador", Experiencia[playerid]);
  2815.         DOF2_SetInt(conta, "Profissao", Profissao[playerid]);
  2816.         DOF2_SetInt(conta, "Preso", Preso[playerid]);
  2817.         return 1;
  2818.     }
  2819.     return 1;
  2820. }
  2821.  
  2822. // ***** Comandos *****
  2823.     //- Sistema Banco -
  2824.     CMD:logarconta(playerid)
  2825.     {
  2826.         new string[128];
  2827.         new banco[128];
  2828.         if(LogadoBanco[playerid] == 1)
  2829.         {
  2830.             SendClientMessage(playerid, Vermelho, "(ERRO) Você já está logado em sua conta bancária.");
  2831.             return 1;
  2832.         }
  2833.         format(banco, sizeof(banco), DBANCO, pName(playerid));
  2834.         if(!DOF2_FileExists(banco))
  2835.         {
  2836.             SendClientMessage(playerid, Vermelho, "(BANCO) Você não tem uma conta no banco, Para criar uma: /criarconta");
  2837.             return 1;
  2838.         }
  2839.         format(string, sizeof(string), "** Banco Base RPG **\n\nNome de usuário: %s\n\nInsira sua senha bancária:", pName(playerid));
  2840.         ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Conta Bancária", string, "Entrar", "Cancelar");
  2841.         return 1;
  2842.     }
  2843.  
  2844.     CMD:dfirewall(playerid)
  2845.     {
  2846.         SendClientMessage(playerid, 0x7FFFD4, "(») Aguarde enquanto derrubamos o firewall.......");
  2847.         AcessoOn[playerid] = true;
  2848.         KillFirewall[playerid] = SetTimerEx("Firewall", 20000, false, "i", playerid);
  2849.         FirewallOn[playerid] = 0;
  2850.         return 1;
  2851.     }
  2852.  
  2853.     CMD:invadirbanco(playerid)
  2854.     {
  2855.         if(Profissao[playerid] == Hacker)
  2856.         {
  2857.             if(FirewallOn[playerid] == 1)
  2858.             {
  2859.                 SendClientMessage(playerid, 0xFF5E35AA, "* Você vai ter que derrubar o firewall para acessar o banco! use: /dfirewall - para Acessar o Menu Hacker");
  2860.             }
  2861.             if(FirewallOn[playerid] == 0)
  2862.             {
  2863.                 if(RoubarBanco[playerid] == 0)
  2864.                 {
  2865.                     new str[128];
  2866.                     format(str, sizeof(str), "\nDigite: SHUTDOWN\nPara Derrubar o Firewall do Banco e Aguarde!");
  2867.                     ShowPlayerDialog(playerid, 7484, DIALOG_STYLE_INPUT, "DDOS * SA:MP", str, "Ok", "Cancelar Invasao");
  2868.                     SendClientMessage(playerid, 0x7FFFD4, "(») Assalto em Andamento! Digite: ' SHUTDOWN ' No Dialog - Para derrubar o firewall do banco!");
  2869.                     AcessoOn[playerid] = true;
  2870.                     RoubarBanco[playerid] = 1;
  2871.                     KillFirewall[playerid] = SetTimerEx("Firewall", 20000, false, "i", playerid);
  2872.                 }
  2873.             }
  2874.         }
  2875.         return 1;
  2876.     }
  2877.  
  2878.     CMD:criarconta(playerid)
  2879.     {
  2880.         new string[128];
  2881.         new banco[128];
  2882.         format(banco, sizeof(banco), DBANCO, pName(playerid));
  2883.         if(DOF2_FileExists(banco))
  2884.         {
  2885.             SendClientMessage(playerid, Vermelho, "(BANCO) Você já tem uma conta no banco, para acessa-lá: /logarconta");
  2886.             return 1;
  2887.         }
  2888.         format(string, sizeof(string), "Conta Bancária\n\nNome de usuário: %s\n\nInsira uma senha bancária:", pName(playerid));
  2889.         ShowPlayerDialog(playerid, 1442, DIALOG_STYLE_INPUT, "Conta Bancária", string, "Criar", "Cancelar");
  2890.         DOF2_SetInt(vfile, "TContaBancaria", 1);
  2891.         return 1;
  2892.     }
  2893.  
  2894.     CMD:comandos(playerid)
  2895.     {
  2896.         SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  2897.         SendClientMessage(playerid, -1, "> /comandos » /ajuda » /admins » /vips » /coomprarbilhete » /rg » senhabanco » /banco");
  2898.         SendClientMessage(playerid, -1, "> /logarconta » /criarconta » /relatorio » /creditos » /lutas » /gps » pm");
  2899.         SendClientMessage(playerid, -1, "> /trancar » /destrancar » /p » /sairafk » /modoafk ");
  2900.         SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  2901.         return 1;
  2902.     }
  2903.  
  2904.     CMD:empregos(playerid)
  2905.     {
  2906.         ShowPlayerDialog(playerid,pMenuProf, DIALOG_STYLE_LIST, "Empregos", "{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}Honestas {FFFAFA}2 {00FF00}]\n{00FF00}[ {FFFAFA}Carreira {FFD700}Criminosa {00FF00}]\n{00FF00}[ {FFD700}Governo {00FF00}]\n{00FF00}[ {FFD700}Transporte {00FF00}]\n{00FF00}[ {FFFAFA}Profissões {FFD700}da {FFFAFA}Mafia {00FF00}]", "Ok", "Fechar");
  2907.         SendClientMessage(playerid, Amarelo,"~> {FFD700}Escolha a Profissão de Acordo com seu Level!");
  2908.         return 1;
  2909.     }
  2910.  
  2911.     CMD:rg(playerid)
  2912.     {
  2913.         AtualizarRG(playerid);
  2914.         return 1;
  2915.     }
  2916.  
  2917.     CMD:grana(playerid)
  2918.     {
  2919.         GivePlayerGranaEx(playerid, 5000);
  2920.         return 1;
  2921.     }
  2922.  
  2923.     CMD:banco(playerid)
  2924.     {
  2925.         new banco[128];
  2926.         if(Assalto[playerid] == 1)
  2927.         {
  2928.             SendClientMessage(playerid, Vermelho, "(x) Houve um assalto no banco, tente novamente mas tarde!");
  2929.             return 1;
  2930.         }
  2931.         if(!LogadoBanco[playerid])
  2932.         {
  2933.             SendClientMessage(playerid, Vermelho, "(BANCO) Você precisa logar em sua conta bancária.");
  2934.             return 1;
  2935.         }
  2936.         format(banco, sizeof(banco), DBANCO, pName(playerid));
  2937.         if(!DOF2_FileExists(banco))
  2938.         {
  2939.             SendClientMessage(playerid, Vermelho, "(BANCO) Você não tem uma conta no banco, Para criar uma: /criarconta");
  2940.             return 1;
  2941.         }
  2942.         ShowPlayerDialog(playerid, 4242, DIALOG_STYLE_LIST,"Banco","~>    {FFFFFF}[ {00FF00}Sacar {FFFFFF}]\n~>    {FFFFFF}[ {00FF00}Depositar {FFFFFF}]\n~>     {FFFFFF}[ {00FF00}Consultar Saldo {FFFFFF}]","Solicitar","Fechar");
  2943.         TogglePlayerControllable(playerid,1);
  2944.         SendClientMessage(playerid, -1, "Escolha o seu serviço e clique em Solicitar.");
  2945.         return 1;
  2946.     }
  2947.  
  2948.     CMD:senhabanco(playerid)
  2949.     {
  2950.         if(!LogadoBanco[playerid])
  2951.         {
  2952.             SendClientMessage(playerid, Vermelho, "(BANCO) Você precisa logar em sua conta bancária.");
  2953.             return 1;
  2954.         }
  2955.         new str[128];
  2956.         format(str, sizeof(str), "** Banco Base RPG **\n\nInsira sua senha antiga:", pName(playerid));
  2957.         ShowPlayerDialog(playerid, 1444, DIALOG_STYLE_INPUT, "Senha Conta Bancária", str, "Confirmar", "Cancelar");
  2958.         SenhaBanco[playerid] = true;
  2959.         return 1;
  2960.     }
  2961.     //- Fim Bank Systen -
  2962.  
  2963.     CMD:meulevel(playerid)
  2964.     {
  2965.         static string[128];
  2966.         format(string, sizeof(string), "~w~LEVEL: ~p~%d ~n~ ~w~EXPERIENCIA: ~p~(%d/5)", pLevel[playerid], Experiencia[playerid]);
  2967.         GameTextForPlayer(playerid, string, 3000, 1);
  2968.         SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Level ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2969.         format(string, sizeof(string), "* Level: %d", pLevel[playerid]);
  2970.         SendClientMessage(playerid, 0xFFFFFFFF, string);
  2971.         format(string, sizeof(string), "* Experiência: (%d/5)", Experiencia[playerid]);
  2972.         SendClientMessage(playerid, 0xFFFFFFFF, string);
  2973.         format(string, sizeof(string), "* Faltam %d minuto(s) restantes para proxima Exp!!", TempoLevelMinuto);
  2974.         SendClientMessage(playerid, 0xFFFFFFFF, string);
  2975.         SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~~~~ Level ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2976.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  2977.         return 1;
  2978.     }
  2979.  
  2980.     CMD:sistema(playerid, params[])
  2981.     {
  2982.         if(sscanf(params, "ui", params)) return SendClientMessage(playerid, -1, "SERVER: /sistema [level/salario]");
  2983.         else if(strcmp(params, "level", true) == 0)
  2984.         {
  2985.             SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  2986.             SendClientMessage(playerid, -1, "* A Cada 20 Minutos Você Ganhar 1 Ponto de Experiencia, Ao Completar 5/5 de Experencia, Você ganha 1 Level.");
  2987.             SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  2988.         }
  2989.         else if(strcmp(params, "salario", true) == 0)
  2990.         {
  2991.             SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  2992.             SendClientMessage(playerid, -1, "* Assim que a Loteria for Sorteada ( De Uma em Uma 1 Hora ) o Salário de todos é Pago!");
  2993.             SendClientMessage(playerid, -1, "* Cada Profissão tem um Salário com seu Preço Justo.");
  2994.             SendClientMessage(playerid, -1, "* Caso Você esteja desempregado , Você só receberar o Seguro-Desemprego.");
  2995.             SendClientMessage(playerid, 0xCDCD00AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  2996.         }
  2997.         return 1;
  2998.     }
  2999.  
  3000.     CMD:mudarsenha(playerid)
  3001.     {
  3002.         if(IsPlayerConnected(playerid))
  3003.         {
  3004.             new str[128];
  3005.             format(str, sizeof(str), "Nome de usuário: %s\n\nInsira uma senha:", pName(playerid));
  3006.             ShowPlayerDialog(playerid, 9459, DIALOG_STYLE_INPUT, "Conta", str, "Confirmar", "Cancelar");
  3007.         }
  3008.         return 1;
  3009.     }
  3010.  
  3011.     CMD:presos(playerid)
  3012.     {
  3013.         SendClientMessage(playerid, 0x98FB98AA, "* Presidiarios:");
  3014.         new string[90];
  3015.         for(new i=0; i < MAX_PLAYERS; i++)
  3016.         {
  3017.             if(IsPlayerConnected(i))
  3018.             {
  3019.                 if(Preso[i] == 1)
  3020.                 {
  3021.                     format(string, sizeof(string), "%d: %s", i, pName(i));
  3022.                     SendClientMessage(playerid, 0xFFFFFFAA, string);
  3023.                 }
  3024.             }
  3025.         }
  3026.         return 1;
  3027.     }
  3028.  
  3029.     CMD:sairafk(playerid)
  3030.     {
  3031.         if(pAFK[playerid] == 1)
  3032.         {
  3033.             pAFK[playerid] = 0;
  3034.             SetPlayerVirtualWorld(playerid, 0);
  3035.             TogglePlayerControllable(playerid,1);
  3036.             TextDrawHideForPlayer(playerid,AfkText);
  3037.             TextDrawHideForPlayer(playerid,AfkBackText);
  3038.             SendClientMessage(playerid, Verde, "* Você não está mas afk! Pode Voltar a Jogar Normalmente!");
  3039.         }
  3040.         else {
  3041.             SendClientMessage(playerid,Vermelho,"* Você não está Ausente!");
  3042.             return 1;
  3043.         }
  3044.         return 1;
  3045.     }
  3046.  
  3047.     CMD:profissao(playerid)
  3048.     {
  3049.         if(Profissao[playerid] == Desempregado)
  3050.         {
  3051.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~ Desempregado ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3052.             SendClientMessage(playerid, 0xFFFFFFFF, "* Vai trabalhar seu vagabundo!");
  3053.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão.");
  3054.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~ Desempregado ~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3055.         }
  3056.         else if(Profissao[playerid] == Caminhoneiro)
  3057.         {
  3058.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Caminhoneiro ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3059.             SendClientMessage(playerid, 0xFFFFFFFF, "* Você trabalha fazendo entregas..");
  3060.             SendClientMessage(playerid, 0xFFFFFFFF, "/carregar - Para carregar seu caminhão.");
  3061.             SendClientMessage(playerid, 0xFFFFFFFF, "/descarregar - Para descarregar seu caminhão.");
  3062.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3063.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Caminhoneiro ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3064.         }
  3065.         else if(Profissao[playerid] == MotoTaxi)
  3066.         {
  3067.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Moto Taxi ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3068.             SendClientMessage(playerid, 0xFFFFFFFF, "/tarifa [id] [preço] - Para carregar seu caminhão.");
  3069.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3070.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Moto Taxi ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3071.         }
  3072.         else if(Profissao[playerid] == Taxista)
  3073.         {
  3074.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Taxista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3075.             SendClientMessage(playerid, 0xFFFFFFFF, "/tarifa [id] [preço] - Para carregar seu caminhão.");
  3076.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3077.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Taxista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3078.         }
  3079.         else if(Profissao[playerid] == Maquinista)
  3080.         {
  3081.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maquinista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3082.             SendClientMessage(playerid, 0xFFFFFFFF, "* Você digire trens por los santos / las venturas / san fierro");
  3083.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3084.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maquinista ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3085.         }
  3086.         else if(Profissao[playerid] == PolicialM)
  3087.         {
  3088.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Militar ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3089.             SendClientMessage(playerid, 0xFFFFFFFF, "/prender [id] [motivo]");
  3090.             SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
  3091.             SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
  3092.             SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
  3093.             SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
  3094.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3095.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Militar ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3096.         }
  3097.         else if(Profissao[playerid] == PolicialC)
  3098.         {
  3099.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Civil ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3100.             SendClientMessage(playerid, 0xFFFFFFFF, "/prender [id] [motivo]");
  3101.             SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
  3102.             SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
  3103.             SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
  3104.             SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
  3105.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3106.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Civil ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3107.         }
  3108.         else if(Profissao[playerid] == PolicialF)
  3109.         {
  3110.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Federal ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3111.             SendClientMessage(playerid, 0xFFFFFFFF, "/prender [id] [motivo]");
  3112.             SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
  3113.             SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
  3114.             SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
  3115.             SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
  3116.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3117.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Policia Federal ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3118.         }
  3119.         else if(Profissao[playerid] == VDrogas)
  3120.         {
  3121.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ V. de Drogas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3122.             SendClientMessage(playerid, 0xFFFFFFFF, "/vmaconha [id] [preço]");
  3123.             SendClientMessage(playerid, 0xFFFFFFFF, "/vcrack [id] [preço]");
  3124.             SendClientMessage(playerid, 0xFFFFFFFF, "/vcoicaina [id] [preço]");
  3125.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3126.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ V. de Drogas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3127.         }
  3128.         else if(Profissao[playerid] == TrafArmas)
  3129.         {
  3130.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traficante de Armas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3131.             SendClientMessage(playerid, 0xFFFFFFFF, "/vak [id] [preço]");
  3132.             SendClientMessage(playerid, 0xFFFFFFFF, "/vtec [id] [preço]");
  3133.             SendClientMessage(playerid, 0xFFFFFFFF, "/vfaca [id] [preço]");
  3134.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3135.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traficante de Armas ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3136.         }
  3137.         else if(Profissao[playerid] == GuardaTransito)
  3138.         {
  3139.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Guarda de Transito ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3140.             SendClientMessage(playerid, 0xFFFFFFFF, "* Você cuida do transito de los santos.");
  3141.             SendClientMessage(playerid, 0xFFFFFFFF, "/multar [id] [motivo] [preço]");
  3142.             SendClientMessage(playerid, 0xFFFFFFFF, "/trocarcela [id] [motivo]");
  3143.             SendClientMessage(playerid, 0xFFFFFFFF, "/bafometro [id]");
  3144.             SendClientMessage(playerid, 0xFFFFFFFF, "/aprenderarmas [id]");
  3145.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3146.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Guarda de Transito ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3147.         }
  3148.         else if(Profissao[playerid] == Advogado)
  3149.         {
  3150.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advogado ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3151.             SendClientMessage(playerid, 0xFFFFFFFF, "/soltar [id] [preço]");
  3152.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3153.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advogado ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3154.         }
  3155.         else if(Profissao[playerid] == VSorvete)
  3156.         {
  3157.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vendedor de Sorvete ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3158.             SendClientMessage(playerid, 0xFFFFFFFF, "/vsorvete [id] [preço]");
  3159.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3160.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vendedor de Sorvete ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3161.         }
  3162.         else if(Profissao[playerid] == Paramedico)
  3163.         {
  3164.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Paramedico ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3165.             SendClientMessage(playerid, 0xFFFFFFFF, "/darplano [id]");
  3166.             SendClientMessage(playerid, 0xFFFFFFFF, "/curar [id] [preço]");
  3167.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3168.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Paramedico ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3169.         }
  3170.         else if(Profissao[playerid] == Hacker)
  3171.         {
  3172.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hacker ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3173.             SendClientMessage(playerid, 0xFFFFFFFF, "/invadirbanco - Invade o Banco e Roubar Grana");
  3174.             SendClientMessage(playerid, 0xFFFFFFFF, "/dfirewall - Desativa o Firewall");
  3175.             SendClientMessage(playerid, 0xFFFFFFFF, "/hplayer - Hackeia a Conta Bancaria de um Jogador!");
  3176.             SendClientMessage(playerid, 0xFFFFFFFF, "/cp [texto] - Chat da profissão");
  3177.             SendClientMessage(playerid, GetPlayerColor(playerid), "~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hacker ~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3178.         }
  3179.         return 1;
  3180.     }
  3181.  
  3182.     CMD:p(playerid, params[])
  3183.     {
  3184.         new str[128], txt;
  3185.         if(sscanf(params, "s[128]", txt)) return SendClientMessage(playerid, -1, ":> /p [texto]");
  3186.         else
  3187.         {
  3188.             for(new P=0; P < MAX_PLAYERS; P++)
  3189.             {
  3190.                 if(GetDistanceBetweenPlayers(playerid, P) < 25)
  3191.                 {
  3192.                     format(str, sizeof(str), "[Chat Proximo] %s diz: %s", pName(playerid), txt);
  3193.                     SendClientMessage(P, Amarelo, str);
  3194.                 }
  3195.             }
  3196.         }
  3197.         return 1;
  3198.     }
  3199.  
  3200.     CMD:cp(playerid, params[])
  3201.     {
  3202.         new string[128], txt;
  3203.         if(sscanf(params, "s[128]", txt)) return SendClientMessage(playerid, -1, ":> /cp [texto]");
  3204.         else
  3205.         {
  3206.             for(new i=0; i < MAX_PLAYERS; i++)
  3207.             {
  3208.                 if(IsPlayerConnected(i))
  3209.                 {
  3210.                     if(Profissao[i] == Profissao[playerid])
  3211.                     {
  3212.                         format(string, sizeof(string), "(Chat Profissão) %s diz: %s", pName(playerid), txt);
  3213.                         SendClientMessage(i, GetPlayerColor(playerid), string);
  3214.                     }
  3215.                 }
  3216.             }
  3217.         }
  3218.         return 1;
  3219.     }
  3220.  
  3221.     CMD:transferir(playerid, params[])
  3222.     {
  3223.         new giveid, value, str[128], Nome[MAX_PLAYER_NAME];
  3224.         if(sscanf(params, "ui", giveid, value))
  3225.             return SendClientMessage(playerid, -1, "Use /transferir [ID/Nome] [Valor]");
  3226.         if (GetPlayerGranaEx(playerid) < value)
  3227.             return SendClientMessage(playerid, -1, "Voce não tem esse dinheiro!");
  3228.         GivePlayerGranaEx(playerid, -value);
  3229.         GivePlayerGranaEx(giveid, value);
  3230.         GetPlayerName(giveid, Nome, MAX_PLAYER_NAME);
  3231.         format(str,128,"($) Você transferiu %dR$ para o jogador %s.", value, Nome);
  3232.         SendClientMessage(playerid, Amarelo, str);
  3233.         GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
  3234.         format(str,128,"($) %s transferiu %dR$ para voce.", Nome, value);
  3235.         SendClientMessage(giveid, Verde, str);
  3236.         return true;
  3237.     }
  3238.  
  3239.     CMD:modoafk(playerid)
  3240.     {
  3241.         if(pAFK[playerid] == 0)
  3242.         {
  3243.             pAFK[playerid] = 1;
  3244.             SetPlayerVirtualWorld(playerid, 1);
  3245.             TogglePlayerControllable(playerid,1);
  3246.             TextDrawHideForPlayer(playerid,AfkText);
  3247.             TextDrawHideForPlayer(playerid,AfkBackText);
  3248.             SendClientMessage(playerid, Verde, "* Você agora está no MODO AFK!!");
  3249.         }
  3250.         else {
  3251.             SendClientMessage(playerid,Vermelho,"* Você já está Ausente!");
  3252.             return 1;
  3253.         }
  3254.         return 1;
  3255.     }
  3256.  
  3257.     CMD:pm(playerid, params[])
  3258.     {
  3259.         new texto,Str[128],id;
  3260.         if(sscanf(params, "us",id,texto))
  3261.         {
  3262.             SendClientMessage(playerid,Vermelho,"Use: /pm [id] [texto]");
  3263.         }
  3264.         else {
  3265.             if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Este jogador não está conectado");
  3266.             format(Str, sizeof(Str), "Mesangem Privada de %s: %s",pName(playerid),texto);
  3267.             SendClientMessage(id,Amarelo,Str);
  3268.             GameTextForPlayer(playerid, "~g~mensagem ~n~ ~r~enviada", 3000, 1);
  3269.         }
  3270.         return 1;
  3271.     }
  3272.  
  3273.     CMD:trancar(playerid)
  3274.     {
  3275.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não está em um veículo.");
  3276.         if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não pode trancar esse veículo, você está de passageiro!");
  3277.         for(new i=0; i < MAX_PLAYERS; i++)
  3278.         {
  3279.             if(i == playerid) continue;
  3280.             SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
  3281.         }
  3282.         SendClientMessage(playerid, 0x98F5FFAA, "(INFO) Veículo trancado com sucesso!");
  3283.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  3284.         return 1;
  3285.     }
  3286.  
  3287.     CMD:destrancar(playerid)
  3288.     {
  3289.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não está em um veículo.");
  3290.         if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, Vermelho, "(ERRO) Você não pode destrancar esse veículo, você está de passageiro!");
  3291.         for(new i=0; i < MAX_PLAYERS; i++)
  3292.         {
  3293.             if(i == playerid) continue;
  3294.             SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 0);
  3295.         }
  3296.         SendClientMessage(playerid, 0x98F5FFAA, "(INFO) Veículo destrancado com sucesso!");
  3297.         PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
  3298.         return 1;
  3299.     }
  3300.     // Adminstration Systen
  3301.     CMD:banirnick(playerid, params[])
  3302.     {
  3303.         new
  3304.             id[24],
  3305.             string[100]
  3306.         ;
  3307.         if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3308.         {
  3309.             if(sscanf(params, "s[24]", id)) return SendClientMessage(playerid, -1, "SERVER: /banirnick [nick]");
  3310.             format(vfile, sizeof(vfile), DIRETORIO, id);
  3311.             DOF2_SetInt("Nicksban.ini", id , 1);
  3312.             SendClientMessage(playerid, Verde, "* Nick banido!");
  3313.             format(string, sizeof(string), "* Você baniu o nick: %s", id);
  3314.             SendClientMessage(playerid, 0x7C7CBEAA, string);
  3315.             return 1;
  3316.         }
  3317.     }
  3318.  
  3319.     CMD:desbanirnick(playerid, params[])
  3320.     {
  3321.         new
  3322.             id[24],
  3323.             string[100]
  3324.         ;
  3325.         if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3326.         {
  3327.             if(sscanf(params, "s[24]", id)) return SendClientMessage(playerid, -1, "SERVER: /desbanirnick [nick]");
  3328.             format(vfile, sizeof(vfile), DIRETORIO, id);
  3329.             DOF2_SetInt("Nicksban.ini", id , 0);
  3330.             SendClientMessage(playerid, Verde, "* Nick Desbanido!");
  3331.             format(string, sizeof(string), "* Você desbaniu o nick: %s", id);
  3332.             SendClientMessage(playerid, 0x7C7CBEAA, string);
  3333.             return 1;
  3334.         }
  3335.     }
  3336.  
  3337.     CMD:desbanirip(playerid,params[])
  3338.     {
  3339.         new IP[20], String[128];
  3340.         if(pAdmin[playerid] < 1) return SendClientMessage(playerid,Vermelho,"Você não tem permissão para fazer isso!");
  3341.         if(sscanf(params,"s",IP)) return SendClientMessage(playerid,Vermelho,"SERVER: /desbanirip [ip]");
  3342.         format(String, sizeof(String), "O IP %s foi Desbanido Com Sucesso!.", IP);
  3343.         SendClientMessageToAll(Verde, String);
  3344.         format(String, sizeof(String), "unbanip %s",IP);
  3345.         SendRconCommand(String);
  3346.         return 1;
  3347.     }
  3348.  
  3349.     CMD:liberarnome(playerid, params[])
  3350.     {
  3351.         format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
  3352.         if(pAdmin[playerid] < 3 && IsPlayerAdmin(playerid))
  3353.         {
  3354.             if(sscanf(params, "ud", params)) return SendClientMessage(playerid, -1, "Uso correto: /liberarnome [ID]");
  3355.             new str[128];
  3356.             new giveplayer[MAX_PLAYERS];
  3357.             new sendername[MAX_PLAYERS];
  3358.             new giveplayerid = strval(params);
  3359.             Autorizado[giveplayerid] = 1;
  3360.             GetPlayerName(playerid, sendername, sizeof(sendername));
  3361.             GameTextForPlayer(giveplayerid, "~w~LIBERADO!", 3000, 0);
  3362.             format(str, sizeof(str), "* Adminstrador: %s liberou você para poder mudar de nome!", sendername);
  3363.             SendClientMessage(giveplayerid, 0xFFFFFFAA, str);
  3364.             format(str, sizeof(str), "* Você liberou o jogador %s para mudar de nome!", giveplayer);
  3365.             SendClientMessage(playerid, 0xFFFFFFAA, str);
  3366.         }
  3367.         else
  3368.         {
  3369.             SendClientMessage(playerid, Vermelho, "* Sem Permissão para isto.");
  3370.         }
  3371.         return 1;
  3372.     }
  3373.  
  3374.     CMD:setadmin(playerid, params[])
  3375.     {
  3376.         if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3377.         {
  3378.             new leveladm,
  3379.                 plid,
  3380.                 string[128];
  3381.             if(sscanf(params, "ud", plid, leveladm))
  3382.                 return SendClientMessage(playerid, Vermelho, "Uso correto: /setadmin [ID] [Level]");
  3383.             if(!IsPlayerConnected(plid))
  3384.                 return SendClientMessage(playerid, -1, "Este jogador não está conectado");
  3385.             if(leveladm > 6) return SendClientMessage(playerid, -1, "O level máximo é 6!");
  3386.             if(IsPlayerConnected(plid))
  3387.             {
  3388.                 if(leveladm >= 1)
  3389.                 {
  3390.                       pAdmin[plid] = leveladm;
  3391.                       DOF2_SetInt(vfile, "LevelAdmin", leveladm);
  3392.                       format(string, sizeof(string), "* %s promoveu você para adminstrador Level: %d!", pName(playerid), leveladm);
  3393.                       SendClientMessage(plid, Laranja, string);
  3394.                 }
  3395.                 if(leveladm == 0)
  3396.                 {
  3397.                     pAdmin[plid] = 0;
  3398.                     DOF2_SetInt(vfile, "LevelAdmin", 0);
  3399.                     format(string, sizeof(string), "* %s Retirou você da adminstração do servidor!", pName(playerid));
  3400.                     SendClientMessage(plid, Laranja, string);
  3401.                 }
  3402.             }
  3403.         }
  3404.         return 1;
  3405.     }
  3406.  
  3407.     CMD:gasosa(playerid)
  3408.     {
  3409.         if(!pAdmin[playerid]) return SendClientMessage(playerid, Vermelho,"* Você não tem permissão.");
  3410.         {
  3411.             DOF2_SetInt(vfile, "Gasolina", 999);
  3412.             pGasolina[playerid] = 999;
  3413.         }
  3414.         return 1;
  3415.     }
  3416.     CMD:admins(playerid)
  3417.     {
  3418.         SendClientMessage(playerid,Amarelo, "» Adminstradores Conectados:");
  3419.         SendClientMessage(playerid,-1, "{00FF00}BOT {FFFAFA}> [ {00FF00}Ant - Noob {FFFAFA}]");
  3420.         new count = 0;
  3421.         for(new i=0; i<MAX_PLAYERS; i++)
  3422.         {
  3423.             if(IsPlayerConnected(i))
  3424.             {
  3425.                 if(pAdmin[i])
  3426.                 {
  3427.                 new str[256];
  3428.                 new pname[24];
  3429.                 GetPlayerName(i, pname, 24);
  3430.                 if(pAdmin[i] == 1)
  3431.                 {
  3432.                     format(str,sizeof(str),"{00FF00}%s {FFFAFA}> [ {00FF00}Colaborador {FFFAFA}]", pname,i);
  3433.                 }
  3434.                 if(pAdmin[i] == 2)
  3435.                 {
  3436.                     format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Moderador {FFFAFA}]", pname,i);
  3437.                 }
  3438.                 if(pAdmin[i] == 3)
  3439.                 {
  3440.                     format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador {FFFAFA}]", pname,i);
  3441.                 }
  3442.                 if(pAdmin[i] == 4)
  3443.                 {
  3444.                     format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador + {FFFAFA}]", pname,i);
  3445.                 }
  3446.                 if(pAdmin[i] == 5)
  3447.                 {
  3448.                     format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador ++ {FFFAFA}]", pname,i);
  3449.                 }
  3450.                 if(pAdmin[i] == 6)
  3451.                 {
  3452.                     format(str,sizeof(str),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Dono / Scripter {FFFAFA}]", pname,i);
  3453.                 }
  3454.                 SendClientMessage(playerid, -1, str);
  3455.                 count++;
  3456.                 }
  3457.             }
  3458.         }
  3459.         if(count == 0)
  3460.         {
  3461.             SendClientMessage(playerid, Vermelho, "* Sem Adminstradores Online *");
  3462.         }
  3463.         return 1;
  3464.     }
  3465.  
  3466.  
  3467. /*  CMD:admins(playerid)
  3468.     {
  3469.         SendClientMessage(playerid,Verde, "{FFFAFA}-> {00FF00}Adminstradores Conectados {FFFAFA} <-");
  3470.         static bool: result;
  3471.         new string[128];
  3472.         for(new i; i < MAX_PLAYERS; ++i)
  3473.         {
  3474.             new pname[24];
  3475.             GetPlayerName(i,pname,24);
  3476.             if(IsPlayerConnected(i) && pAdmin[playerid] < 0)
  3477.             {
  3478.                 if(pAdmin[playerid] == 1)
  3479.                 {
  3480.                     format(string,sizeof(string),"{00FF00}%s {FFFAFA}> [ {00FF00}Colaborador {FFFAFA}]", pname);
  3481.                 }
  3482.                 if(pAdmin[playerid] == 2)
  3483.                 {
  3484.                     format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Moderador {FFFAFA}]", pname);
  3485.                 }
  3486.                 if(pAdmin[playerid] == 3)
  3487.                 {
  3488.                     format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador {FFFAFA}]", pname);
  3489.                 }
  3490.                 if(pAdmin[playerid] == 4)
  3491.                 {
  3492.                     format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador + {FFFAFA}]", pname);
  3493.                 }
  3494.                 if(pAdmin[playerid] == 5)
  3495.                 {
  3496.                     format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Adminstrador ++ {FFFAFA}]", pname);
  3497.                 }
  3498.                 if(pAdmin[playerid] == 6)
  3499.                 {
  3500.                     format(string,sizeof(string),"{00FF00}%s {FFFAFA}> {FFFAFA}[ {00FF00}Dono / Scripter {FFFAFA}]", pname);
  3501.                 }
  3502.                 SendClientMessage(playerid, -1, string);
  3503.                 result = true;
  3504.             }
  3505.         }
  3506.         if(!result)
  3507.             return SendClientMessage(playerid, -1,"");
  3508.         return 1;
  3509.     }*/
  3510.  
  3511.     CMD:planos(playerid)
  3512.     {
  3513.         SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Planos ~~~~~~~~~~~~~");
  3514.         SendClientMessage(playerid, 0xE066FFAA, "> Plano Básico: [R$350]");
  3515.         SendClientMessage(playerid, 0x43CD80AA, "> Plano Avançado: [R$700]");
  3516.         SendClientMessage(playerid, 0xCDAD00AA, "> Plano Profissional: [R$1400]");
  3517.         SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Planos ~~~~~~~~~~~~~");
  3518.         return 1;
  3519.     }
  3520.  
  3521.     CMD:ajudaplano(playerid)
  3522.     {
  3523.         SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Info Plano ~~~~~~~~~~~~~");
  3524.         SendClientMessage(playerid, -1, "P: Pra que serve seu plano de saúde? R: O Plano de Saúde Cobrirá sua Despezas com o Médico apos sua morte.");
  3525.         SendClientMessage(playerid, -1, "P: Quais são os Preços dos Planos? R: Use: /planos");
  3526.         SendClientMessage(playerid, 0xFFFFFFAA, "~~~~~~~~~~~~~ Info Plano ~~~~~~~~~~~~~");
  3527.         return 1;
  3528.     }
  3529.  
  3530. /*    CMD:mudarnome(playerid,params[])
  3531.     {
  3532.             if(Autorizado[playerid] == 1)
  3533.             {
  3534.                 new banco[64], nova[64], IP[24], novabanco[64], senha[3][256], escolhido;
  3535.                 if(sscanf(params, "ui", escolhido)) return SendClientMessage(playerid, Vermelho, "Uso correto: /setadmin [ID] [Level]");
  3536.                 format(nova, 128, DIRETORIO, escolhido);
  3537.                 if(DOF2_FileExists(nova))
  3538.                 {
  3539.                     SendClientMessage(playerid, Vermelho, "(ERRO) Já existe uma conta criada com esse nome!");
  3540.                     return 1;
  3541.                 }
  3542.                 format(vfile, sizeof(vfile), DIRETORIO, pName(playerid));
  3543.                 format(banco, sizeof(banco), DBANCO, pName(playerid));
  3544.                 senha[0] = DOF2_GetString(vfile, "Senha");
  3545.                 senha[1] = DOF2_GetString(banco, "Senha");
  3546.                 senha[2] = DOF2_GetString(banco, "SaldoBancario");
  3547.                 DOF2_RemoveFile(vfile); DOF2_RemoveFile(banco);
  3548.                 SetPlayerName(playerid, escolhido);
  3549.                 format(nova, sizeof(nova), DIRETORIO, escolhido);
  3550.                 format(novabanco, sizeof(novabanco), DBANCO, params);
  3551.                 DOF2_CreateFile(nova); DOF2_CreateFile(novabanco);
  3552.                 GetPlayerIp(playerid, IP, sizeof(IP));
  3553.                 DOF2_SetString(nova, "Login", pName(playerid));
  3554.                 DOF2_SetString(nova, "IP", IP);
  3555.                 DOF2_SetString(nova, "Level", "0");
  3556.                 DOF2_SetString(nova, "ExpJogador", "0");
  3557.                 DOF2_SetString(nova, "LevelAdmin", "0");
  3558.                 DOF2_SetString(nova, "Dinheiro", "0");
  3559.                 DOF2_SetString(nova, "Procurado", "0");
  3560.                 DOF2_SetString(nova, "Skin", "0");
  3561.                 DOF2_SetString(nova, "VipL", "0");
  3562.                 DOF2_SetString(nova, "Avisos", "0");
  3563.                 DOF2_SetString(nova, "TContaBancaria", "0");
  3564.                 DOF2_SetString(nova, "HabTerrestre", "0");
  3565.                 DOF2_SetString(nova, "Pais", "Nenhum");
  3566.                 DOF2_SetString(nova, "HabAerea", "0");
  3567.                 DOF2_SetString(nova, "HabNautica", "0");
  3568.                 DOF2_SetString(nova, "Profissao", "0");
  3569.                 DOF2_SetString(nova,"Porte", "0");
  3570.                 DOF2_SetInt(nova, "Skin", GetPlayerSkin(playerid));
  3571.                 DOF2_SetString(nova, "Senha", senha[0]);
  3572.                 DOF2_SetString(novabanco, "Senha", senha[1]);
  3573.                 DOF2_SetString(novabanco, "ContaBancaria", senha[2]);
  3574.                 DOF2_SetInt(nova, "Procurado", GetPlayerWantedLevel(playerid));
  3575.                 DOF2_SetInt(nova, "Level", pLevel[playerid]);
  3576.                 DOF2_SetInt(nova, "ExpJogador", Experiencia[playerid]);
  3577.                 DOF2_SetInt(nova, "Profissao", Profissao[playerid]);
  3578.                 //SendClientMessage(playerid, COR_AMARELO, "(INFO) Aguarde, estamos salvando os dados da sua conta antiga e transferindo para nova!");
  3579.                 Autorizado[playerid] = 0;
  3580.             }
  3581.             else
  3582.             {
  3583.                 SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Você não está liberado para poder mudar de nome!");
  3584.             }
  3585.             return 1;
  3586.     }*/
  3587.  
  3588.     CMD:comprarbilhete(playerid,params[])
  3589.     {
  3590.         new string[128], NumeroToLoto; //NumeroValido = 1;
  3591.         if(sscanf(params, "s", NumeroLoto)) return SendClientMessage(playerid, Vermelho, "Uso correto: /comprarbilhete [numero]");
  3592.         if(1 < (NumeroToLoto) > 100) return SendClientMessage(playerid, Vermelho, "[ERRO] Número deve estar entre 0 e 100 - Custo do Bilhete: 400R$");
  3593.         else if(TaJogando[playerid] == 1)return SendClientMessage(playerid, Vermelho, "LOTERIA: Você já está jogando na Loteria!");
  3594.         else if(GetPlayerGranaEx(playerid) < 400) return SendClientMessage(playerid, Vermelho, "LOTERIA: Você não tem $400 para comprar o Número");
  3595.         for(new i; i < MAX_PLAYERS; i++)
  3596.         {
  3597.             if(NumeroLoto[playerid] == NumeroLoto[i])
  3598.             {
  3599.                 //NumeroValido = 0;
  3600.             }
  3601.         }
  3602.         //if(NumeroValido == 0) return SendClientMessage(playerid, Vermelho, "[ERRO] Esse número já foi escolhido!");
  3603.         format(string, sizeof(string), "LOTERIA: Você jogou na loteria com o numero: %i ", NumeroToLoto);
  3604.         SendClientMessage(playerid, Amarelo, string);
  3605.         GivePlayerGranaEx(playerid, -400);
  3606.         TaJogando[playerid] = 1;
  3607.         NumeroLoto[playerid] = NumeroToLoto;
  3608.         return 1;
  3609.     }
  3610.  
  3611.     CMD:meuplano(playerid)
  3612.     {
  3613.         new string[100];
  3614.         if(PlanoMedico[playerid] == 0)
  3615.         {
  3616.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3617.             SendClientMessage(playerid, -1, "* Você não possui um Plano de Saúde.");
  3618.             SendClientMessage(playerid, -1, "* Quer Contratar um Plano de Saúde? Vá até o Hospital Mas Proximo!");
  3619.             SendClientMessage(playerid, -1, "* Comandos Úteis: /planos - /ajudaplano");
  3620.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3621.             return 1;
  3622.         }
  3623.         if(PlanoMedico[playerid] == 1)
  3624.         {
  3625.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3626.             format(string,sizeof(string),"Plano Atual: %d", PlanoMedico[playerid]);
  3627.             SendClientMessage(playerid, -1, "* Quer cancelar seu plano? Vá Até o Hospital!");
  3628.             SendClientMessage(playerid, -1, "* O Pagamento do Plano será cobrado do Seu Salário!");
  3629.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3630.             return 1;
  3631.         }
  3632.         else if(PlanoMedico[playerid] == 2)
  3633.         {
  3634.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3635.             format(string,sizeof(string),"Plano Atual: %d", PlanoMedico[playerid]);
  3636.             SendClientMessage(playerid, -1, "* Quer cancelar seu plano? Vá Até o Hospital!");
  3637.             SendClientMessage(playerid, -1, "* O Pagamento do Plano será cobrado do Seu Salário!");
  3638.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3639.             return 1;
  3640.         }
  3641.         else if(PlanoMedico[playerid] == 3)
  3642.         {
  3643.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3644.             format(string,sizeof(string),"Plano Atual: %d", PlanoMedico[playerid]);
  3645.             SendClientMessage(playerid, -1, "* Quer cancelar seu plano? Vá Até o Hospital!");
  3646.             SendClientMessage(playerid, -1, "* O Pagamento do Plano será cobrado do Seu Salário!");
  3647.             SendClientMessage(playerid, 0x8B8B00AA, "========================[ Plano De Saúde ]========================");
  3648.             return 1;
  3649.         }
  3650.         return 1;
  3651.     }
  3652.  
  3653.     CMD:ir(playerid,params[])
  3654.     {
  3655.         new string[128];
  3656.         new id,Float:X,Float:Y,Float:Z,vehid;
  3657.         if(pAdmin[playerid] < 2) return SendClientMessage(playerid,Vermelho,"* Você não tem permissão.");
  3658.         if(sscanf(params,"u",id)) return SendClientMessage(playerid,Verde,"* Use: /ir [id]");
  3659.         GetPlayerPos(id,X,Y,Z);
  3660.         SetPlayerPos(playerid,X+4,Y,Z);
  3661.         vehid = GetPlayerVehicleID(playerid);
  3662.         SetVehiclePos(vehid,X+4,Y,Z);
  3663.         PutPlayerInVehicle(playerid,vehid,0);
  3664.         format(string,sizeof(string),"- (AdmCmd) Você teleportou para %s",pName(id));
  3665.         SendClientMessage(playerid, Verde, string);
  3666.         return 1;
  3667.     }
  3668.  
  3669.     CMD:loteria(playerid)
  3670.     {
  3671.         LoteriaPublic();
  3672.         return 1;
  3673.     }
  3674.  
  3675.     CMD:salario(playerid)
  3676.     {
  3677.         PayDay();
  3678.         return 1;
  3679.     }
  3680.  
  3681. /*  CMD:a(playerid, params[])
  3682.     {
  3683.         if(pAdmin[playerid] < 2) return SendClientMessage(playerid,Vermelho,"* Você não tem permissão.");
  3684.         new texto;
  3685.         new Str[128];
  3686.         if(sscanf(params, "s",texto)) return SendClientMessage(playerid,-1,"Use: /a [texto]");
  3687.         format(Str, sizeof(Str),"Admin %s : %s",pName(playerid),texto);
  3688.         SendClientMessageToAll(0x00B0B0AA,Str);
  3689.         return 1;
  3690.     }
  3691.     */
  3692.     CMD:av(playerid, params[])
  3693.     {
  3694.         new string[128], txt;
  3695.         if(pAdmin[playerid] < 2) return SendClientMessage(playerid,Vermelho,"* Você não tem permissão.");
  3696.         if(sscanf(params, "s[128]", txt)) return SendClientMessage(playerid, Vermelho, ":> /av [texto]");
  3697.         format(string, sizeof(string), "* Admin %s : %s", pName(playerid), txt);
  3698.         SendClientMessageToAll(0x00B0B0AA,string);
  3699.         return 1;
  3700.     }
  3701.  
  3702.     CMD:aceitaradvogado(playerid)
  3703.     {
  3704.         if(IsPlayerConnected(playerid))
  3705.         {
  3706.             if(DOF2_GetInt(vfile, "EnvioAdvogado") == 1)
  3707.             {
  3708.                 SendClientMessage(playerid,Amarelo, "* Você aceitou o convite para a entrevista!");
  3709.                 DOF2_SetInt(vfile, "Preso", 0);
  3710.                 Preso[playerid] = 0;
  3711.                 SetPlayerHealth(playerid,100);
  3712.                 SpawnPlayer(playerid);
  3713.                 GivePlayerGranaEx(playerid, -350);
  3714.             }
  3715.         }
  3716.         return 1;
  3717.     }
  3718.  
  3719.     CMD:soltar(playerid, params[])
  3720.     {
  3721.         new string[128];
  3722.         if(Profissao[playerid] == Advogado || IsPlayerAdmin(playerid))
  3723.         {
  3724.             new plid;
  3725.             if(sscanf(params, "ui", plid)) return SendClientMessage(playerid, Vermelho, "Uso: /soltar [id] [preço]");
  3726.             if(!IsPlayerConnected(plid))
  3727.             {
  3728.                 SendClientMessage(playerid, Vermelho, "(ERRO) O jogador não está online");
  3729.                 return 1;
  3730.             }
  3731.             else {
  3732.                 DOF2_SetInt(vfile, "EnvioAdvogado", 1);
  3733.                 SendClientMessage(playerid, Verde, "* Convite Enviado!");
  3734.                 format(string, sizeof(string), "* %s está se oferecendo para solta-lo da prisão. Para aceitar use: /aceitaradvogado - Caso não queira Use: /recusar", pName(playerid));
  3735.                 SendClientMessage(plid, newadm, string);
  3736.                 SendClientMessage(plid, newadm, "* O Custo pra ele te soltar custa: [ 350 R$ ]");
  3737.                 return 1;
  3738.             }
  3739.         }
  3740.         else {
  3741.             SendClientMessage(playerid,Vermelho,"(ERRO) Você não é um Advogado");
  3742.             return 1;
  3743.         }
  3744.     }
  3745.  
  3746.     CMD:fianca(playerid)
  3747.     {
  3748.         new grana;
  3749.         grana = DOF2_GetInt(vfile, "SaldoBancario");
  3750.         if(Preso[playerid] == 1)
  3751.         {
  3752.             if(grana > 15000)
  3753.             {
  3754.                 if(Preso[playerid]>= 2)
  3755.                 {
  3756.                     SetPlayerWantedLevel(playerid, 0);
  3757.                     DOF2_SetInt(vfile, "Preso",0);
  3758.                     DOF2_SetInt(vfile, "SaldoBancario", DOF2_GetInt(vfile, "SaldoBancario")-Fianca);
  3759.                     Preso[playerid] = 0;
  3760.                     SpawnPlayer(playerid);
  3761.                     SetPlayerHealth(playerid,100);
  3762.                     SendClientMessage(playerid, Verde,"* Você pagou a fiança e foi solto!.");
  3763.                 }
  3764.                 else {
  3765.                     SendClientMessage(playerid, Vermelho,"(ERRO) Você tem que esperar 2 minutos para poder pagar a fiança!");
  3766.                 }
  3767.             }
  3768.             else {
  3769.                 SendClientMessage(playerid, Vermelho,"(ERRO) Você não possui dinheiro suficiente! (R$15000)");
  3770.             }
  3771.         }
  3772.         else {
  3773.             SendClientMessage(playerid, Vermelho,"(ERRO) Você não está preso!");
  3774.         }
  3775.         return 1;
  3776.     }
  3777.  
  3778.     CMD:dm(playerid)
  3779.     {
  3780.         new pname[MAX_PLAYER_NAME];
  3781.         new string[64];
  3782.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  3783.         if(podedm == 0)
  3784.         {
  3785.             format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) permitiu o DM.", pname, playerid);
  3786.             SendClientMessageToAll(newadm, string);
  3787.             podedm = 1;
  3788.         }
  3789.         else {
  3790.             if(podedm == 1)
  3791.             {
  3792.                 format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) proibiu o DM.", pname, playerid);
  3793.                 SendClientMessageToAll(newadm, string);
  3794.                 podedm = 0;
  3795.             }
  3796.         }
  3797.         return 1;
  3798.     }
  3799.  
  3800.     CMD:vidat(playerid)
  3801.     {
  3802.         new string[64];
  3803.         if(pAdmin[playerid] < 0)
  3804.         {
  3805.             format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) Recuperou a vida de todos!", pName(playerid),playerid);
  3806.             SendClientMessageToAll(newadm, string);
  3807.             for(new i=0;i<MAX_PLAYERS;i++)
  3808.             {
  3809.                 if(IsPlayerConnected(i))
  3810.                 {
  3811.                     SetPlayerHealth(i,100);
  3812.                 }
  3813.             }
  3814.         }
  3815.         return 1;
  3816.     }
  3817.  
  3818.     CMD:coletet(playerid)
  3819.     {
  3820.         new string[64];
  3821.         if(pAdmin[playerid] < 0)
  3822.         {
  3823.             format(string, sizeof(string), "{00FF00}~> (AdmCmd) {FFFAFA}O Adminstrador %s {FFFAFA}({00FF00}%d{FFFAFA}) Recuperou o colete de todos!", pName(playerid),playerid);
  3824.             SendClientMessageToAll(newadm, string);
  3825.             for ( new i = 0 ; i < MAX_PLAYERS ; i ++)
  3826.             {
  3827.                 if(IsPlayerConnected(i))
  3828.                 {
  3829.                     SetPlayerArmour(i,100);
  3830.                 }
  3831.             }
  3832.         }
  3833.         return 1;
  3834.     }
  3835.  
  3836.     CMD:gmx(playerid, params[])
  3837.     {
  3838.         if(pAdmin[playerid] < 4 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3839.         static szt[128];
  3840.         format(szt , 64,"(GMX) O Adminstrador %s Reiniciou o Servidor.",pName(playerid)); // Ta filé..
  3841.         SendClientMessageToAll(Verde, szt);
  3842.         SendRconCommand("gmx");
  3843.         return true;
  3844.     }
  3845.  
  3846.     CMD:dargrana(playerid, params[]) // Ok 100% Testado.
  3847.     {
  3848.         if(pAdmin[playerid] < 3 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3849.         static szt[128], plid, grana;
  3850.         if(sscanf(params,"ui",plid,grana)) return SendClientMessage(playerid, Vermelho, "(ERRO) /dargrana [id] [valor]");
  3851.         SendClientMessage(playerid, Verde, "* Comando Efetuado!");
  3852.         format(szt , 64,"Administrador %s te deu %dR$ de Grana",pName(playerid),grana);
  3853.         SendClientMessage(plid,Verde,szt);
  3854.         if(IsPlayerConnected(plid))
  3855.         {
  3856.             GivePlayerGranaEx(plid,grana);
  3857.         }
  3858.         return true;
  3859.     }
  3860.  
  3861.     /*CMD:setprof(playerid, params[])
  3862.     {
  3863.         new szt[128], plid, prof;
  3864.         if(IsPlayerConnected(plid))
  3865.         {
  3866.         if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3867.         if(sscanf(params,"ui",plid,prof)) return SendClientMessage(playerid, Vermelho, "(ERRO) /setprof [id] [numero]");
  3868.         if(prof > 14 && prof < 0)
  3869.         {
  3870.             SendClientMessage(playerid, Vermelho, "(ERRO) Profissão Inexistente!");
  3871.             return 1;
  3872.         }
  3873.         SendClientMessage(playerid, Verde, "* Comando Efetuado!");
  3874.         format(szt , 64,"Administrador %s te setou na profissão número : %d",pName(playerid),prof);
  3875.         SendClientMessage(plid,Verde,szt);
  3876.         LogarProf(plid);
  3877.         DOF2_SetInt(vfile, "Profissao", prof);
  3878.         }
  3879.         return 1;
  3880.     }*/
  3881.  
  3882.     CMD:setprof(playerid, params[])
  3883.     {
  3884.         if(pAdmin[playerid] < 1 || IsPlayerAdmin(playerid))
  3885.         {
  3886.             new plid, profdonb, string[128], profissao[128];
  3887.             if(sscanf(params,"ui",plid,profdonb)) return SendClientMessage(playerid, Vermelho, "(ERRO) /setprof [id] [numero]");
  3888.             if(profdonb > 14 && profdonb < 0) return SendClientMessage(playerid, Vermelho,"(ERRO) Profissão Inexistente!");
  3889.             new pname[MAX_PLAYER_NAME];
  3890.             GetPlayerName(plid, pname, MAX_PLAYER_NAME);
  3891.             if(IsPlayerConnected(plid))
  3892.             {
  3893.             if(profdonb == 0 || profdonb == 1 || profdonb == 2 || profdonb == 3 || profdonb == 4 || profdonb == 5 || profdonb == 6 || profdonb == 7 || profdonb == 8 || profdonb == 9 || profdonb == 10 ||
  3894.             profdonb == 11 || profdonb == 12 || profdonb == 13 || profdonb == 14)
  3895.             {
  3896.                 Profissao[plid] = profdonb;
  3897.                 if(profdonb == 1) {profissao = "Caminoneiro";}
  3898.                 if(profdonb == 2) {profissao = "MotoTaxi";}
  3899.                 if(profdonb == 3) {profissao = "Taxista";}
  3900.                 if(profdonb == 4) {profissao = "Maquinista";}
  3901.                 if(profdonb == 5) {profissao = "PolicialM";}
  3902.                 if(profdonb == 6) {profissao = "PolicialC";}
  3903.                 if(profdonb == 7) {profissao = "PolicialF";}
  3904.                 if(profdonb == 8) {profissao = "VDrogas";}
  3905.                 if(profdonb == 9) {profissao = "TrafArmas";}
  3906.                 if(profdonb == 10) {profissao = "GuardaTransito";}
  3907.                 if(profdonb == 11) {profissao = "Advogado";}
  3908.                 if(profdonb == 12) {profissao = "VSorvete";}
  3909.                 if(profdonb == 13) {profissao = "Paramedico";}
  3910.                 if(profdonb == 14) {profissao = "Hacker";}
  3911.                 format(string, sizeof(string), "* O Admistrador %s (%d) Alterou Sua Profissão Para : %s.", pName(playerid), playerid, profdonb);
  3912.                 SendClientMessage(plid, newadm, string);
  3913.                 format(string, sizeof(string), "* Você deu a %s (%d) a profissão: %s.", pname, plid, profdonb);
  3914.                 SendClientMessage(playerid, Amarelo, string);
  3915.                 DOF2_SetInt(vfile, "Profissao", profdonb);
  3916.                 LogarProf(plid);
  3917.                 SpawnPlayer(plid);
  3918.                 return 1;
  3919.             }
  3920.             else {
  3921.                 SendClientMessage(playerid, Vermelho, "* Jogador não conectado.");
  3922.                 return 1;
  3923.                 }
  3924.             }
  3925.         }
  3926.         return 1;
  3927.     }
  3928.  
  3929.  
  3930. /*  CMD:setprof(playerid, params[])
  3931.     {
  3932.         new szt[128], plid, prof, profissao[128];
  3933.         if(IsPlayerConnected(plid))
  3934.         {
  3935.             if(pAdmin[playerid] < 2 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  3936.             if(sscanf(params,"ui", plid , prof)) return SendClientMessage(playerid, Vermelho, "(ERRO) /setprof [id] [numero]");
  3937.             if(profdonb == 0 || profdonb == 1 || profdonb == 2 || profdonb == 3 || profdonb == 4 || profdonb == 5 || profdonb == 6 || profdonb == 7 || profdonb == 8 || profdonb == 9 || profdonb == 10 ||
  3938.             profdonb == 11 || profdonb == 12 || profdonb == 13 || profdonb == 14)
  3939.             {
  3940.                 Profissao[plid] = prof;
  3941.                 if(profdonb == 1) {profissao = "Caminoneiro";}
  3942.                 if(profdonb == 2) {profissao = "MotoTaxi";}
  3943.                 if(profdonb == 3) {profissao = "Taxista";}
  3944.                 if(profdonb == 4) {profissao = "Maquinista";}
  3945.                 if(profdonb == 5) {profissao = "PolicialM";}
  3946.                 if(profdonb == 6) {profissao = "PolicialC";}
  3947.                 if(profdonb == 7) {profissao = "PolicialF";}
  3948.                 if(profdonb == 8) {profissao = "VDrogas";}
  3949.                 if(profdonb == 9) {profissao = "TrafArmas";}
  3950.                 if(profdonb == 10) {profissao = "GuardaTransito";}
  3951.                 if(profdonb == 11) {profissao = "Advogado";}
  3952.                 if(profdonb == 12) {profissao = "VSorvete";}
  3953.                 if(profdonb == 13) {profissao = "Paramedico";}
  3954.                 if(profdonb == 14) {profissao = "Hacker";}
  3955.                 if(prof > 14 && prof < 0) return SendClientMessage(playerid, Vermelho,"(ERRO) Profissão Inexistente!");
  3956.                 SendClientMessage(playerid, Verde , "* Comando Efetuado!");
  3957.                 format(szt , 64 ,"Administrador %s te setou na profissão número : %s",pName(playerid),profissao);
  3958.                 SendClientMessage(plid , Verde , szt);
  3959.                 DOF2_SetInt(vfile, "Profissao", prof);
  3960.             }
  3961.             return 1;
  3962.         }
  3963.         return 1;
  3964.     }*/
  3965.  
  3966.     CMD:ajudaadm(playerid)
  3967.     {
  3968.         if(pAdmin[playerid] == 1)
  3969.         {
  3970.             SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban");
  3971.         }
  3972.         if(pAdmin[playerid] == 2)
  3973.         {
  3974.             SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick");
  3975.         }
  3976.         if(pAdmin[playerid] == 3)
  3977.         {
  3978.             SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick");
  3979.         }
  3980.         if(pAdmin[playerid] == 4)
  3981.         {
  3982.             SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick » /desbanir");
  3983.         }
  3984.         if(pAdmin[playerid] == 5)
  3985.         {
  3986.             SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick » /desbanir");
  3987.         }
  3988.         if(pAdmin[playerid] == 6)
  3989.         {
  3990.             SendClientMessage(playerid, Verde, "* /ir » /trazer » /calar » /descalar » /ban » /banirnick » /vidat » /coletet » /desbanirnick » /desbanir");
  3991.         }
  3992.     }
  3993.  
  3994.     CMD:abrirdp(playerid)
  3995.     {
  3996.         if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
  3997.         {
  3998.             if(PortaoAberto == 0)
  3999.             {
  4000.                 MoveObject(PortaoDP, 1540.68652344,-1616.23730469,15.15620422, 3.0); PortaoAberto = 1;
  4001.                 SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você abriu o portão principal da DP!");
  4002.             }
  4003.             else {
  4004.                 SendClientMessage(playerid, Vermelho, "(ERRO) O portão principal já está aberto!");
  4005.             }
  4006.         }
  4007.         else {
  4008.             SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
  4009.         }
  4010.         return 1;
  4011.     }
  4012.  
  4013.     CMD:fechardp(playerid)
  4014.     {
  4015.         if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
  4016.         {
  4017.             if(PortaoAberto == 1)
  4018.             {
  4019.                 MoveObject(PortaoDP, 1540.68652344,-1627.59179688,15.15620422, 3.0); PortaoAberto = 0;
  4020.                 SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você fechou o portão principal da DP!");
  4021.             }
  4022.             else {
  4023.                 SendClientMessage(playerid, Vermelho, "(ERRO) O portão principal já está fechado!");
  4024.             }
  4025.         }
  4026.         else {
  4027.             SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
  4028.         }
  4029.         return 1;
  4030.     }
  4031.  
  4032.     CMD:abrirdp2(playerid)
  4033.     {
  4034.         if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
  4035.         {
  4036.             if(Portao2Aberto == 0)
  4037.             {
  4038.                 MoveObject(PortaoDP2, 1598.13671875,-1638.26818848,15.20197678, 3.0); Portao2Aberto = 1;
  4039.                 SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você abriu o segundo portão da DP!");
  4040.             }
  4041.             else {
  4042.                 SendClientMessage(playerid, Vermelho, "(ERRO) O segundo portão já está aberto!");
  4043.             }
  4044.         }
  4045.         else {
  4046.             SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
  4047.         }
  4048.         return 1;
  4049.     }
  4050.  
  4051.     CMD:fechardp2(playerid)
  4052.     {
  4053.         if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
  4054.         {
  4055.             if(Portao2Aberto == 1)
  4056.             {
  4057.                 MoveObject(PortaoDP2, 1589.98474121,-1638.26818848,15.21242142, 3.0); Portao2Aberto = 0;
  4058.                 SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você fechou o segundo portão da DP!");
  4059.             }
  4060.             else {
  4061.                 SendClientMessage(playerid, Vermelho, "(ERRO) O segundo portão já está fechado!");
  4062.             }
  4063.         }
  4064.         else {
  4065.             SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
  4066.         }
  4067.         return 1;
  4068.     }
  4069.  
  4070.     CMD:subirdp(playerid)
  4071.     {
  4072.         if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
  4073.         {
  4074.             if(ElevadorCima == 0)
  4075.             {
  4076.                 MoveObject(ElevadorDP, 1561.68237305,-1641.39025879,27.30376816, 2.0); ElevadorCima = 1;
  4077.                 SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você subiu o elevador da DP!");
  4078.             }
  4079.             else {
  4080.                 SendClientMessage(playerid, Vermelho, "(ERRO) O elevador já está no segundo andar!");
  4081.             }
  4082.         }
  4083.         else {
  4084.             SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
  4085.         }
  4086.         return 1;
  4087.     }
  4088.  
  4089.     CMD:descerdp(playerid)
  4090.     {
  4091.         if(Profissao[playerid] == PolicialC || Profissao[playerid] == PolicialM || Profissao[playerid] == PolicialF || IsPlayerAdmin(playerid))
  4092.         {
  4093.             if(ElevadorCima == 1)
  4094.             {
  4095.                 MoveObject(ElevadorDP, 1561.68164062,-1641.38964844,12.56751347, 2.0); ElevadorCima = 0;
  4096.                 SendClientMessage(playerid, 0x40C1FFAA, "(INFO) Você desceu o elevador da DP!");
  4097.             }
  4098.             else {
  4099.                 SendClientMessage(playerid, Vermelho, "(ERRO) O elevador já está no primeiro andar!");
  4100.             }
  4101.         }
  4102.         else {
  4103.             SendClientMessage(playerid, Vermelho, "(ERRO) Você não tem permissão!");
  4104.         }
  4105.         return 1;
  4106.     }
  4107.     // Sistema de Carros c/ Dono
  4108.     CMD:precocarro(playerid, params[])
  4109.     {
  4110.         new preco, string[100];
  4111.         if(sscanf(params,"ui",preco)) return SendClientMessage(playerid, Vermelho, "* /precocarro [preço]");
  4112.         for(new c = 0; c < MAX_CARROS; c++)
  4113.         {
  4114.             format(string, sizeof(string), "/Carros/carro%d.ini", c);
  4115.             if(DOF2_FileExists(string))
  4116.             {
  4117.                 if(GetPlayerVehicleID(playerid) == DOF2_GetInt(string, "Id"))
  4118.                 {
  4119.                     if(pAdmin[playerid] > 4)
  4120.                     {
  4121.                         new pname[MAX_PLAYER_NAME];
  4122.                         GetPlayerName(playerid, pname, sizeof(pname));
  4123.                         DOF2_SetInt(string, "Preco", preco);
  4124.                     }
  4125.                     else {
  4126.                         SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
  4127.                     }
  4128.                 }
  4129.             }
  4130.         }
  4131.         return 1;
  4132.     }
  4133.  
  4134.     CMD:liberarcarro(playerid, params[])
  4135.     {
  4136.         new preco, string[100];
  4137.         if(sscanf(params,"ui",preco)) return SendClientMessage(playerid, Vermelho, "* /liberarcarro [id]");
  4138.         format(string, sizeof(string), "/Carros/carro%d.ini", preco);
  4139.         if(DOF2_FileExists(string))
  4140.         {
  4141.             if(pAdmin[playerid] > 4)
  4142.             {
  4143.                 new pname[MAX_PLAYER_NAME];
  4144.                 GetPlayerName(playerid, pname, sizeof(pname));
  4145.                 DOF2_SetInt(string, "cDono", 0);
  4146.                 DOF2_SetString(string, "Dono", "Nenhum");
  4147.                 format(string, sizeof(string), "* O Adminstrador %s Liberou o Carro Número: %d", pname,preco);
  4148.                 SendClientMessageToAll(newadm, string);
  4149.                 return 1;
  4150.             }
  4151.             else {
  4152.                 SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
  4153.             }
  4154.         }
  4155.         return 1;
  4156.     }
  4157.  
  4158.     CMD:ircarro(playerid, params[])
  4159.     {
  4160.         new id, string[100];
  4161.         if(sscanf(params,"ui",id)) return SendClientMessage(playerid, Vermelho, "* /ircarro [id]");
  4162.         format(string, sizeof(string), "/Carros/carro%d.ini", id);
  4163.         if(DOF2_FileExists(string))
  4164.         {
  4165.             new Float:X, Float:Y, Float:Z;
  4166.             GetVehiclePos(DOF2_GetInt(string, "Id"), X, Y, Z);
  4167.             if(pAdmin[playerid] > 4)
  4168.             {
  4169.                 new pname[MAX_PLAYER_NAME];
  4170.                 GetPlayerName(playerid, pname, sizeof(pname));
  4171.                 SetPlayerPos(playerid, X, Y, Z);
  4172.             }
  4173.             else {
  4174.                 SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
  4175.             }
  4176.         }
  4177.         return 1;
  4178.     }
  4179.  
  4180.     CMD:carv(playerid, params[])
  4181.     {
  4182.         new carid, Float:ang, preco, cor1, cor2, string[100];
  4183.         //if(sscanf(params,"uidd", carid , preco , cor1 , cor2)) return SendClientMessage(playerid, Vermelho, "*: /carv [id] [preço] [cor1] [cor2]");
  4184.         if(sscanf(params, "iiii", carid, preco, cor1, cor2))
  4185.             return SendClientMessage(playerid, Vermelho, "*: /carv [id] [preço] [cor1] [cor2]");
  4186.         if(pAdmin[playerid] > 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho,"(ERRO) Você não tem permissão.");
  4187.         if(IsPlayerAdmin(playerid)|| pAdmin[playerid] > 5) {
  4188.             if(carid < 400 || carid > 611)
  4189.                 return SendClientMessage(playerid, Vermelho, "ERRO: O número do veículo deve ser de 400 à 611.");
  4190.             if(IsPlayerInAnyVehicle(playerid))
  4191.              {
  4192.                 new Float:X, Float:Y, Float:Z;
  4193.                 GetPlayerPos(playerid, X, Y, Z);
  4194.                 GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
  4195.                 format(string, sizeof(string), "/Carros/carro%d.ini", proximocarro);
  4196.                 if(!DOF2_FileExists(string))
  4197.                 {
  4198.                     DOF2_CreateFile(string);
  4199.                     DOF2_SetInt(string, "Modelo", carid);
  4200.                     DOF2_SetFloat(string, "CordX", Float:X);
  4201.                     DOF2_SetFloat(string, "CordY", Float:Y);
  4202.                     DOF2_SetFloat(string, "CordZ", Float:Z);
  4203.                     DOF2_SetFloat(string, "Angulo", Float:ang);
  4204.                     DOF2_SetInt(string, "Cor1", cor1);
  4205.                     DOF2_SetInt(string, "Cor2", cor2);
  4206.                     DOF2_SetInt(string,"Alarme", 0);
  4207.                     DOF2_SetInt(string, "cDono", 0);
  4208.                     DOF2_SetString(string, "Dono", "Ninguem");
  4209.                     DOF2_SetInt(string,"cDono2", 0);
  4210.                     DOF2_SetString(string,"Dono2","Ninguem");
  4211.                     DOF2_SetString(string, "Nome", "Nenhum");
  4212.                     DOF2_SetString(string,"Placa","Sem Dono");
  4213.                     DOF2_SetInt(string, "Preco", preco);
  4214.                 }
  4215.                 SetTimerEx("CriarVeiculo2",5000,false,"dffffdd",carid,X,Y,Z,ang,cor1,cor2);
  4216.                 format(string, sizeof(string), "* Veiculo criado com sucesso!");
  4217.                 SendClientMessage(playerid, Verde, string);
  4218.                 return 1;
  4219.             }
  4220.             else {
  4221.                 SendClientMessage(playerid, Vermelho, "* Você não está em um veiculo!");
  4222.             }
  4223.         }
  4224.         else {
  4225.             SendClientMessage(playerid, Vermelho, "* Veiculo inválido.");
  4226.             return 1;
  4227.         }
  4228.         return 1;
  4229.     }
  4230.  
  4231.     CMD:comprarcarro(playerid)
  4232.     {
  4233.         new string[100];
  4234.         new VehicleID;
  4235.         VehicleID = GetPlayerVehicleID(playerid);
  4236.         new pname[MAX_PLAYER_NAME];
  4237.         GetPlayerName(playerid, pname, sizeof(pname));
  4238.         for(new carro = 0; carro < MAX_CARROS; carro++)
  4239.         {
  4240.             format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  4241.             if(strcmp(DOF2_GetString(string, "Dono"), pname, true) == 1)
  4242.             {
  4243.                 SendClientMessage(playerid, Vermelho, "* Você já tem um veiculo e não pode comprar outro.");
  4244.                 return 1;
  4245.             }
  4246.             if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0 && VehicleID == DOF2_GetInt(string, "Id"))
  4247.             {
  4248.                 if(GetPlayerGranaEx(playerid) >= DOF2_GetInt(string, "Preco")) {
  4249.                     new aname[MAX_PLAYER_NAME];
  4250.                     GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
  4251.                     DOF2_SetInt(string, "cDono", 1);
  4252.                     DOF2_SetString(string, "Dono", aname);
  4253.                     SendClientMessage(playerid, -1, "* Veiculo comprado com sucesso!");
  4254.                     SendClientMessage(playerid, -1, "* Para ver as funções de seu veiculo, Use: '/meucarro'.");
  4255.                     GivePlayerGranaEx(playerid, -DOF2_GetInt(string, "Preco"));
  4256.                     TogglePlayerControllable(playerid, 1);
  4257.                     return 1;
  4258.                 }
  4259.                 else {
  4260.                     SendClientMessage(playerid, Vermelho, "* Você não tem dinheiro suficiente!");
  4261.                     return 1;
  4262.                 }
  4263.             }
  4264.         }
  4265.         return 1;
  4266.     }
  4267.  
  4268.     CMD:meucarro(playerid)
  4269.     {
  4270.         new pname[MAX_PLAYER_NAME];
  4271.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  4272.         new resultados;
  4273.         new string[100], ala[11];
  4274.         for(new carro = 0; carro < MAX_CARROS; carro++)
  4275.         {
  4276.             format(string, sizeof(string), "/Carros/carro%d.ini", carro);
  4277.             if(DOF2_FileExists(string))
  4278.             {
  4279.                 if(strcmp(DOF2_GetString(string, "Dono"), pname, true) == 0) {
  4280.                     format(string, sizeof(string), "Carro Número: [ %d ]", carro);
  4281.                     ShowPlayerDialog(playerid, 4501, DIALOG_STYLE_LIST, string, "Salvar Posição\nAlterar cor 1\nAlterar cor 2\nRespawnar Veiculo\nNome do veiculo\nAlterar Placa\nAtivar / Desativar Alarme\nAtivar 2º Dono do Carro\nDefinir 2º Dono Do Carro\nVender Veiculo", "OK", "Cancelar");
  4282.                     resultados = 0;
  4283.                     if(DOF2_GetInt(string,"Alarme")==1) format(ala, sizeof(ala),"Desativar");
  4284.                     if(DOF2_GetInt(string,"Alarme")==0) format(ala, sizeof(ala),"Ativar");
  4285.                 }
  4286.                 else {
  4287.                     resultados = 1;
  4288.                 }
  4289.             }
  4290.         }
  4291.         if(resultados == 1)
  4292.         {
  4293.             SendClientMessage(playerid, 0xFFFFFFFF, "Você não esta em um carro!");
  4294.         }
  4295.         return 1;
  4296.     }
  4297.  
  4298.     CMD:modelocarro(playerid, params[])
  4299.     {
  4300.         new md, string[100];
  4301.         if(sscanf(params,"s",md)) return SendClientMessage(playerid, Vermelho, "* /modelocarro [modeloid]");
  4302.         for(new c = 0; c < MAX_CARROS; c++) {
  4303.             format(string, sizeof(string), "/Carros/carro%d.ini", c);
  4304.             if(DOF2_FileExists(string))
  4305.             {
  4306.                 if(GetPlayerVehicleID(playerid) == DOF2_GetInt(string, "Id")) {
  4307.                     if(pAdmin[playerid] > 4)
  4308.                     {
  4309.                         new pname[MAX_PLAYER_NAME];
  4310.                         GetPlayerName(playerid, pname, sizeof(pname));
  4311.                         DOF2_SetInt(string, "Modelo", md);
  4312.                         SendClientMessage(playerid, Vermelho, "* Agora use: /respawncarv.");
  4313.                     }
  4314.                     else {
  4315.                         SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
  4316.                     }
  4317.                 }
  4318.                 else {
  4319.                 }
  4320.             }
  4321.         }
  4322.         return 1;
  4323.     }
  4324.  
  4325.     CMD:respawncarv(playerid, params[])
  4326.     {
  4327.         new string[100];
  4328.         for(new c = 0; c < MAX_CARROS; c++)
  4329.         {
  4330.             format(string, sizeof(string), "/Carros/carro%d.ini", c);
  4331.             if(DOF2_FileExists(string))
  4332.             {
  4333.                 if(GetPlayerVehicleID(playerid) == DOF2_GetInt(string, "Id"))
  4334.                 {
  4335.                     if(pAdmin[playerid] > 4)
  4336.                     {
  4337.                         new pname[MAX_PLAYER_NAME];
  4338.                         GetPlayerName(playerid, pname, sizeof(pname));
  4339.                         new carroid;
  4340.                         DestroyVehicle(DOF2_GetInt(string, "Id"));
  4341.                         carroid = AddStaticVehicle(DOF2_GetInt(string, "Modelo"), DOF2_GetFloat(string, "CordX"), DOF2_GetFloat(string, "CordY"), DOF2_GetFloat(string, "CordZ"), DOF2_GetFloat(string, "Angulo"), DOF2_GetInt(string, "Cor1"), DOF2_GetInt(string, "Cor2"));
  4342.                         DOF2_SetInt(string, "Id", carroid);
  4343.                         SendClientMessage(playerid, Vermelho, "* Carros do ' /carv ' respawnados..");
  4344.                     }
  4345.                     else {
  4346.                         SendClientMessage(playerid, Vermelho, "* Você não tem permissão.");
  4347.                     }
  4348.                 }
  4349.             }
  4350.         }
  4351.         return 1;
  4352.     }
  4353.  
  4354.     CMD:car(playerid)
  4355.     {
  4356.         new Float:X, Float:Y, Float:Z, Float: angulo;
  4357.         GetPlayerPos(playerid, X, Y, Z);
  4358.         GetPlayerFacingAngle(playerid, angulo);
  4359.         CreateVehicle(411, X, Y, Z-1, angulo, -1, -1, 120000);
  4360.         return 1;
  4361.     }
  4362.  
  4363.     CMD:cv(playerid, params[])
  4364.     {
  4365.         new plid, string[100];
  4366.         if(sscanf(params,"i", plid))
  4367.             return SendClientMessage(playerid, Vermelho, "* Use: /Cv [ID do veiculo]");
  4368.         if(pAdmin[playerid] > 1 || IsPlayerAdmin(playerid))
  4369.         {
  4370.             new Float:X,Float:Y,Float:Z,Float:Angle;
  4371.             if(IsPlayerConnected(playerid))
  4372.             {
  4373.                 if(plid >= 400 && plid <= 611)
  4374.                 {
  4375.                     GetPlayerPos(playerid,X,Y,Z);
  4376.                     GetPlayerFacingAngle(playerid,Angle);
  4377.                     new carro = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
  4378.                     PutPlayerInVehicle(playerid,carro,0);
  4379.                     if(GetPlayerInterior(playerid))
  4380.                         LinkVehicleToInterior(carro,GetPlayerInterior(playerid));
  4381.                     SetVehicleVirtualWorld(carro,GetPlayerVirtualWorld(playerid));
  4382.                     format(string, sizeof(string), "* Veiculo Modelo: '%d' criado com sucesso.", plid);
  4383.                     SendClientMessage(playerid, newadm, string);
  4384.                     return 1;
  4385.                 }
  4386.                 else {
  4387.                     SendClientMessage(playerid, Vermelho, "* ID inválido, digite um ID válido. ID's permitidos = 400 á 611.");
  4388.                     return 1;
  4389.                 }
  4390.             }
  4391.         }
  4392.         return 1;
  4393.     }
  4394.  
  4395.     // Fim
  4396.     CMD:abastecer(playerid)
  4397.     {
  4398.         if(AreaPosto[playerid] == 1)
  4399.         {
  4400.             if(!IsPlayerInAnyVehicle(playerid))
  4401.                 return SendClientMessage(playerid, 0xFFFFFFFF, "Você não esta em um carro");
  4402.             ShowPlayerDialog(playerid,DIALOG_GAS,DIALOG_STYLE_INPUT,"Posto Base RPG","** Digite a quantia de litros a colocar em seu Veículo. **\n O Preço da Gasolina é 2R$ Por Litro\nAtt: Posto Base RPG","Ok","Fechar");
  4403.             return 1;
  4404.         }
  4405.         if(!AreaPosto[playerid])
  4406.             return SendClientMessage(playerid, 0xFFFFFFFF, "Você não está em um Posto!");
  4407.         return 1;
  4408.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement