Advertisement
AleeFerreira

Brasil - GrandLife [RPG]

Jan 10th, 2012
1,345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 88.94 KB | None | 0 0
  1. /*
  2. ********************************************************************************
  3.                             Brasil GrandLife [ RPG ]
  4.                             Criador: AleeFerreira
  5.  
  6. * Créditos oficiais do GameMode:
  7.            
  8.                 - Fórum SA-MP [ Por eu retirar algumas ideias de lá ]
  9.                 - Wiki SA-MP [ Lugar onde eu aprendi o básico pawn ]
  10.                 - Slick [ Pela SII ]
  11.                 - Zeex [ Pelo ZCMD ]
  12.                 - Y_Less [ Pelo SSCANF ]
  13.                 - [MPA]matraka_IDG [ Pelo CPSTREAM ]
  14.                 - Equipe MTA [ Pelo MAP EDITOR ]
  15.                 - AleeFerreira [ Pelo GameMode ]
  16.                 - A equipe que criou o Pawno [ Editor do Script ]
  17.                 - A equipe que criou o SA=MP [ Game ]
  18.                 - A Rockstar Games [ pelo GTA ]
  19.                 - [Y]Falcon [ Pelo salvamento em SII ]
  20.  
  21. * Créditos "Off - GM":
  22.  
  23.                 - Deus [ Por me criar e me dar sabedoria ]
  24.                 - Meus pais [ Por me darem o PC ]
  25.                 - Aos criadores do PC,teclado,Mouse [ Além do mais foi com isso que eu criei ]
  26.                 - Ao chefe do meu pai [ Por dá o salário que meu pai compro meu pc ]
  27.                 - Ao Steve Jobs [ Acho ele um gênio *-* ]
  28.                 - Aos criadores da Internet [ Foi lá que postei *-* ]
  29.                
  30. * NOTAS do GameMode:
  31.  
  32.                 - Podem postar em Blogs/Sites contanto que deixem os devidos créditos!
  33.                 - Quem retirar os creditos , terá uma enorme dor de cabeça, pois tenho direitos assinados!
  34.                 - Editar não é CRIAR!
  35.                
  36. * O que falta fazer:
  37.  
  38.                 - Criar um comando /cr ou /continuarpos
  39.                 - Criar os comandos de TODAS as profissões D:
  40.                 - Criar um sistema de Casa
  41.                 - Criar um sistema de Empresa
  42.                 - Criar a prefeitura ( Lugar onde pega profs ) [ Ja criei ]
  43.                 - Criar um sistema de eventos
  44.                 - Criar MILHARES DE COMANDOS
  45.                 - Se eu lembrar de mais alguma coisa eu coloco aqui!
  46.  
  47. * O que eu já fiz:
  48.  
  49.                 - Sistema de banco
  50.                 - Comandos do banco
  51.                 - Sistema de Profissão
  52.                 - Sistema de Salário
  53.                 - Sistema de Level
  54.                 - Velocimetro com: Gasolina, KM/h, Modelo do carro
  55.                 - Sistema de Gasolina
  56.                 - Alguns carros por San Andreas
  57.                 - Sistema de Convênio Médico
  58.                 - Sistema de Plano de Saúde
  59.                 - Comandos de Policiais( So alguns que fiz pra testar )
  60.                  * /algemar [id][motivo]
  61.                  * /multar [id][quantia][motivo]
  62.                  * /desalgemar [id]
  63.                  * /procedimento [id]
  64.                
  65. ********************************************************************************
  66. */
  67.  
  68.  
  69. #include                        <   a_samp  >
  70. #include                        <    SII    >
  71. #include                        <   zcmd    >
  72. #include                        <  cpstream >
  73.  
  74.  
  75. #define DialogRegistro 123
  76. #define DialogLogin    124
  77. #define DialogSaidaA   125
  78. #define DialogSaidaB   126
  79.  
  80. #define MAXIMO_TLOGAR 3
  81. #define CASE_SENSITIVE false
  82. #define VALOR_MAXIMO_VIDA 100.0
  83. #define VALOR_MAXIMO_COLETE 100.0
  84. #define ContasPlayers "/ContasPlayers/%s.ini"
  85.  
  86.  
  87. #define C_OFF1 0x0000F6AA
  88. #define C_OFF2 0x542900AA
  89. #define ERRO 0xF60032AA
  90. #define LARANJA 0xF67034AA
  91. #define VERDEESCURO 0x007034AA
  92. #define C_MSG 0xABC6E3AA
  93. #define LCLARO 0xE57800AA
  94. #define PROCE 0xB5CB00AA
  95. #define GetVehicleModelName(%1) Veiculos[%1-400]
  96.  
  97. //Profissões
  98.  
  99. #define Desempregado 0
  100. #define Taxista 1
  101. #define MotoTaxi 2
  102. #define MOnibus 3
  103. #define Medico 4
  104. #define Advogado 5
  105. #define Bancario 6
  106. #define MParticular 7
  107. #define TArmas 8
  108. #define TDrogas 9
  109. #define Chefao 10
  110. #define Prostituta 11
  111. #define PMilitar 12
  112. #define PFederal 13
  113. #define PFlorestal 14
  114. #define CIA 15
  115. #define FBI 16
  116. #define InterPol 17
  117. #define ROTAM 18
  118. #define Prefeito 19
  119. #define Presidente 20
  120. #define Governador 21
  121. #define Assassino 22
  122.  
  123. //corprofs
  124.  
  125. #define C_DESEMPREGADO 0xF6F6F6AA
  126. #define C_TAXISTA 0xF6F600AA
  127. #define C_MOTOTAXI 0xF69F00AA
  128. #define C_MONIBUS 0x843E65AA
  129. #define C_MEDICO 0x007C49AA
  130. #define C_ADVOGADO 0x6F4E8DAA
  131. #define C_BANCARIO 0x004E00AA
  132. #define C_MPARTICULAR 0xF6F6D0AA
  133. #define C_TARMAS 0x485807AA
  134. #define C_TDROGAS 0x9A5807AA
  135. #define C_CHEFAO 0x9C3700AA
  136. #define C_PROSTITUTA 0xF66BD9AA
  137. #define C_PMILITAR 0x0067F6AA
  138. #define C_PFEDERAL 0xAA4B27AA
  139. #define C_PFLORESTAL 0x004B27AA
  140. #define C_CIA 0x009BF6AA
  141. #define C_FBI 0x0056F6AA
  142. #define C_INTERPOL 0xA100F6AA
  143. #define C_ROTAM 0x8C00F6AA
  144. #define C_PREFEITO 0x9ABBF6AA
  145. #define C_PRESIDENTE 0x8885F6AA
  146. #define C_GOVERNADOR 0x636284AA
  147. #define C_ASSASSINO 0xF60000AA
  148.  
  149.  
  150.  
  151. new PlayerProf[MAX_PLAYERS];
  152. forward EntrarProf(playerid);
  153.  
  154. new arquivo[45];
  155. new _string[200];
  156. new nome[MAX_PLAYER_NAME];
  157. new TentativasDeLogar[MAX_PLAYERS];
  158. new bool:PrimeiroSpawn[MAX_PLAYERS];
  159. new Morreu[MAX_PLAYERS];
  160. new Matou[MAX_PLAYERS];
  161. new Menu:Profissoes;
  162. new Menu:Honestas;
  163. new Menu:Mafia;
  164. new Menu:Policial;
  165. new Menu:Governo;
  166. new Text:Velocimetro[MAX_PLAYERS];
  167. new Text:ModeloBike[MAX_PLAYERS];
  168. new Text:VeloBike[MAX_PLAYERS];
  169. new Text:Modelo[MAX_PLAYERS];
  170. new Text:Velocidade[MAX_PLAYERS];
  171. new Text:Posto[MAX_PLAYERS];
  172. new Text:Hora;
  173. new Gasolina[MAX_PLAYERS];
  174.  
  175. new Veiculos[][] =
  176. {
  177.         "Landstalker",
  178.         "Bravura",
  179.         "Buffalo",
  180.         "Linerunner",
  181.         "Pereniel",
  182.         "Sentinel",
  183.         "Dumper",
  184.         "Firetruck",
  185.         "Trashmaster",
  186.         "Stretch",
  187.         "Manana",
  188.         "Infernus",
  189.         "Voodoo",
  190.         "Pony",
  191.         "Mule",
  192.         "Cheetah",
  193.         "Ambulance",
  194.         "Leviathan",
  195.         "Moonbeam",
  196.         "Esperanto",
  197.         "Taxi",
  198.         "Washington",
  199.         "Bobcat",
  200.         "Mr Whoopee",
  201.         "BF Injection",
  202.         "Hunter",
  203.         "Premier",
  204.         "Enforcer",
  205.         "Securicar",
  206.         "Banshee",
  207.         "Predator",
  208.         "Bus",
  209.         "Rhino",
  210.         "Barracks",
  211.         "Hotknife",
  212.         "Trailer",
  213.         "Previon",
  214.         "Coach",
  215.         "Cabbie",
  216.         "Stallion",
  217.         "Rumpo",
  218.         "RC Bandit",
  219.         "Romero",
  220.         "Packer",
  221.         "Monster Truck",
  222.         "Admiral",
  223.         "Squalo",
  224.         "Seasparrow",
  225.         "Pizzaboy",
  226.         "Tram",
  227.         "Trailer",
  228.         "Turismo",
  229.         "Speeder",
  230.         "Reefer",
  231.         "Tropic",
  232.         "Flatbed",
  233.         "Yankee",
  234.         "Caddy",
  235.         "Solair",
  236.         "Berkley's RC Van",
  237.         "Skimmer",
  238.         "PCJ-600",
  239.         "Faggio",
  240.         "Freeway",
  241.         "RC Baron",
  242.         "RC Raider",
  243.         "Glendale",
  244.         "Oceanic",
  245.         "Sanchez",
  246.         "Sparrow",
  247.         "Patriot",
  248.         "Quad",
  249.         "Coastguard",
  250.         "Dinghy",
  251.         "Hermes",
  252.         "Sabre",
  253.         "Rustler",
  254.         "ZR-350",
  255.         "Walton",
  256.         "Regina",
  257.         "Comet",
  258.         "BMX",
  259.         "Burrito",
  260.         "Camper",
  261.         "Marquis",
  262.         "Baggage",
  263.         "Dozer",
  264.         "Maverick",
  265.         "News Chopper",
  266.         "Rancher",
  267.         "FBI Rancher",
  268.         "Virgo",
  269.         "Greenwood",
  270.         "Jetmax",
  271.         "Hotring",
  272.         "Sandking",
  273.         "Blista Compact",
  274.         "Police Maverick",
  275.         "Boxville",
  276.         "Benson",
  277.         "Mesa",
  278.         "RC Goblin",
  279.         "Hotring Racer",
  280.         "Hotring Racer",
  281.         "Bloodring Banger",
  282.         "Rancher",
  283.         "Super GT",
  284.         "Elegant",
  285.         "Journey",
  286.         "Bike",
  287.         "Mountain Bike",
  288.         "Beagle",
  289.         "Cropdust",
  290.         "Stunt",
  291.         "Tanker",
  292.         "RoadTrain",
  293.         "Nebula",
  294.         "Majestic",
  295.         "Buccaneer",
  296.         "Shamal",
  297.         "Hydra",
  298.         "FCR-900",
  299.         "NRG-500",
  300.         "HPV1000",
  301.         "Cement Truck",
  302.         "Tow Truck",
  303.         "Fortune",
  304.         "Cadrona",
  305.         "FBI Truck",
  306.         "Willard",
  307.         "Forklift",
  308.         "Tractor",
  309.         "Combine",
  310.         "Feltzer",
  311.         "Remington",
  312.         "Slamvan",
  313.         "Blade",
  314.         "Freight",
  315.         "Streak",
  316.         "Vortex",
  317.         "Vincent",
  318.         "Bullet",
  319.         "Clover",
  320.         "Sadler",
  321.         "Firetruck",
  322.         "Hustler",
  323.         "Intruder",
  324.         "Primo",
  325.         "Cargobob",
  326.         "Tampa",
  327.         "Sunrise",
  328.         "Merit",
  329.         "Utility",
  330.         "Nevada",
  331.         "Yosemite",
  332.         "Windsor",
  333.         "Monster Truck",
  334.         "Monster Truck",
  335.         "Uranus",
  336.         "Jester",
  337.         "Sultan",
  338.         "Stratum",
  339.         "Elegy",
  340.         "Raindance",
  341.         "RC Tiger",
  342.         "Flash",
  343.         "Tahoma",
  344.         "Savanna",
  345.         "Bandito",
  346.         "Freight",
  347.         "Trailer",
  348.         "Kart",
  349.         "Mower",
  350.         "Duneride",
  351.         "Sweeper",
  352.         "Broadway",
  353.         "Tornado",
  354.         "AT-400",
  355.         "DFT-30",
  356.         "Huntley",
  357.         "Stafford",
  358.         "BF-400",
  359.         "Newsvan",
  360.         "Tug",
  361.         "Trailer",
  362.         "Emperor",
  363.         "Wayfarer",
  364.         "Euros",
  365.         "Hotdog",
  366.         "Club",
  367.         "Trailer",
  368.         "Trailer",
  369.         "Andromada",
  370.         "Dodo",
  371.         "RC Cam",
  372.         "Launch",
  373.         "Police Car (LSPD)",
  374.         "Police Car (SFPD)",
  375.         "Police Car (LVPD)",
  376.         "Police Ranger",
  377.         "Picador",
  378.         "S.W.A.T. Van",
  379.         "Alpha",
  380.         "Phoenix",
  381.         "Glendale",
  382.         "Sadler",
  383.         "Luggage Trailer",
  384.         "Luggage Trailer",
  385.         "Stair Trailer",
  386.         "Boxville",
  387.         "Farm Plow",
  388.         "Utility Trailer"
  389. };
  390.  
  391. forward IsPlayerInBanco(playerid);
  392. forward Salario();
  393. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  394. forward GanharExp();
  395. forward Speedometer();
  396. forward AtualizarCombustivel();
  397. forward PlayerPolicial(playerid);
  398. forward MensagemAdmin(color, string[]);
  399. forward AtualizarRelogio(playerid);
  400. native sscanf(const data[], const format[], {Float,_}:...);
  401. native unformat(const data[], const format[], {Float,_}:...) = sscanf;
  402. //
  403.  
  404. new banco1;
  405. new banco2;
  406. new banco3;
  407. new banco4;
  408. new banco5;
  409. new banco6;
  410. new hospital;
  411. new hospitalls;
  412. new hospitalsf;
  413. new hospitalfc;
  414. new hospitallv;
  415. new entradapref;
  416. new saidapref;
  417. new pickempregos;
  418.  
  419. enum pInfo
  420. {
  421.     Admin,
  422.     TemConta,
  423.     Saldo,
  424.     Level,
  425.     Dinheiro,
  426.     Exp,
  427.     Algemado,
  428.     Convenio,
  429.     Plano
  430. }
  431. new PlayerInfo[MAX_PLAYERS][pInfo];
  432.  
  433. stock SalvarDadosPlayer(playerid)
  434. {
  435.     static Float:PosX, Float:PosY, Float:PosZ, Float:Vida, Float:Colete;
  436.     GetPlayerHealth(playerid, Vida);
  437.     GetPlayerArmour(playerid, Colete);
  438.     GetPlayerPos(playerid, PosX, PosY, PosZ);
  439.     GetPlayerName(playerid, nome, sizeof(nome));
  440.     format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  441.     if(!INI_Exist(arquivo)) return 0x1;
  442.  
  443.     INI_Open(arquivo);
  444.     INI_WriteInt("Dinheiro", GetPlayerMoney(playerid));
  445.     INI_WriteInt("Level", GetPlayerScore(playerid));
  446.     INI_WriteInt("Exp",PlayerInfo[playerid][Exp]);
  447.     INI_WriteInt("LevelProcurado", GetPlayerWantedLevel(playerid));
  448.     INI_WriteInt("Algemado",PlayerInfo[playerid][Algemado]);
  449.     INI_WriteInt("Skin", GetPlayerSkin(playerid));
  450.     INI_WriteFloat("Vida", Vida);
  451.     INI_WriteFloat("Colete", Colete);
  452.     INI_WriteFloat("PosX", PosX);
  453.     INI_WriteFloat("PosY", PosY);
  454.     INI_WriteFloat("PosZ", PosZ);
  455.     INI_WriteInt("Interior", GetPlayerInterior(playerid));
  456.     INI_WriteInt("VirtualWorld", GetPlayerVirtualWorld(playerid));
  457.     INI_WriteInt("TemConta", PlayerInfo[playerid][TemConta]);
  458.     INI_WriteInt("Saldo", PlayerInfo[playerid][Saldo]);
  459.     INI_WriteInt("Admin", PlayerInfo[playerid][Admin]);
  460.     INI_WriteInt("Profissao",PlayerProf[playerid]);
  461.     INI_WriteInt("Gasolina",Gasolina[playerid]);
  462.     INI_WriteInt("Morreu", Morreu[playerid]);
  463.     INI_WriteInt("Matou", Matou[playerid]);
  464.     INI_WriteInt("Convenio", PlayerInfo[playerid][Convenio]);
  465.     INI_WriteInt("Plano", PlayerInfo[playerid][Plano]);
  466.     INI_Save();
  467.     INI_Close();
  468.     return 0x1;
  469. }
  470.  
  471. stock CarregarDadosPlayer(playerid)
  472. {
  473.     GetPlayerName(playerid, nome, sizeof(nome));
  474.     format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  475.     if(!INI_Exist(arquivo)) return 0x1;
  476.  
  477.     INI_Open(arquivo);
  478.     GivePlayerMoney(playerid, INI_ReadInt("Dinheiro"));
  479.     SetPlayerScore(playerid, INI_ReadInt("Level"));
  480.     SetPlayerSkin(playerid, INI_ReadInt("SkinAtual"));
  481.     SetPlayerWantedLevel(playerid, INI_ReadInt("LevelProcurado"));
  482.     Morreu[playerid] = INI_ReadInt("Morreu");
  483.     Matou[playerid] = INI_ReadInt("Matou");
  484.     PlayerInfo[playerid][Admin] = INI_ReadInt("Admin");
  485.     PlayerInfo[playerid][TemConta] = INI_ReadInt("TemConta");
  486.     PlayerInfo[playerid][Saldo] = INI_ReadInt("Saldo");
  487.     PlayerInfo[playerid][Level] = INI_ReadInt("Level");
  488.     PlayerInfo[playerid][Dinheiro] = INI_ReadInt("Dinheiro");
  489.     PlayerProf[playerid] = INI_ReadInt("Profissao");
  490.     PlayerInfo[playerid][Exp] = INI_ReadInt("Exp");
  491.     Gasolina[playerid] = INI_ReadInt("Gasolina");
  492.     PlayerInfo[playerid][Algemado] = INI_ReadInt("Algemado");
  493.     PlayerInfo[playerid][Plano] = INI_ReadInt("Plano");
  494.     PlayerInfo[playerid][Convenio] = INI_ReadInt("Convenio");
  495.     INI_Close();
  496.     return 0x1;
  497. }
  498.  
  499. main()
  500. {
  501.     print("********************************");
  502.     print("GrandLife RPG - Carregando");
  503.     print("Criador: AleeFerreira");
  504.     print("********************************");
  505. }
  506.  
  507. public OnGameModeInit()
  508. {
  509.     AddStaticVehicleEx(551,2120.37988281,1901.93237305,10.55187511,0.00000000,-1,-1,15); //Merit
  510.     AddStaticVehicleEx(561,2040.78430176,1507.18542480,10.59587479,0.00000000,-1,-1,15); //Stratum
  511.     AddStaticVehicleEx(579,2040.68493652,1515.24450684,10.94190311,0.00000000,-1,-1,15); //Huntley
  512.     AddStaticVehicleEx(579,2142.99316406,1013.11340332,11.09034061,91.30932617,-1,-1,15); //Huntley
  513.     AddStaticVehicleEx(560,1097.57641602,-1775.52587891,13.14954281,270.67565918,-1,-1,15); //Sultan
  514.     AddStaticVehicleEx(560,1097.37194824,-1772.63391113,13.15162277,270.67565918,-1,-1,15); //Sultan
  515.     AddStaticVehicleEx(560,1097.37268066,-1769.68725586,13.15378094,270.67565918,-1,-1,15); //Sultan
  516.     CreateObject(2942,1507.07666016,-1755.54638672,13.18977451,0.00000000,0.00000000,181.35131836); //object(kmb_atm1) (1)
  517.     CreateObject(2942,1225.21105957,-1811.75341797,16.23664856,0.00000000,0.00000000,0.00000000); //object(kmb_atm1) (2)
  518.     CreateObject(2942,403.65969849,-1524.57312012,31.91633606,0.00000000,0.00000000,314.34533691); //object(kmb_atm1) (3)
  519.     CreateObject(2942,-88.17184448,1229.55334473,19.38508606,0.00000000,0.00000000,0.00000000); //object(kmb_atm1) (4)
  520.     CreateObject(2942,2194.75952148,1987.99499512,11.93977451,0.00000000,0.00000000,272.66064453); //object(kmb_atm1) (5)
  521.     CreateObject(2942,2096.48876953,1451.74206543,10.46321201,0.00000000,0.00000000,0.00000000); //object(kmb_atm1) (6)
  522.     banco1 = CPS_AddCheckpoint(1507.0203,-1754.5189,13.5469, 2.0, 40);//banco1
  523.     banco2 = CPS_AddCheckpoint(1225.2505,-1812.7090,16.5938, 2.0, 40);//banco2
  524.     banco3 = CPS_AddCheckpoint(402.9662,-1525.2988,32.2734, 2.0, 40);//banco3
  525.     banco4 = CPS_AddCheckpoint(-88.0959,1228.6991,19.7422, 2.0, 40);//banco4
  526.     banco5 = CPS_AddCheckpoint(2096.4116,1450.8185,10.8203, 2.0, 40);//banco5
  527.     banco6 = CPS_AddCheckpoint(2193.5500,1987.7876,12.2969, 2.0, 40);//banco6
  528.     hospital = CreatePickup(1241, 1, 2036.472778, -1404.789428, 17.250406, 0);
  529.     hospitalls = CreatePickup(1241, 1, 1172.957031, -1327.790161, 15.398351, 0);
  530.     hospitalfc = CreatePickup(1241, 1, -314.366546, 1050.047729, 20.340259, 0);
  531.     hospitalsf = CreatePickup(1241, 1, -2659.194580, 634.337341, 14.453125, 0);
  532.     hospitallv = CreatePickup(1241, 1, 2630.434326, 1824.417602, 11.023437, 0);
  533.     entradapref = CreatePickup(1239, 1, 1481.031860, -1771.015869, 18.795755, 0);
  534.     saidapref = CreatePickup(1279, 1, 390.765258, 173.802291, 1008.382812, 0);
  535.     pickempregos = CreatePickup(1277, 1, 361.829895, 173.610092, 1008.382812, 0);
  536.     Create3DTextLabel("Menu Hospital", 0xAFAFAFAA, 2036.472778, -1404.789428, 17.250406, 10, 0, 0);
  537.     Create3DTextLabel("Menu Hospital(LS)", 0xAFAFAFAA, 1172.957031, -1327.790161, 15.398351, 10, 0, 0);
  538.     Create3DTextLabel("Menu Hospital(FC)", 0xAFAFAFAA, -314.366546, 1050.047729, 20.340259, 10, 0, 0);
  539.     Create3DTextLabel("Menu Hospital(SF)", 0xAFAFAFAA, -2659.194580, 634.337341, 14.453125, 10, 0, 0);
  540.     Create3DTextLabel("Menu Hospital(LV)", 0xAFAFAFAA, 2630.434326, 1824.417602, 11.023437, 10, 0, 0);
  541.     Create3DTextLabel("Prefeitura", 0xFFFFFFAA, 1481.031860, -1771.015869, 18.795755, 10, 0, 0);
  542.     Create3DTextLabel("Saída", 0xFFFFFFAA, 390.765258, 173.802291, 1008.382812, 10, 0, 0);
  543.     Create3DTextLabel("Empregos", 0xFFFFFFAA, 361.829895, 173.610092, 1008.382812, 10, 0, 0);
  544.  
  545.     Profissoes = CreateMenu("Profissoes", 1, 50.0, 180.0, 200.0, 200.0);
  546.     AddMenuItem(Profissoes,0, "Honestas");
  547.     AddMenuItem(Profissoes,0, "Mafias");
  548.     AddMenuItem(Profissoes,0,"Policiais");
  549.     AddMenuItem(Profissoes,0,"Governo");
  550.     AddMenuItem(Profissoes,0,"~r~- Sair");
  551.    
  552.     Honestas = CreateMenu("Honestas", 1, 50.0, 180.0, 200.0, 200.0);
  553.     AddMenuItem(Honestas,0, "Desempregado [0/R$250]");
  554.     AddMenuItem(Honestas,0, "Taxista [0/R$500]");
  555.     AddMenuItem(Honestas,0, "MotoTaxi [6/R$600]");
  556.     AddMenuItem(Honestas,0, "M.Onibus [7/R$1000]");
  557.     AddMenuItem(Honestas,0, "Medico [15/R$1500]");
  558.     AddMenuItem(Honestas,0, "Advogado [25/R$1600]");
  559.     AddMenuItem(Honestas,0, "M.Particular [10/R$700]");
  560.     AddMenuItem(Honestas,0, "~r~- Sair");
  561.    
  562.     Mafia = CreateMenu("Mafia", 1, 50.0, 180.0, 200.0, 200.0);
  563.     AddMenuItem(Mafia,0, "T.Armas [10/R$800]");
  564.     AddMenuItem(Mafia,0, "T.Drogas [15/R$1000]");
  565.     AddMenuItem(Mafia,0, "Chefao [25/R$2500]");
  566.     AddMenuItem(Mafia,0, "Prostituta [3/R$400]");
  567.     AddMenuItem(Mafia,0, "Assassino [100/R$2000]");
  568.     AddMenuItem(Mafia,0, "~r~- Sair");
  569.  
  570.     Policial = CreateMenu("Policial", 1, 50.0, 180.0, 200.0, 200.0);
  571.     AddMenuItem(Policial,0, "P.Militar [65/R$1000]");
  572.     AddMenuItem(Policial,0, "P.Florestal [70/R$1400]");
  573.     AddMenuItem(Policial,0, "P.Federal [100/R$2000]");
  574.     AddMenuItem(Policial,0, "CIA [120/R$2400]");
  575.     AddMenuItem(Policial,0, "FBI [150/R$2600]");
  576.     AddMenuItem(Policial,0, "InterPol [240/R$3500]");
  577.     AddMenuItem(Policial,0, "ROTAM [300/R$4200]");
  578.     AddMenuItem(Policial,0, "~r~- Sair");
  579.    
  580.     Governo = CreateMenu("Governo", 1, 50.0, 180.0, 200.0, 200.0);
  581.     AddMenuItem(Governo,0,"Governador [270/R$3500]");
  582.     AddMenuItem(Governo,0,"Prefeito [500/R$3600]");
  583.     AddMenuItem(Governo,0,"Presidente [1000/R$5000]");
  584.     AddMenuItem(Governo,0,"~r~- Sair");
  585.    
  586.    
  587.     SetTimer("Speedometer", 1000, 1);
  588.     SetTimer("AtualizarCombustivel", 80000, 1);
  589.     SetTimer("AtualizarRelogio",1000,1);
  590.     ShowPlayerMarkers(1);
  591.     DisableInteriorEnterExits();
  592.     UsePlayerPedAnims();
  593.     EnableStuntBonusForAll(0);
  594.  
  595.     Hora = TextDrawCreate(545.000000, 37.000000, "_");
  596.     TextDrawBackgroundColor(Hora, 255);
  597.     TextDrawFont(Hora, 1);
  598.     TextDrawLetterSize(Hora, 0.469999, 1.900000);
  599.     TextDrawColor(Hora, -1);
  600.     TextDrawSetOutline(Hora, 1);
  601.     TextDrawSetProportional(Hora, 1);
  602.    
  603.     for(new i = 0; i < MAX_PLAYERS; i++)
  604.     {
  605.     Modelo[i] = TextDrawCreate(141.000000, 385.000000, " ");
  606.     TextDrawBackgroundColor(Modelo[i], 255);
  607.     TextDrawFont(Modelo[i], 1);
  608.     TextDrawLetterSize(Modelo[i], 0.599999, 1.500000);
  609.     TextDrawColor(Modelo[i], -1);
  610.     TextDrawSetOutline(Modelo[i], 1);
  611.     TextDrawSetProportional(Modelo[i], 1);
  612.     //-
  613.     Posto[i] = TextDrawCreate(141.000000, 359.000000, " ");
  614.     TextDrawBackgroundColor(Posto[i], 255);
  615.     TextDrawFont(Posto[i], 1);
  616.     TextDrawLetterSize(Posto[i], 0.599999, 1.500000);
  617.     TextDrawColor(Posto[i], -1);
  618.     TextDrawSetOutline(Posto[i], 1);
  619.     TextDrawSetProportional(Posto[i], 1);
  620.     //-
  621.     Velocidade[i] = TextDrawCreate(141.000000, 372.000000, "0");
  622.     TextDrawBackgroundColor(Velocidade[i], 255);
  623.     TextDrawFont(Velocidade[i], 1);
  624.     TextDrawLetterSize(Velocidade[i], 0.599999, 1.500000);
  625.     TextDrawColor(Velocidade[i], -1);
  626.     TextDrawSetOutline(Velocidade[i], 1);
  627.     TextDrawSetProportional(Velocidade[i], 1);
  628.     //-
  629.     ModeloBike[i] = TextDrawCreate(140.000000,370.000000, " ");
  630.     TextDrawFont(ModeloBike[i], 1);
  631.     TextDrawColor(ModeloBike[i], 0xFFFFFFAA);
  632.     TextDrawLetterSize(ModeloBike[i], 0.499999,1.000000);
  633.     TextDrawSetOutline(ModeloBike[i], 0);
  634.     TextDrawSetShadow(ModeloBike[i], 1);
  635.     TextDrawSetProportional(ModeloBike[i], 1);
  636.     TextDrawBackgroundColor(ModeloBike[i], 0x000000ff);
  637.     //-
  638.     ModeloBike[i] = TextDrawCreate(140.000000,370.000000, "_");
  639.     TextDrawFont(ModeloBike[i], 1);
  640.     TextDrawColor(ModeloBike[i], 0xFFFFFFAA);
  641.     TextDrawLetterSize(ModeloBike[i], 0.499999,1.000000);
  642.     TextDrawSetOutline(ModeloBike[i], 0);
  643.     TextDrawSetShadow(ModeloBike[i], 1);
  644.     TextDrawSetProportional(ModeloBike[i], 1);
  645.     TextDrawBackgroundColor(ModeloBike[i], 0x000000ff);
  646.     //-
  647.     VeloBike[i] = TextDrawCreate(140.000000, 380.000000, " ");
  648.     TextDrawFont(VeloBike[i], 1);
  649.     TextDrawColor(VeloBike[i], 0xFFFFFFAA);
  650.     TextDrawLetterSize(VeloBike[i], 0.499999,1.000000);
  651.     TextDrawSetOutline(VeloBike[i], 0);
  652.     TextDrawSetShadow(VeloBike[i], 1);
  653.     TextDrawSetProportional(VeloBike[i], 1);
  654.     TextDrawBackgroundColor(VeloBike[i], 0x000000ff);
  655.     }
  656.     return 1;
  657. }
  658.  
  659. public OnGameModeExit()
  660. {
  661.     print("**********************************");
  662.     print("GrandLife RPG - Descarregado");
  663.     print("**********************************");
  664.     for(new ii, ff = GetMaxPlayers(); ii < ff; ii++)
  665.         {
  666.         if(!IsPlayerConnected(ii)) continue;
  667.         SalvarDadosPlayer(ii);
  668.     }
  669.     return 1;
  670. }
  671.  
  672. public OnPlayerConnect(playerid)
  673. {
  674.     new str[128];
  675.     PrimeiroSpawn[playerid] = true;
  676.     TextDrawShowForPlayer(playerid, Hora);
  677.     TentativasDeLogar[playerid] = 0;
  678.     GetPlayerName(playerid, nome, sizeof(nome));
  679.     format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  680.     if(!INI_Exist(arquivo))
  681.     {
  682.         format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você ainda não possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira uma senha para registrar-se:", nome);
  683.         ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_PASSWORD, "{0000F6}Grand{542900}Life{FFFFFF} - Registro", _string, "Registrar", "Sair");
  684.     }
  685.     if(INI_Exist(arquivo))
  686.     {
  687.         format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você já possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira sua senha para logar-se:", nome);
  688.         ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "{0000F6}Grand{542900}Life{FFFFFF} - Login", _string, "Login", "Sair");
  689.     }
  690.     SetPlayerMapIcon( playerid, 1, 1507.0203,-1754.5189,13.5469, 52, 0, MAPICON_LOCAL );//Banco1
  691.     SetPlayerMapIcon( playerid, 2, 1225.2505,-1812.7090,16.5938, 52, 0, MAPICON_LOCAL );//banco2
  692.     SetPlayerMapIcon( playerid, 3, 402.9662,-1525.2988,32.2734, 52, 0, MAPICON_LOCAL );//banco3
  693.     SetPlayerMapIcon( playerid, 4, -88.0959,1228.6991,19.7422, 52, 0, MAPICON_LOCAL );//banco4
  694.     SetPlayerMapIcon( playerid, 5, 2096.4116,1450.8185,10.8203, 52, 0, MAPICON_LOCAL );//banco5
  695.     SetPlayerMapIcon( playerid, 6, 2193.5500,1987.7876,12.2969, 52, 0, MAPICON_LOCAL );//banco6
  696.     SetTimer("Salario", 1800000, true);
  697.     SetTimer("GanharExp", 1800000, true);
  698.     format(str, sizeof(str), "{00FF00}•••{FFFFFF} %s [%d] entrou no servidor", nome, playerid);
  699.     SendClientMessageToAll(0xFFFFFFAA, str);
  700.     return 1;
  701. }
  702.  
  703. public OnPlayerDisconnect(playerid, reason)
  704. {
  705.     SalvarDadosPlayer(playerid);
  706.     TextDrawHideForPlayer(playerid, Velocimetro[playerid]);
  707.     TextDrawHideForPlayer(playerid, Modelo[playerid]);
  708.     TextDrawHideForPlayer(playerid, ModeloBike[playerid]);
  709.     TextDrawHideForPlayer(playerid, VeloBike[playerid]);
  710.     TextDrawHideForPlayer(playerid, Posto[playerid]);
  711.     new str[200], pName[MAX_PLAYER_NAME];
  712.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  713.     switch(reason)
  714.     {
  715.         case 0: format(str, sizeof(str), "{FF0000}•••{FFFFFF} %s [%d] saiu do server {E7FE63}[{C5C5C5} Problemas com a conexão {E7FE63}]", pName, playerid);
  716.         case 1: format(str, sizeof(str), "{FF0000}•••{FFFFFF} %s [%d] saiu do server {E7FE63}[{C5C5C5} Resolveu sair {E7FE63}]", pName, playerid);
  717.         case 2: format(str, sizeof(str), "{FF0000}•••{FFFFFF} %s [%d] saiu do server {E7FE63}[{C5C5C5} Kickado / Banido {E7FE63}]", pName, playerid);
  718.     }
  719.     SendClientMessageToAll(0xFFFFFFAA, str);
  720.     return 1;
  721. }
  722.  
  723. public OnPlayerText(playerid, text[])
  724. {
  725.     new str[128];
  726.     format(str, sizeof(str), "[%d] %s", playerid, text);
  727.     SendPlayerMessageToAll(playerid, str);
  728.     return 0;
  729. }
  730.  
  731. public OnPlayerSpawn(playerid)
  732. {
  733.     if(PrimeiroSpawn[playerid] == true)
  734.     {
  735.         PrimeiroSpawn[playerid] = false;
  736.         SetPlayerHealth(playerid, VALOR_MAXIMO_VIDA);
  737.         GetPlayerName(playerid, nome, sizeof(nome));
  738.         format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  739.         INI_Open(arquivo);
  740.         SetPlayerSkin(playerid, INI_ReadInt("SkinAtual"));
  741.         SetPlayerPos(playerid,-90.4796,1221.3268,19.7422);
  742.         //criar o /continuarpos
  743.         INI_Close();
  744.         if(INI_ReadFloat("Vida") == 0) return 0x1;
  745.         INI_Open(arquivo);
  746.         SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
  747.         SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
  748.         SetTimer("Salario", 1800000, true);//1860000
  749.         INI_Close();
  750.     }
  751.     return 1;
  752. }
  753.  
  754. public OnPlayerDeath(playerid, killerid, reason)
  755. {
  756.     GetPlayerName(playerid, nome, sizeof(nome));
  757.     format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  758.     INI_Open(arquivo);
  759.     SetSpawnInfo(playerid, 0,INI_ReadInt("SkinAtual"),2032.3752,-1415.8716,16.9922, 137.5312, 0, 0, 0, 0, 0, 0);
  760.     INI_Close();
  761.     if(PlayerInfo[playerid][Plano] == 1 && PlayerInfo[playerid][Convenio] == 1)
  762.     {
  763.         SendClientMessage(playerid,C_PREFEITO,"Você tem plano de saúde, por isso não perdeu totalmente seu dinheiro!");
  764.         SendClientMessage(playerid,C_PREFEITO,"Você tem um convênio médico, por isso só pagou R$ 200 pelo tratamento!");
  765.         GivePlayerMoney(playerid,-200);
  766.     }
  767.     if(PlayerInfo[playerid][Plano] == 0 && PlayerInfo[playerid][Convenio] == 0)
  768.     {
  769.         SendClientMessage(playerid,C_PREFEITO,"Você não possui um plano de saúde e por isso perdeu toda a grana que estava em sua mão!");
  770.         ResetPlayerMoney(playerid);
  771.         GivePlayerMoney(playerid,-500);
  772.         SendClientMessage(playerid,C_PREFEITO,"Você pagou R$ 500 pelo tratamento!");
  773.         SendClientMessage(playerid,C_PREFEITO,"Compre um convênio médico e pague apenas R$ 200!");
  774.     }
  775.     if(PlayerInfo[playerid][Convenio] == 1 && PlayerInfo[playerid][Plano] == 0)
  776.     {
  777.         SendClientMessage(playerid,C_PREFEITO,"Você não possui um plano de saúde e por isso perdeu toda a grana que estava em sua mão!");
  778.         ResetPlayerMoney(playerid);
  779.         GivePlayerMoney(playerid,-200);
  780.         SendClientMessage(playerid,C_PREFEITO,"Você tem um convênio médico, por isso só pagou R$ 200 pelo tratamento!");
  781.     }
  782.     if(PlayerInfo[playerid][Plano] == 1 && PlayerInfo[playerid][Convenio] == 0)
  783.     {
  784.         SendClientMessage(playerid,C_PREFEITO,"Você pagou R$ 500 pelo tratamento!");
  785.         SendClientMessage(playerid,C_PREFEITO,"Compre um convênio médico e pague apenas R$ 200!");
  786.         GivePlayerMoney(playerid,-500);
  787.         SendClientMessage(playerid,C_PREFEITO,"Você tem plano de saúde, por isso não perdeu totalmente seu dinheiro!");
  788.     }
  789.        
  790.     Morreu[playerid] ++;
  791.     Matou[killerid] ++;
  792.     SendDeathMessage(killerid, playerid, reason);
  793.     return 1;
  794. }
  795.  
  796. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  797. {
  798.     if(dialogid == DialogRegistro)
  799.     {
  800.         if(!response) ShowPlayerDialog(playerid, DialogSaidaA, DIALOG_STYLE_MSGBOX, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}]Confirmar saida", "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Você ainda não está registrado.\n\nTem certeza que deseja sair ?", "Sair", "Voltar");
  801.         if(response)
  802.         {
  803.             if(strlen(inputtext) < 5 || strlen(inputtext) > 20)
  804.             {
  805.                 GetPlayerName(playerid, nome, sizeof(nome));
  806.                 format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você ainda não possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira uma senha para registrar-se:", nome);
  807.                 return ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_PASSWORD, "{0000F6}Grand{542900}Life{FFFFFF} - Registro", _string, "Registrar", "Sair");
  808.             }
  809.             GetPlayerName(playerid, nome, sizeof(nome));
  810.             format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  811.             INI_Create(arquivo);
  812.             INI_Open(arquivo);
  813.             INI_WriteString("Senha", inputtext);
  814.             INI_WriteInt("Dinheiro", 1500);
  815.             INI_WriteInt("Level", 0);
  816.             INI_WriteInt("LevelProcurado", 0);
  817.             INI_WriteInt("Algemado", 0);
  818.             INI_WriteInt("SkinAtual", 240);
  819.             INI_WriteFloat("Vida", VALOR_MAXIMO_VIDA);
  820.             INI_WriteFloat("Colete", VALOR_MAXIMO_COLETE);
  821.             INI_WriteFloat("PosX", -90.4796);
  822.             INI_WriteFloat("PosY", 1221.3268);
  823.             INI_WriteFloat("PosZ", 19.7422);
  824.             INI_WriteInt("Interior", 0);
  825.             INI_WriteInt("VirtualWorld", 0);
  826.             INI_WriteInt("TemConta", 0);
  827.             INI_WriteInt("Saldo",0);
  828.             INI_WriteInt("Admin",0);
  829.             INI_WriteInt("Morreu", 0);
  830.             INI_WriteInt("Matou", 0);
  831.             INI_WriteInt("Gasolina",50);
  832.             INI_WriteInt("Convenio",0);
  833.             INI_WriteInt("Saldo",0);
  834.             INI_Save();
  835.             INI_Close();
  836.             SpawnPlayer(playerid);
  837.             PlayerProf[playerid] = Desempregado;
  838.             Gasolina[playerid] = 50;
  839.             EntrarProf(playerid);
  840.             for(new a = 0; a < 100; a++)
  841.             {
  842.                 SendClientMessageToAll(0xFFFFFFFF, " ");
  843.             }
  844.             SendClientMessage(playerid, 0xFFFFFFAA, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}] Seus dados foram criados e carregados com sucesso!");
  845.         }
  846.     }
  847.  
  848.     if(dialogid == DialogLogin)
  849.     {
  850.         if(!response) ShowPlayerDialog(playerid, DialogSaidaB, DIALOG_STYLE_MSGBOX, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}] - Confirmar saida", "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Você ainda não está logado.\n\nTem certeza que deseja sair ?", "Sair", "Voltar");
  851.         if(response)
  852.         {
  853.             if(strlen(inputtext) < 5 || strlen(inputtext) > 20)
  854.             {
  855.                 GetPlayerName(playerid, nome, sizeof(nome));
  856.                 format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você já possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira sua senha para logar-se:", nome);
  857.                 return ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}]- Login", _string, "Login", "Sair");
  858.             }
  859.             static Input[20];
  860.             GetPlayerName(playerid, nome, sizeof(nome));
  861.             format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  862.             INI_Open(arquivo);
  863.             INI_ReadString(Input, "Senha");
  864.             INI_Close();
  865.             if(!strcmp(inputtext, Input, CASE_SENSITIVE))
  866.             {
  867.                 CarregarDadosPlayer(playerid);
  868.                 SpawnPlayer(playerid);
  869.                 EntrarProf(playerid);
  870.                 for(new a = 0; a < 100; a++)
  871.                 {
  872.                     SendClientMessageToAll(0xFFFFFFFF, " ");
  873.                 }
  874.             }
  875.             else
  876.             {
  877.                 TentativasDeLogar[playerid] ++;
  878.                 if(TentativasDeLogar[playerid] <= MAXIMO_TLOGAR)
  879.                 {
  880.                     GetPlayerName(playerid, nome, sizeof(nome));
  881.                     format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você ainda não possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira uma senha para registrar-se:", nome);
  882.                     ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_PASSWORD, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}] - Registro", _string, "Registrar", "Sair");
  883.                     format(_string, sizeof(_string), "Senha incorreta !!  || %d Tentativa(s) de %d", TentativasDeLogar[playerid], MAXIMO_TLOGAR);
  884.                     SendClientMessage(playerid, 0xFF0000AA, _string);
  885.                 }
  886.                 if(TentativasDeLogar[playerid] > MAXIMO_TLOGAR)
  887.                 {
  888.                     SendClientMessage(playerid, 0xFF0000AA, "Você excedeu o limite máximo de tentativas de logar...");
  889.                     SendClientMessage(playerid, 0xFF0000AA, "Por questões de segurança você foi kickado !!");
  890.                     Kick(playerid);
  891.                 }
  892.             }
  893.         }
  894.     }
  895.  
  896.     if(dialogid == DialogSaidaA)
  897.     {
  898.         if(response)
  899.         {
  900.             SendClientMessage(playerid, 0xFFFFFFAA, "Você decidiu sair sem se registrar...");
  901.             Kick(playerid);
  902.         }
  903.         else
  904.         {
  905.             GetPlayerName(playerid, nome, sizeof(nome));
  906.             format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você ainda não possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira uma senha para registrar-se:", nome);
  907.             ShowPlayerDialog(playerid, DialogRegistro, DIALOG_STYLE_PASSWORD, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}] - Registro", _string, "Registrar", "Sair");
  908.         }
  909.     }
  910.  
  911.     if(dialogid == DialogSaidaB)
  912.     {
  913.         if(response)
  914.         {
  915.             SendClientMessage(playerid, 0xFFFFFFAA, "Você decidiu sair sem se logar...");
  916.             Kick(playerid);
  917.         }
  918.         else
  919.         {
  920.             GetPlayerName(playerid, nome, sizeof(nome));
  921.             format(_string, sizeof(_string), "{0000F6}Grand{542900}Life{FFFFFF} RPG\n{FFFFFF}Olá, você já possui uma conta registrada.\n\nNome: {FFFF80}%s\n\n{FFFFFF}Insira sua senha para logar-se:", nome);
  922.             ShowPlayerDialog(playerid, DialogLogin, DIALOG_STYLE_PASSWORD, "{FFFFFF}[B{0000F6}G{542900}L{FFFFFF}] - Login", _string, "Login", "Sair");
  923.         }
  924.     }
  925.    
  926.     if(dialogid == 9832)
  927.     {
  928.         if(response)
  929.         {
  930.             if(listitem == 0)
  931.             {
  932.                 GetPlayerName(playerid, nome, sizeof(nome));
  933.                 format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  934.                 if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,ERRO,"[ HOSPITAL ] Você precisa de R$ 1200 para comprar um convênio médico!");
  935.                 INI_Open(arquivo);
  936.                 INI_WriteInt("Convenio", 1);
  937.                 INI_Close();
  938.                 PlayerInfo[playerid][Convenio] = 1;
  939.                 SendClientMessage(playerid,C_MSG,"[ CONVENIO ] Parabéns você adquiriu um convênio médico com sucesso!");
  940.                 SendClientMessage(playerid,C_MSG,"[ CONVENIO ] Agora você pagará apenas: R$ 200 quando ficar inconsciente!");
  941.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  942.                 GivePlayerMoney(playerid, -1200);
  943.             }
  944.             if(listitem == 1)
  945.             {
  946.                 GetPlayerName(playerid, nome, sizeof(nome));
  947.                 format(arquivo, sizeof(arquivo), ContasPlayers, nome);
  948.                 if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,ERRO,"[ HOSPITAL ] Você precisa de R$ 5000 para comprar um plano de saúde!");
  949.                 INI_Open(arquivo);
  950.                 INI_WriteInt("Plano", 1);
  951.                 INI_Close();
  952.                 PlayerInfo[playerid][Plano] = 1;
  953.                 SendClientMessage(playerid,C_MSG,"[ PLANO DE SAÚDE ] Parabéns você adquiriu um plano de saúde com sucesso!");
  954.                 SendClientMessage(playerid,C_MSG,"[ PLANO DE SAÚDE ] Agora você não irá mais perder seu dinheiro quando ficar inconsciente!");
  955.                 PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  956.                 GivePlayerMoney(playerid, -5000);
  957.             }
  958.             if(listitem == 2)
  959.             {
  960.                 if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid,ERRO,"[ HOSPITAL ] Você precisa de R$ 500 encher sua vida!");
  961.                 SetPlayerHealth(playerid, 100.0);
  962.                 SendClientMessage(playerid,C_MSG,"[ VIDA ] Sua vida foi completada com sucesso!");
  963.                 GivePlayerMoney(playerid, -500);
  964.             }
  965.         }
  966.         else
  967.         {
  968.         }
  969.     }
  970.     return 1;
  971. }
  972.  
  973. public OnPlayerEnterCheckpoint(playerid)
  974. {
  975.     new checknome;
  976.     checknome = CPS_GetPlayerCheckpoint(playerid);
  977.     if(checknome == banco1 || checknome == banco2 || checknome == banco3 || checknome == banco4 || checknome == banco5 || checknome == banco6)
  978.     {
  979.         SendClientMessage(playerid, 0x542900AA, "********************** Caixa **********************");
  980.         SendClientMessage(playerid, -1, "- Digite:  ");
  981.         SendClientMessage(playerid, -1, "- /criarconta - para criar uma conta");
  982.         SendClientMessage(playerid, -1, "- /depositar - para depositar");
  983.         SendClientMessage(playerid, -1, "- /sacar - para sacar");
  984.         SendClientMessage(playerid, -1, "- /saldo para - ver seu saldo");
  985.         SendClientMessage(playerid, 0x542900AA, "********************** Caixa **********************");
  986.         return 1;
  987.     }
  988.     return 1;
  989. }
  990.  
  991. public OnPlayerPickUpPickup(playerid, pickupid)
  992. {
  993.     if(pickupid == hospital || pickupid == hospitalls || pickupid == hospitalfc || pickupid == hospitalsf || pickupid == hospitallv)
  994.     {
  995.         ShowPlayerDialog(playerid,9832,DIALOG_STYLE_LIST,"Menu Hospital","Convênio Médico( R$ 1200 )\nPlano de Saúde( R$ 5000 )\nEncher Vida( R$ 500 )","Selecionar","Sair");
  996.         return true;
  997.     }
  998.     if(pickupid == entradapref)
  999.     {
  1000.         SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
  1001.         SetPlayerInterior(playerid,3);
  1002.         return true;
  1003.     }
  1004.     if(pickupid == pickempregos)
  1005.     {
  1006.         ShowMenuForPlayer(Profissoes, playerid);
  1007.         TogglePlayerControllable(playerid, false);
  1008.         return true;
  1009.     }
  1010.     if(pickupid == saidapref)
  1011.     {
  1012.         SetPlayerPos(playerid, 1480.3783,-1765.1796,18.7958);
  1013.         SetPlayerInterior(playerid,0);
  1014.         return true;
  1015.     }
  1016.     return true;
  1017. }
  1018.  
  1019. public OnPlayerStateChange(playerid, newstate, oldstate)
  1020. {
  1021.     if(newstate == PLAYER_STATE_DRIVER)
  1022.     {
  1023.         for(new i; i < 200; i++)
  1024.         {
  1025.             new vehicleid = GetPlayerVehicleID(playerid);
  1026.             if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510)
  1027.             {
  1028.                 new string[64];
  1029.                 format(string, sizeof(string), " ", GetVehicleModelName(GetVehicleModel(GetPlayerVehicleID(playerid))));
  1030.                 TextDrawSetString(ModeloBike[playerid], string);
  1031.                 TextDrawShowForPlayer(playerid, ModeloBike[playerid]);
  1032.                 format(string, sizeof(string), " ", GetPlayerSpeedVelocity(playerid));
  1033.                 TextDrawSetString(VeloBike[playerid], string);
  1034.                 TextDrawShowForPlayer(playerid, VeloBike[playerid]);
  1035.             }
  1036.             else
  1037.             {
  1038.                 new string[64];
  1039.                 format(string, sizeof(string), "~h~~r~~h~%s", GetVehicleModelName(GetVehicleModel(GetPlayerVehicleID(playerid))));
  1040.                 TextDrawSetString(Modelo[playerid], string);
  1041.                 TextDrawShowForPlayer(playerid, Modelo[playerid]);
  1042.                 format(string, sizeof(string), "~h~~h~~b~~h~~h~%d ~h~~y~~h~Litros", Gasolina[playerid]);
  1043.                 TextDrawSetString(Posto[playerid], string);
  1044.                 TextDrawShowForPlayer(playerid, Posto[playerid]);
  1045.                 format(string, sizeof(string), "~h~~h~~b~~h~~h~%d ~h~~y~~h~Km/h",GetPlayerSpeed(playerid));
  1046.                 TextDrawSetString(Velocidade[playerid], string);
  1047.                 TextDrawShowForPlayer(playerid, Velocidade[playerid]);
  1048.             }
  1049.         }
  1050.     }
  1051.     if(newstate == PLAYER_STATE_ONFOOT)
  1052.     {
  1053.         TextDrawHideForPlayer(playerid, Modelo[playerid]);
  1054.         TextDrawHideForPlayer(playerid, Posto[playerid]);
  1055.         TextDrawHideForPlayer(playerid, Velocidade[playerid]);
  1056.         TextDrawHideForPlayer(playerid, Velocimetro[playerid]);
  1057.         TextDrawHideForPlayer(playerid, VeloBike[playerid]);
  1058.         TextDrawHideForPlayer(playerid, ModeloBike[playerid]);
  1059.     }
  1060.     return 1;
  1061. }
  1062. public OnPlayerSelectedMenuRow(playerid, row)
  1063. {
  1064.     new Menu:CurrentMenu = GetPlayerMenu(playerid);
  1065.     if(CurrentMenu == Profissoes)
  1066.   {
  1067.     switch(row)
  1068.     {
  1069.        case 0:
  1070.        {
  1071.           HideMenuForPlayer(Profissoes,playerid);
  1072.           ShowMenuForPlayer(Honestas,playerid);
  1073.        }
  1074.        case 1:
  1075.        {
  1076.             HideMenuForPlayer(Profissoes,playerid);
  1077.             ShowMenuForPlayer(Mafia,playerid);
  1078.        }
  1079.        case 2:
  1080.        {
  1081.             HideMenuForPlayer(Profissoes,playerid);
  1082.             ShowMenuForPlayer(Policial,playerid);
  1083.        }
  1084.        case 3:
  1085.        {
  1086.             HideMenuForPlayer(Profissoes,playerid);
  1087.             ShowMenuForPlayer(Governo,playerid);
  1088.        }
  1089.        case 4:
  1090.        {
  1091.        }
  1092.      }
  1093.    }
  1094.     if(CurrentMenu == Honestas)
  1095.    {
  1096.     switch(row)
  1097.     {
  1098.         case 0:
  1099.         {
  1100.             GetPlayerScore(playerid);
  1101.             if(GetPlayerScore(playerid) >= 0)
  1102.             {
  1103.                 PlayerProf[playerid] = Desempregado;
  1104.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Desempregado!");
  1105.                 EntrarProf(playerid);
  1106.             }
  1107.             }
  1108.         case 1:
  1109.         {
  1110.             if(GetPlayerScore(playerid) >= 0)
  1111.             {
  1112.                 PlayerProf[playerid] = Taxista;
  1113.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Taxista!");
  1114.                 TogglePlayerControllable(playerid, true);
  1115.                 EntrarProf(playerid);
  1116.             }
  1117.             }
  1118.         case 2:
  1119.         {
  1120.             if(GetPlayerScore(playerid) >= 6)
  1121.             {
  1122.                 PlayerProf[playerid] = MotoTaxi;
  1123.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Moto Taxi!");
  1124.                 TogglePlayerControllable(playerid, true);
  1125.                 EntrarProf(playerid);
  1126.  
  1127.             }
  1128.             else
  1129.             {
  1130.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1131.                 TogglePlayerControllable(playerid, true);
  1132.             }
  1133.             }
  1134.         case 3:
  1135.         {
  1136.             if(GetPlayerScore(playerid) >= 7)
  1137.             {
  1138.                 PlayerProf[playerid] = MOnibus;
  1139.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Motorista de Onibus");
  1140.                 TogglePlayerControllable(playerid, true);
  1141.                 EntrarProf(playerid);
  1142.             }
  1143.             else
  1144.             {
  1145.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1146.                 TogglePlayerControllable(playerid, true);
  1147.             }
  1148.             }
  1149.         case 4:
  1150.         {
  1151.             if(GetPlayerScore(playerid) >= 15)
  1152.             {
  1153.                 PlayerProf[playerid] = Medico;
  1154.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Médico!");
  1155.                 TogglePlayerControllable(playerid, true);
  1156.                 EntrarProf(playerid);
  1157.             }
  1158.             else
  1159.             {
  1160.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1161.                 TogglePlayerControllable(playerid, true);
  1162.             }
  1163.             }
  1164.         case 5:
  1165.         {
  1166.             if(GetPlayerScore(playerid) >= 25)
  1167.             {
  1168.                 PlayerProf[playerid] = Advogado;
  1169.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Advogado!");
  1170.                 TogglePlayerControllable(playerid, true);
  1171.                 EntrarProf(playerid);
  1172.             }
  1173.             else
  1174.             {
  1175.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1176.                 TogglePlayerControllable(playerid, true);
  1177.             }
  1178.             }
  1179.         case 6:
  1180.         {
  1181.             if(GetPlayerScore(playerid) >=10)
  1182.             {
  1183.                 PlayerProf[playerid] = MParticular;
  1184.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Motorista Particular!");
  1185.                 TogglePlayerControllable(playerid, true);
  1186.                 EntrarProf(playerid);
  1187.             }
  1188.             else
  1189.             {
  1190.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1191.                 TogglePlayerControllable(playerid, true);
  1192.             }
  1193.             }
  1194.         }
  1195.     }
  1196.  
  1197.     if(CurrentMenu == Mafia)
  1198.     {
  1199.         switch(row)
  1200.         {
  1201.             case 0:
  1202.             {
  1203.                 GetPlayerScore(playerid);
  1204.                 if(GetPlayerScore(playerid) >= 10)
  1205.                 {
  1206.                     PlayerProf[playerid] = TArmas;
  1207.                     SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Traficante de Armas!");
  1208.                     TogglePlayerControllable(playerid, true);
  1209.                     EntrarProf(playerid);
  1210.                 }
  1211.                 else
  1212.                 {
  1213.                     SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1214.                     TogglePlayerControllable(playerid, true);
  1215.                 }
  1216.                 }
  1217.             case 1:
  1218.             {
  1219.                 if(GetPlayerScore(playerid) >= 15)
  1220.                 {
  1221.                     PlayerProf[playerid] = TDrogas;
  1222.                     SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Traficante de Drogas!");
  1223.                     TogglePlayerControllable(playerid, true);
  1224.                     EntrarProf(playerid);
  1225.                 }
  1226.                 else
  1227.                 {
  1228.                     SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1229.                     TogglePlayerControllable(playerid, true);
  1230.                 }
  1231.                 }
  1232.             case 2:
  1233.             {
  1234.                 if(GetPlayerScore(playerid) >= 25)
  1235.                 {
  1236.                     PlayerProf[playerid] = Chefao;
  1237.                     SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Chefe do Morro!");
  1238.                     TogglePlayerControllable(playerid, true);
  1239.                     EntrarProf(playerid);
  1240.                 }
  1241.                 else
  1242.                 {
  1243.                     SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1244.                     TogglePlayerControllable(playerid, true);
  1245.                 }
  1246.                 }
  1247.             case 3:
  1248.             {
  1249.                 if(GetPlayerScore(playerid) >= 3)
  1250.                 {
  1251.                     PlayerProf[playerid] = Prostituta;
  1252.                     SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Prostituta!");
  1253.                     TogglePlayerControllable(playerid, true);
  1254.                     EntrarProf(playerid);
  1255.                 }
  1256.                 else
  1257.                 {
  1258.                     SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1259.                     TogglePlayerControllable(playerid, true);
  1260.                 }
  1261.                 }
  1262.             case 4:
  1263.             {
  1264.                 if(GetPlayerScore(playerid) >= 100)
  1265.                 {
  1266.                     PlayerProf[playerid] = Assassino;
  1267.                     SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Assassino!");
  1268.                     TogglePlayerControllable(playerid, true);
  1269.                     EntrarProf(playerid);
  1270.                 }
  1271.                 else
  1272.                 {
  1273.                     SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1274.                     TogglePlayerControllable(playerid, true);
  1275.                 }
  1276.                 }
  1277.             case 5:
  1278.             {
  1279.                 TogglePlayerControllable(playerid, true);
  1280.             }
  1281.         }
  1282.     }
  1283.     if(CurrentMenu == Policial)
  1284.    {
  1285.     switch(row)
  1286.     {
  1287.         case 0:
  1288.         {
  1289.             GetPlayerScore(playerid);
  1290.             if(GetPlayerScore(playerid) >= 65)
  1291.             {
  1292.                 PlayerProf[playerid] = PMilitar;
  1293.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Policia Militar!");
  1294.                 EntrarProf(playerid);
  1295.                 TogglePlayerControllable(playerid, true);
  1296.             }
  1297.             else
  1298.             {
  1299.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1300.                 TogglePlayerControllable(playerid, true);
  1301.             }
  1302.             }
  1303.         case 1:
  1304.         {
  1305.             if(GetPlayerScore(playerid) >= 70)
  1306.             {
  1307.                 PlayerProf[playerid] = PFlorestal;
  1308.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Policia Florestal!");
  1309.                 EntrarProf(playerid);
  1310.                 TogglePlayerControllable(playerid, true);
  1311.             }
  1312.             else
  1313.             {
  1314.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1315.                 TogglePlayerControllable(playerid, true);
  1316.             }
  1317.             }
  1318.         case 2:
  1319.         {
  1320.             if(GetPlayerScore(playerid) >= 100)
  1321.             {
  1322.                 PlayerProf[playerid] = PFederal;
  1323.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Policia Federal!");
  1324.                 EntrarProf(playerid);
  1325.                 TogglePlayerControllable(playerid, true);
  1326.             }
  1327.             else
  1328.             {
  1329.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1330.                 TogglePlayerControllable(playerid, true);
  1331.             }
  1332.             }
  1333.         case 3:
  1334.         {
  1335.             if(GetPlayerScore(playerid) >= 120)
  1336.             {
  1337.                 PlayerProf[playerid] = CIA;
  1338.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: CIA!");
  1339.                 EntrarProf(playerid);
  1340.                 TogglePlayerControllable(playerid, true);
  1341.             }
  1342.             else
  1343.             {
  1344.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1345.                 TogglePlayerControllable(playerid, true);
  1346.             }
  1347.             }
  1348.         case 4:
  1349.         {
  1350.             if(GetPlayerScore(playerid) >= 150)
  1351.             {
  1352.                 PlayerProf[playerid] = FBI;
  1353.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: FBI!");
  1354.                 EntrarProf(playerid);
  1355.                 TogglePlayerControllable(playerid, true);
  1356.             }
  1357.             else
  1358.             {
  1359.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1360.                 TogglePlayerControllable(playerid, true);
  1361.             }
  1362.             }
  1363.         case 5:
  1364.         {
  1365.             if(GetPlayerScore(playerid) >= 240)
  1366.             {
  1367.                 PlayerProf[playerid] = InterPol;
  1368.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: InterPol!");
  1369.                 EntrarProf(playerid);
  1370.                 TogglePlayerControllable(playerid, true);
  1371.             }
  1372.             else
  1373.             {
  1374.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1375.                 TogglePlayerControllable(playerid, true);
  1376.             }
  1377.             }
  1378.         case 6:
  1379.         {
  1380.             if(GetPlayerScore(playerid) >= 300)
  1381.             {
  1382.                 PlayerProf[playerid] = ROTAM;
  1383.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: ROTAM!");
  1384.                 EntrarProf(playerid);
  1385.                 TogglePlayerControllable(playerid, true);
  1386.             }
  1387.             else
  1388.             {
  1389.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1390.                 TogglePlayerControllable(playerid, true);
  1391.             }
  1392.             }
  1393.         case 7:
  1394.         {
  1395.             TogglePlayerControllable(playerid, true);
  1396.         }
  1397.     }
  1398. }
  1399.     if(CurrentMenu == Governo)
  1400.    {
  1401.     switch(row)
  1402.     {
  1403.         case 0:
  1404.         {
  1405.             GetPlayerScore(playerid);
  1406.             if(GetPlayerScore(playerid) >= 270)
  1407.             {
  1408.                 PlayerProf[playerid] = Governador;
  1409.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Governador!");
  1410.                 TogglePlayerControllable(playerid, true);
  1411.                 EntrarProf(playerid);
  1412.             }
  1413.             else
  1414.             {
  1415.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1416.                 TogglePlayerControllable(playerid, true);
  1417.             }
  1418.             }
  1419.         case 1:
  1420.         {
  1421.             if(GetPlayerScore(playerid) >= 500)
  1422.             {
  1423.                 PlayerProf[playerid] = Prefeito;
  1424.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Prefeito!");
  1425.                 TogglePlayerControllable(playerid, true);
  1426.                 EntrarProf(playerid);
  1427.             }
  1428.             else
  1429.             {
  1430.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1431.                 TogglePlayerControllable(playerid, true);
  1432.             }
  1433.             }
  1434.         case 2:
  1435.         {
  1436.             if(GetPlayerScore(playerid) >= 1000)
  1437.             {
  1438.                 PlayerProf[playerid] = Presidente;
  1439.                 SendClientMessage(playerid,LARANJA,"Parabéns, você trocou de profissão, sua nova profissão é: Presidente!");
  1440.                 TogglePlayerControllable(playerid, true);
  1441.                 EntrarProf(playerid);
  1442.             }
  1443.             else
  1444.             {
  1445.                 SendClientMessage(playerid,ERRO,"[ ERRO ] Você não tem level suficiente para pegar essa profissão!");
  1446.                 TogglePlayerControllable(playerid, true);
  1447.             }
  1448.             }
  1449.         case 3:
  1450.         {
  1451.             TogglePlayerControllable(playerid, true);
  1452.         }
  1453.     }
  1454. }
  1455. }
  1456.  
  1457. stock INI_Create(filename[])
  1458. {
  1459.     if(INI_Exist(filename)) return printf("Erro ao criar o arquivo '%s'. O arquivo já existe.");
  1460.  
  1461.     new File:MeuArquivo;
  1462.     MeuArquivo = fopen(filename, io_write);
  1463.     fclose(MeuArquivo);
  1464.     return 0x1;
  1465. }
  1466.  
  1467. public OnPlayerExitVehicle(playerid, vehicleid)
  1468. {
  1469.     TextDrawHideForPlayer(playerid, Velocimetro[playerid]);
  1470.     TextDrawHideForPlayer(playerid, Modelo[playerid]);
  1471.     TextDrawHideForPlayer(playerid, ModeloBike[playerid]);
  1472.     TextDrawHideForPlayer(playerid, VeloBike[playerid]);
  1473.     return 1;
  1474. }
  1475.  
  1476. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  1477. {
  1478.     if(IsPlayerConnected(playerid))
  1479.     {
  1480.         new Float:oldposx, Float:oldposy, Float:oldposz;
  1481.         new Float:tempposx, Float:tempposy, Float:tempposz;
  1482.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1483.         tempposx = (oldposx -x);
  1484.         tempposy = (oldposy -y);
  1485.         tempposz = (oldposz -z);
  1486.         //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  1487.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1488.         {
  1489.             return 1;
  1490.         }
  1491.     }
  1492.     return 0;
  1493. }
  1494.  
  1495. public IsPlayerInBanco(playerid)
  1496. {
  1497.     if(PlayerToPoint(2,playerid,1507.0203,-1754.5189,13.5469) || PlayerToPoint(2,playerid,1225.2505,-1812.7090,16.5938) || PlayerToPoint(2,playerid,402.9662,-1525.2988,32.2734) || PlayerToPoint(2,playerid,-88.0959,1228.6991,19.7422) || PlayerToPoint(2,playerid,2096.4116,1450.8185,10.8203) || PlayerToPoint(2,playerid,2193.5500,1987.7876,12.2969))
  1498.     {
  1499.         return true;
  1500.     }
  1501.     return false;
  1502. }
  1503.  
  1504. public EntrarProf(playerid)
  1505. {
  1506.     if(PlayerProf[playerid] == Desempregado)
  1507.     {
  1508.         SendClientMessage(playerid,C_DESEMPREGADO,"----------------- Desempregado -----------------");
  1509.         SendClientMessage(playerid,C_DESEMPREGADO,"- Para ver os comandos da sua profissão digite:");
  1510.         SendClientMessage(playerid,C_DESEMPREGADO,"- /profissao");
  1511.         SendClientMessage(playerid,C_DESEMPREGADO,"- Seu salário vai ser de: {00A700}R$ 250");
  1512.         SendClientMessage(playerid,C_DESEMPREGADO,"----------------- Desempregado -----------------");
  1513.         SetPlayerColor(playerid, C_DESEMPREGADO);
  1514.         return true;
  1515.     }
  1516.     else if(PlayerProf[playerid] == Taxista)
  1517.     {
  1518.         SendClientMessage(playerid,C_TAXISTA,"------------------------ Taxista ------------------------");
  1519.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1520.         SendClientMessage(playerid,-1,"- /profissao");
  1521.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 500");
  1522.         SendClientMessage(playerid,C_TAXISTA,"------------------------ Taxista ------------------------");
  1523.         SetPlayerColor(playerid, C_TAXISTA);
  1524.         return true;
  1525.     }
  1526.     else if(PlayerProf[playerid] == MotoTaxi)
  1527.     {
  1528.         SendClientMessage(playerid,C_MOTOTAXI,"------------------------ Moto Taxi ------------------------");
  1529.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1530.         SendClientMessage(playerid,-1,"- /profissao");
  1531.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 600");
  1532.         SendClientMessage(playerid,C_MOTOTAXI,"------------------------ Moto Taxi ------------------------");
  1533.         SetPlayerColor(playerid, C_MOTOTAXI);
  1534.         return true;
  1535.     }
  1536.     else if(PlayerProf[playerid] == MOnibus)
  1537.     {
  1538.         SendClientMessage(playerid,C_MONIBUS,"------------------------ Motorista de Onibus ------------------------");
  1539.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1540.         SendClientMessage(playerid,-1,"- /profissao");
  1541.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 1000");
  1542.         SendClientMessage(playerid,C_MONIBUS,"------------------------ Motorista de Onibus ------------------------");
  1543.         SetPlayerColor(playerid, C_MONIBUS);
  1544.         return true;
  1545.     }
  1546.     else if(PlayerProf[playerid] == Medico)
  1547.     {
  1548.         SendClientMessage(playerid,C_MEDICO,"------------------------ Médico ------------------------");
  1549.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1550.         SendClientMessage(playerid,-1,"- /profissao");
  1551.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 1500");
  1552.         SendClientMessage(playerid,C_MEDICO,"------------------------ Médico ------------------------");
  1553.         SetPlayerColor(playerid, C_MEDICO);
  1554.         return true;
  1555.     }
  1556.     else if(PlayerProf[playerid] == Advogado)
  1557.     {
  1558.         SendClientMessage(playerid,C_ADVOGADO,"------------------------ Advogado ------------------------");
  1559.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1560.         SendClientMessage(playerid,-1,"- /profissao");
  1561.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 1600");
  1562.         SendClientMessage(playerid,C_ADVOGADO,"------------------------ Advogado ------------------------");
  1563.         SetPlayerColor(playerid, C_ADVOGADO);
  1564.         return true;
  1565.     }
  1566.     else if(PlayerProf[playerid] == MParticular)
  1567.     {
  1568.         SendClientMessage(playerid,C_MPARTICULAR,"------------------------ Motorista Particular ------------------------");
  1569.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1570.         SendClientMessage(playerid,-1,"- /profissao");
  1571.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 700");
  1572.         SendClientMessage(playerid,C_MPARTICULAR,"------------------------ Motorista Particular ------------------------");
  1573.         SetPlayerColor(playerid, C_MPARTICULAR);
  1574.         return true;
  1575.     }
  1576.     else if(PlayerProf[playerid] == TArmas)
  1577.     {
  1578.         SendClientMessage(playerid,C_TARMAS,"------------------------ Traficante de Armas ------------------------");
  1579.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1580.         SendClientMessage(playerid,-1,"- /profissao");
  1581.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 800");
  1582.         SendClientMessage(playerid,C_TARMAS,"------------------------ Traficante de Armas ------------------------");
  1583.         SetPlayerColor(playerid, C_TARMAS);
  1584.         return true;
  1585.     }
  1586.     else if(PlayerProf[playerid] == TDrogas)
  1587.     {
  1588.         SendClientMessage(playerid,C_TDROGAS,"------------------------ Traficante de Drogas ------------------------");
  1589.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1590.         SendClientMessage(playerid,-1,"- /profissao");
  1591.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 1000");
  1592.         SendClientMessage(playerid,C_TDROGAS,"------------------------ Traficante de Drogas ------------------------");
  1593.         SetPlayerColor(playerid, C_TDROGAS);
  1594.         return true;
  1595.     }
  1596.     else if(PlayerProf[playerid] == Chefao)
  1597.     {
  1598.         SendClientMessage(playerid,C_CHEFAO,"------------------------ Advogado ------------------------");
  1599.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1600.         SendClientMessage(playerid,-1,"- /profissao");
  1601.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 2500");
  1602.         SendClientMessage(playerid,C_CHEFAO,"------------------------ Advogado ------------------------");
  1603.         SetPlayerColor(playerid, C_CHEFAO);
  1604.         return true;
  1605.     }
  1606.     else if(PlayerProf[playerid] == Prostituta)
  1607.     {
  1608.         SendClientMessage(playerid,C_PROSTITUTA,"------------------------ Prostituta ------------------------");
  1609.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1610.         SendClientMessage(playerid,-1,"- /profissao");
  1611.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 400");
  1612.         SendClientMessage(playerid,C_PROSTITUTA,"------------------------ Prostituta ------------------------");
  1613.         SetPlayerColor(playerid, C_PROSTITUTA);
  1614.         return true;
  1615.     }
  1616.     else if(PlayerProf[playerid] == Assassino)
  1617.     {
  1618.         SendClientMessage(playerid,C_ASSASSINO,"------------------------ Assassino ------------------------");
  1619.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1620.         SendClientMessage(playerid,-1,"- /profissao");
  1621.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 2000");
  1622.         SendClientMessage(playerid,C_ASSASSINO,"------------------------ Assassino ------------------------");
  1623.         SetPlayerColor(playerid, C_ASSASSINO);
  1624.         return true;
  1625.     }
  1626.     else if(PlayerProf[playerid] == PMilitar)
  1627.     {
  1628.         SendClientMessage(playerid,C_PMILITAR,"------------------------ Policia Militar ------------------------");
  1629.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1630.         SendClientMessage(playerid,-1,"- /profissao");
  1631.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 1000");
  1632.         SendClientMessage(playerid,C_PMILITAR,"------------------------ Policia Militar ------------------------");
  1633.         SetPlayerColor(playerid, C_PMILITAR);
  1634.         return true;
  1635.     }
  1636.     else if(PlayerProf[playerid] == PFlorestal)
  1637.     {
  1638.         SendClientMessage(playerid,C_PFLORESTAL,"------------------------ Policia Florestal ------------------------");
  1639.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1640.         SendClientMessage(playerid,-1,"- /profissao");
  1641.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 1400");
  1642.         SendClientMessage(playerid,C_PFLORESTAL,"------------------------ Policia Florestal ------------------------");
  1643.         SetPlayerColor(playerid, C_PFLORESTAL);
  1644.         return true;
  1645.     }
  1646.     else if(PlayerProf[playerid] == PFederal)
  1647.     {
  1648.         SendClientMessage(playerid,C_PFEDERAL,"------------------------ Policia Federal ------------------------");
  1649.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1650.         SendClientMessage(playerid,-1,"- /profissao");
  1651.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 2000");
  1652.         SendClientMessage(playerid,C_PFEDERAL,"------------------------ Policia Federal ------------------------");
  1653.         SetPlayerColor(playerid, C_PFEDERAL);
  1654.         return true;
  1655.     }
  1656.     else if(PlayerProf[playerid] == CIA)
  1657.     {
  1658.         SendClientMessage(playerid,C_CIA,"------------------------ CIA ------------------------");
  1659.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1660.         SendClientMessage(playerid,-1,"- /profissao");
  1661.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 2400");
  1662.         SendClientMessage(playerid,C_CIA,"------------------------ CIA ------------------------");
  1663.         SetPlayerColor(playerid, C_CIA);
  1664.         return true;
  1665.     }
  1666.     else if(PlayerProf[playerid] == FBI)
  1667.     {
  1668.         SendClientMessage(playerid,C_FBI,"------------------------ FBI ------------------------");
  1669.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1670.         SendClientMessage(playerid,-1,"- /profissao");
  1671.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 2600");
  1672.         SendClientMessage(playerid,C_FBI,"------------------------ FBI ------------------------");
  1673.         SetPlayerColor(playerid, C_FBI);
  1674.         return true;
  1675.     }
  1676.     else if(PlayerProf[playerid] == InterPol)
  1677.     {
  1678.         SendClientMessage(playerid,C_INTERPOL,"------------------------ InterPol ------------------------");
  1679.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1680.         SendClientMessage(playerid,-1,"- /profissao");
  1681.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 3500");
  1682.         SendClientMessage(playerid,C_INTERPOL,"------------------------ InterPol ------------------------");
  1683.         SetPlayerColor(playerid, C_INTERPOL);
  1684.         return true;
  1685.     }
  1686.     else if(PlayerProf[playerid] == ROTAM)
  1687.     {
  1688.         SendClientMessage(playerid,C_ROTAM,"------------------------ ROTAM ------------------------");
  1689.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1690.         SendClientMessage(playerid,-1,"- /profissao");
  1691.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 4200");
  1692.         SendClientMessage(playerid,C_ROTAM,"------------------------ ROTAM ------------------------");
  1693.         SetPlayerColor(playerid, C_ROTAM);
  1694.         return true;
  1695.     }
  1696.     else if(PlayerProf[playerid] == Governador)
  1697.     {
  1698.         SendClientMessage(playerid,C_GOVERNADOR,"------------------------ Governador ------------------------");
  1699.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1700.         SendClientMessage(playerid,-1,"- /profissao");
  1701.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 3500");
  1702.         SendClientMessage(playerid,C_GOVERNADOR,"------------------------ Governador ------------------------");
  1703.         SetPlayerColor(playerid, C_GOVERNADOR);
  1704.         return true;
  1705.     }
  1706.     else if(PlayerProf[playerid] == Prefeito)
  1707.     {
  1708.         SendClientMessage(playerid,C_PREFEITO,"------------------------ Prefeito ------------------------");
  1709.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1710.         SendClientMessage(playerid,-1,"- /profissao");
  1711.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 3600");
  1712.         SendClientMessage(playerid,C_PREFEITO,"------------------------ Prefeito ------------------------");
  1713.         SetPlayerColor(playerid, C_PREFEITO);
  1714.         return true;
  1715.     }
  1716.     else if(PlayerProf[playerid] == Presidente)
  1717.     {
  1718.         SendClientMessage(playerid,C_PRESIDENTE,"------------------------ Presidente ------------------------");
  1719.         SendClientMessage(playerid,-1,"- Para ver os comandos da sua profissão digite:");
  1720.         SendClientMessage(playerid,-1,"- /profissao");
  1721.         SendClientMessage(playerid,-1,"- Seu salário vai ser de: {00A700}R$ 5000");
  1722.         SendClientMessage(playerid,C_PRESIDENTE,"------------------------ Presidente ------------------------");
  1723.         SetPlayerColor(playerid, C_PRESIDENTE);
  1724.         return true;
  1725.     }
  1726.     return false;
  1727. }
  1728.  
  1729. public Salario()
  1730. {
  1731.     for(new i = 0; i < MAX_PLAYERS; i++)
  1732.     {
  1733.         if(IsPlayerConnected(i))
  1734.         {
  1735.             SendClientMessage(i,C_MSG,"-------------------- SALÁRIO --------------------");
  1736.             if(PlayerInfo[i][TemConta] < 1) return SendClientMessage(i,C_MSG,"- Você não tem uma conta bancária, e por isso não irá receber o salário!");
  1737.             if(PlayerProf[i] == Desempregado)
  1738.             {
  1739.                 SendClientMessage(i,C_MSG,"- Você é um Desempregado!");
  1740.                 SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 250{ABC6E3} em sua conta bancária!");
  1741.                 PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 250;
  1742.             }
  1743.             else if(PlayerProf[i] == Taxista)
  1744.             {
  1745.             SendClientMessage(i,C_MSG,"- Sua profissão é: Taxista! ");
  1746.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 500{ABC6E3} em sua conta bancária!");
  1747.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 500;
  1748.             }
  1749.             else if(PlayerProf[i] == MotoTaxi)
  1750.             {
  1751.             SendClientMessage(i,C_MSG,"- Sua profissão é: Moto Taxista! ");
  1752.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 600{ABC6E3} em sua conta bancária!");
  1753.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 600;
  1754.             }
  1755.             else if(PlayerProf[i] == MOnibus)
  1756.             {
  1757.             SendClientMessage(i,C_MSG,"- Sua profissão é: Motorista de Onibus! ");
  1758.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 1000{ABC6E3} em sua conta bancária!");
  1759.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 1000;
  1760.             }
  1761.             else if(PlayerProf[i] == Medico)
  1762.             {
  1763.             SendClientMessage(i,C_MSG,"- Sua profissão é: Médico! ");
  1764.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 1500{ABC6E3} em sua conta bancária!");
  1765.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 1500;
  1766.             }
  1767.             else if(PlayerProf[i] == Advogado)
  1768.             {
  1769.             SendClientMessage(i,C_MSG,"- Sua profissão é: Advogado! ");
  1770.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 1600{ABC6E3} em sua conta bancária!");
  1771.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 1600;
  1772.             }
  1773.             else if(PlayerProf[i] == MParticular)
  1774.             {
  1775.             SendClientMessage(i,C_MSG,"- Sua profissão é: Motorista Particular! ");
  1776.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 700{ABC6E3} em sua conta bancária!");
  1777.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 700;
  1778.             }
  1779.             else if(PlayerProf[i] == TArmas)
  1780.             {
  1781.             SendClientMessage(i,C_MSG,"- Sua profissão é: Traficante de Armas! ");
  1782.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 800{ABC6E3} em sua conta bancária!");
  1783.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 800;
  1784.             }
  1785.             else if(PlayerProf[i] == TDrogas)
  1786.             {
  1787.             SendClientMessage(i,C_MSG,"- Sua profissão é: Traficante de Drogas! ");
  1788.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 1000{ABC6E3} em sua conta bancária!");
  1789.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 1000;
  1790.             }
  1791.             else if(PlayerProf[i] == Chefao)
  1792.             {
  1793.             SendClientMessage(i,C_MSG,"- Sua profissão é: Chefe do Morro! ");
  1794.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 2500{ABC6E3} em sua conta bancária!");
  1795.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 2500;
  1796.             }
  1797.             else if(PlayerProf[i] == Prostituta)
  1798.             {
  1799.             SendClientMessage(i,C_MSG,"- Sua profissão é: Prostituta! ");
  1800.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 400{ABC6E3} em sua conta bancária!");
  1801.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 400;
  1802.             }
  1803.             else if(PlayerProf[i] == Assassino)
  1804.             {
  1805.             SendClientMessage(i,C_MSG,"- Sua profissão é: Assassino! ");
  1806.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 2000{ABC6E3} em sua conta bancária!");
  1807.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 2000;
  1808.             }
  1809.             else if(PlayerProf[i] == PMilitar)
  1810.             {
  1811.             SendClientMessage(i,C_MSG,"- Sua profissão é: Policial Militar! ");
  1812.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 1000{ABC6E3} em sua conta bancária!");
  1813.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 1000;
  1814.             }
  1815.             else if(PlayerProf[i] == PFlorestal)
  1816.             {
  1817.             SendClientMessage(i,C_MSG,"- Sua profissão é: Policial Florestal! ");
  1818.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 1400{ABC6E3} em sua conta bancária!");
  1819.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 1400;
  1820.             }
  1821.             else if(PlayerProf[i] == PFederal)
  1822.             {
  1823.             SendClientMessage(i,C_MSG,"- Sua profissão é: Policial Federal! ");
  1824.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 2000{ABC6E3} em sua conta bancária!");
  1825.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 2000;
  1826.             }
  1827.             else if(PlayerProf[i] == CIA)
  1828.             {
  1829.             SendClientMessage(i,C_MSG,"- Sua profissão é: Agente da CIA! ");
  1830.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 2400{ABC6E3} em sua conta bancária!");
  1831.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 2400;
  1832.             }
  1833.             else if(PlayerProf[i] == FBI)
  1834.             {
  1835.             SendClientMessage(i,C_MSG,"- Sua profissão é: Agente do FBI! ");
  1836.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 2600{ABC6E3} em sua conta bancária!");
  1837.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 2600;
  1838.             }
  1839.             else if(PlayerProf[i] == InterPol)
  1840.             {
  1841.             SendClientMessage(i,C_MSG,"- Sua profissão é: Agente da InterPol! ");
  1842.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 3500{ABC6E3} em sua conta bancária!");
  1843.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 3500;
  1844.             }
  1845.             else if(PlayerProf[i] == ROTAM)
  1846.             {
  1847.             SendClientMessage(i,C_MSG,"- Sua profissão é: ROTAM! ");
  1848.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 4200{ABC6E3} em sua conta bancária!");
  1849.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 4200;
  1850.             }
  1851.             else if(PlayerProf[i] == Governador)
  1852.             {
  1853.             SendClientMessage(i,C_MSG,"- Sua profissão é: Governador de Los Santos! ");
  1854.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 3500{ABC6E3} em sua conta bancária!");
  1855.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 3500;
  1856.             }
  1857.             else if(PlayerProf[i] == Prefeito)
  1858.             {
  1859.             SendClientMessage(i,C_MSG,"- Sua profissão é: Prefeito de Los Santos! ");
  1860.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 3600{ABC6E3} em sua conta bancária!");
  1861.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 3600;
  1862.             }
  1863.             else if(PlayerProf[i] == Presidente)
  1864.             {
  1865.             SendClientMessage(i,C_MSG,"- Sua profissão é: Presidente de San Andreas! ");
  1866.             SendClientMessage(i,C_MSG,"- Foram depositados: {00A700}R$ 5000{ABC6E3} em sua conta bancária!");
  1867.             PlayerInfo[i][Saldo] = PlayerInfo[i][Saldo] + 5000;
  1868.             }
  1869.         }
  1870.     }
  1871.     return 1;
  1872. }
  1873.  
  1874. public GanharExp()
  1875. {
  1876.     new string[200];
  1877.     for(new i=0; i < MAX_PLAYERS; i++)
  1878.     {
  1879.         if(IsPlayerConnected(i))
  1880.         {
  1881.                 if(PlayerInfo[i][Exp] == 5)
  1882.                 {
  1883.                     SetPlayerScore(i,GetPlayerScore(i) + 1);
  1884.                     PlayerInfo[i][Exp] = 0;
  1885.                     format(string, sizeof(string), "(LEVEL) Você acaba de ganhar +1 level, somando um total de %d", PlayerInfo[i][Level]);
  1886.                     SendClientMessage(i, 0x00FF00AA, string);
  1887.                     PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
  1888.                     SalvarDadosPlayer(i);
  1889.                 }
  1890.                 else
  1891.                 {
  1892.                     PlayerInfo[i][Exp] ++;
  1893.                     format(string, sizeof(string), "(EXP) Você acaba de ganhar +1 ponto de experiência (%d/5)", PlayerInfo[i][Exp]);
  1894.                     SendClientMessage(i, 0x00FF00AA, string);
  1895.                     PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
  1896.                     SalvarDadosPlayer(i);
  1897.                 }
  1898.             }
  1899.         }
  1900.     }
  1901.    
  1902. public Speedometer()
  1903. {
  1904.     for(new i=0; i < MAX_PLAYERS; i++)
  1905.     {
  1906.         if(IsPlayerConnected(i))
  1907.         {
  1908.             if(IsPlayerInAnyVehicle(i))
  1909.             {
  1910.                 new vehicleid = GetPlayerVehicleID(i);
  1911.                 if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510)
  1912.                 {
  1913.                     new string[64];
  1914.                     format(string, sizeof(string), " ", GetVehicleModelName(GetVehicleModel(GetPlayerVehicleID(i))));
  1915.                     TextDrawSetString(ModeloBike[i], string);
  1916.                     format(string, sizeof(string), " ", GetPlayerSpeedVelocity(i));
  1917.                     TextDrawSetString(VeloBike[i], string);
  1918.                 }
  1919.                 else
  1920.                 {
  1921.                     new string[64];
  1922.                     format(string, sizeof(string), "~h~~r~~h~%s", GetVehicleModelName(GetVehicleModel(GetPlayerVehicleID(i))));
  1923.                     TextDrawSetString(Modelo[i], string);
  1924.                     format(string, sizeof(string), "~h~~h~~b~~h~~h~%d ~h~~y~~h~Litros", Gasolina[i]);
  1925.                     TextDrawSetString(Posto[i], string);
  1926.                     format(string, sizeof(string), "~h~~h~~b~~h~~h~%d ~h~~y~~h~Km/h", GetPlayerSpeed(i));
  1927.                     TextDrawSetString(Velocidade[i], string);
  1928.                 }
  1929.             }
  1930.         }
  1931.     }
  1932. }
  1933.  
  1934.  public AtualizarCombustivel()
  1935. {
  1936.     for(new i=0; i < MAX_PLAYERS; i++)
  1937.     {
  1938.         if(IsPlayerConnected(i))
  1939.         {
  1940.             if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  1941.             {
  1942.                     new vehicleid = GetPlayerVehicleID(i);
  1943.                     if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510)
  1944.                     {
  1945.                         TogglePlayerControllable(i, true);
  1946.                     }
  1947.                     else
  1948.                     {
  1949.                         if(Gasolina[i] == 0)
  1950.                         {
  1951.                             Gasolina[i] = 0;
  1952.                         }
  1953.                         else
  1954.                         {
  1955.                             Gasolina[i]--;
  1956.                             TogglePlayerControllable(i, true);
  1957.                         }
  1958.                         if(Gasolina[i] == 5 || Gasolina[i] == 4 || Gasolina[i] == 3 || Gasolina[i] == 2 || Gasolina[i] == 1)
  1959.                         {
  1960.                             SendClientMessage(i, -1, "{00FF00}[ ! ]{FFFFFF} Seu combustível está acabando, vá até um posto de gasolina mais próximo e abasteça!");
  1961.                             PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
  1962.                             return 0;
  1963.                         }
  1964.                     }
  1965.                 }
  1966.             }
  1967.         }
  1968.     return 1;
  1969. }
  1970.  
  1971. stock GetPlayerSpeed(playerid)
  1972. {
  1973.     new Float:ST[4];
  1974.     if(IsPlayerInAnyVehicle(playerid))
  1975.     GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
  1976.     else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
  1977.     ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 165.0;
  1978.     return floatround(ST[3]);
  1979. }
  1980.  
  1981. stock GetPlayerSpeedVelocity(playerid)
  1982. {
  1983.     new Float:ST[4];
  1984.     if(IsPlayerInAnyVehicle(playerid))
  1985.     GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
  1986.     else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
  1987.     ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 30.0;
  1988.     return floatround(ST[3]);
  1989. }
  1990.  
  1991. public PlayerPolicial(playerid)
  1992. {
  1993.     if(PlayerProf[playerid] == PMilitar || PlayerProf[playerid] == PFlorestal || PlayerProf[playerid] == PFederal || PlayerProf[playerid] == CIA || PlayerProf[playerid] == FBI || PlayerProf[playerid] == InterPol || PlayerProf[playerid] == ROTAM || PlayerInfo[playerid][Admin] >= 1)
  1994.     {
  1995.             return true;
  1996.     }
  1997.     return false;
  1998. }
  1999.  
  2000. stock NomeDele(playerid)
  2001. {
  2002.     new nomedele[MAX_PLAYER_NAME];
  2003.     GetPlayerName(playerid, nomedele, sizeof(nomedele));
  2004.     return nome;
  2005. }
  2006.  
  2007. public MensagemAdmin(color, string[])
  2008. {
  2009.     for(new i = 0; i < MAX_PLAYERS; i++)
  2010.     {
  2011.         if(IsPlayerConnected(i))
  2012.         {
  2013.             if(PlayerInfo[i][Admin] >= 1)
  2014.             {
  2015.                 SendClientMessage(i, color, string);
  2016.             }
  2017.         }
  2018.     }
  2019. }
  2020.  
  2021. public AtualizarRelogio(playerid)
  2022. {
  2023.     new str[128],
  2024.         hour,
  2025.         minute,
  2026.         second;
  2027.  
  2028.     gettime(hour,minute,second);
  2029.     format(str, sizeof(str), "%d:%d:%d", hour, minute, second);
  2030.     TextDrawSetString(Text:Hora, str);
  2031.     TextDrawShowForPlayer(playerid, Hora);
  2032. }
  2033. //************************************ COMANDOS PLAYER ***************************************************
  2034.  
  2035. CMD:criarconta(playerid, params[])
  2036. {
  2037.     if(!IsPlayerInBanco(playerid)) return SendClientMessage(playerid, ERRO,"Você não está em um banco!");
  2038.     if(PlayerInfo[playerid][TemConta] == 1)
  2039.     {
  2040.         SendClientMessage(playerid, ERRO,"[ INFO ] Você já possui uma conta no banco!");
  2041.         return true;
  2042.     }
  2043.     if(PlayerInfo[playerid][TemConta] == 0)
  2044.     {
  2045.         PlayerInfo[playerid][TemConta] = 1;
  2046.         PlayerInfo[playerid][Saldo] = 1000;
  2047.         SendClientMessage(playerid, LARANJA,"[ INFO ] Parabéns você criou uma conta no banco!");
  2048.         SendClientMessage(playerid, LARANJA,"[ INFO ] Foi depositado R$ 1000 em sua conta!");
  2049.     }
  2050.     return true;
  2051. }
  2052.  
  2053. CMD:saldo(playerid, params[])
  2054. {
  2055.     if(!IsPlayerInBanco(playerid)) return SendClientMessage(playerid, ERRO,"Você não está em um banco!");
  2056.     #pragma unused params
  2057.     if(PlayerInfo[playerid][TemConta] == 0)
  2058.     {
  2059.         SendClientMessage(playerid, ERRO,"[ INFO ] Você não possui uma conta no banco!");
  2060.         return true;
  2061.     }
  2062.     if(PlayerInfo[playerid][TemConta] == 1)
  2063.     {
  2064.     new saldo[128];
  2065.     format(saldo,sizeof(saldo),"Seu saldo atual é de R$ %d",PlayerInfo[playerid][Saldo]);
  2066.     SendClientMessage(playerid, VERDEESCURO, saldo);
  2067.     }
  2068.     else
  2069.     {
  2070.         SendClientMessage(playerid, ERRO,"Você não está em um banco!");
  2071.     }
  2072.     return true;
  2073. }
  2074.  
  2075. CMD:depositar(playerid, params[])
  2076. {
  2077.     new quantia, msg[128];
  2078.     if(!IsPlayerInBanco(playerid)) return SendClientMessage(playerid,ERRO,"Você não está em um banco!");
  2079.     if(PlayerInfo[playerid][TemConta] < 1) return SendClientMessage(playerid, ERRO,"[ INFO ] Você não tem uma conta bancária!");
  2080.     if(sscanf(params,"d",quantia)) return SendClientMessage(playerid,ERRO,"Forma correta: /depositar [quantia]");
  2081.     if(quantia > GetPlayerMoney(playerid)) return SendClientMessage(playerid,ERRO,"[ INFO ] Você não tem dinheiro suficiente!");
  2082.     PlayerInfo[playerid][Saldo] = PlayerInfo[playerid][Saldo] + quantia;
  2083.     GivePlayerMoney(playerid, -quantia);
  2084.     format(msg,sizeof(msg),"Você depositou uma quantia de R$ %d, seu saldo atual é de R$ %d",quantia,PlayerInfo[playerid][Saldo]);
  2085.     SendClientMessage(playerid,VERDEESCURO,msg);
  2086.     return true;
  2087. }
  2088.  
  2089. CMD:sacar(playerid, params[])
  2090. {
  2091.     new quantia, msg[128];
  2092.     if(!IsPlayerInBanco(playerid)) return SendClientMessage(playerid,ERRO,"Você não está em um banco!");
  2093.     if(PlayerInfo[playerid][TemConta] < 1) return SendClientMessage(playerid,ERRO,"[ INFO ] Você não tem uma conta bancária!");
  2094.     if(sscanf(params,"d",quantia)) return SendClientMessage(playerid,ERRO,"Forma correta: /sacar [quantia]");
  2095.     if(quantia > PlayerInfo[playerid][Saldo]) return SendClientMessage(playerid,ERRO,"[ INFO ] Você não tem tudo isso em sua conta bancária!");
  2096.     PlayerInfo[playerid][Saldo] = PlayerInfo[playerid][Saldo] - quantia;
  2097.     GivePlayerMoney(playerid, quantia);
  2098.     format(msg,sizeof(msg),"Você sacou uma quantia de R$ %d, seu saldo atual é de R$ %d",quantia,PlayerInfo[playerid][Saldo]);
  2099.     SendClientMessage(playerid,VERDEESCURO,msg);
  2100.     return true;
  2101. }
  2102.  
  2103.  
  2104. CMD:abastecer(playerid, params[])
  2105. {
  2106.     new gasosa, msg[128], msg2[128];
  2107.     if(IsPlayerInRangeOfPoint(playerid, 15.0, 1943.1350, -1772.8309, 13.3906) || IsPlayerInRangeOfPoint(playerid, 15.0, -90.6033, -1169.5508, 2.4081) || IsPlayerInRangeOfPoint(playerid, 15.0, 1004.3979, -939.7984, 42.1797) ||
  2108.     IsPlayerInRangeOfPoint(playerid, 15.0, 655.7786, -565.0240, 16.3359) || IsPlayerInRangeOfPoint(playerid, 15.0, 70.6720,1219.1165,18.8125) || IsPlayerInRangeOfPoint(playerid, 15.0, 615.2501,1689.6561,6.9922) || IsPlayerInRangeOfPoint(playerid, 15.0, 1327.4906,2677.2476,50.0625) || IsPlayerInRangeOfPoint(playerid, 15.0, 2411.8916,976.2206,45.4195) || IsPlayerInRangeOfPoint(playerid, 15.0, 1675.8489,412.8787,7.1797) || IsPlayerInRangeOfPoint(playerid, 15.0, 2029.4739,156.7938,28.8359)
  2109.     || IsPlayerInRangeOfPoint(playerid, 15.0,-2243.8022,-2560.4854,31.9219) || IsPlayerInRangeOfPoint(playerid, 15.0, -1605.7622,-2714.3906,48.5335) || IsPlayerInRangeOfPoint(playerid, 15.0, 2114.9983,919.1253,10.8203) || IsPlayerInRangeOfPoint(playerid, 15.0, 1382.7802,461.1606,20.0922) || IsPlayerInRangeOfPoint(playerid, 15.0, 2200.6897,1389.1658,10.8203) || IsPlayerInRangeOfPoint(playerid, 15.0, 1596.1820,2198.2715,10.8203) || IsPlayerInRangeOfPoint(playerid, 15.0, 2639.7925,1106.0964,10.8203))
  2110.     {
  2111.         if(sscanf(params,"d",gasosa)) return SendClientMessage(playerid,C_MSG,"Use: /abastecer [Litros]");
  2112.         if(gasosa < 0 || gasosa > 100) return SendClientMessage(playerid,C_MSG,"Quantia Inválida!");
  2113.         new valor = gasosa * 3;
  2114.         if(GetPlayerMoney(playerid) < valor) return SendClientMessage(playerid,C_MSG,"(POSTO) Você não tem dinheiro suficiente!");
  2115.         if(Gasolina[playerid] >= 100) return SendClientMessage(playerid,C_MSG,"(POSTO) Seu tanque já está cheio!");
  2116.         if(gasosa + Gasolina[playerid] > 100) return SendClientMessage(playerid,C_MSG,"(POSTO) Litros máximo: 100, você não pode passar disso!");
  2117.         Gasolina[playerid] = Gasolina[playerid] + gasosa;
  2118.         GivePlayerMoney(playerid, - valor);
  2119.         format(msg,sizeof(msg),"(POSTO) Você abasteceu seu tanque com sucesso!");
  2120.         format(msg2,sizeof(msg2),"(POSTO) Foram colocados: %d litros de gasolina, deu um total de: %d",gasosa,valor);
  2121.         SendClientMessage(playerid,C_MSG,msg);
  2122.         SendClientMessage(playerid,C_MSG,msg2);
  2123.     }
  2124.     else
  2125.     {
  2126.         SendClientMessage(playerid,ERRO,"(ERRO) Você não está em um posto de gasolina!");
  2127.     }
  2128.     return true;
  2129. }
  2130.  
  2131. CMD:ajuda(playerid, params[])
  2132. {
  2133.     #pragma unused params
  2134.     SendClientMessage(playerid,PROCE,"~~~~~~~~~~~~~~~~~~~~~~~~~ Ajuda ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2135.     SendClientMessage(playerid,-1,"- Dúvidas? digite: /admins e chame um!");
  2136.     SendClientMessage(playerid,-1,"- Não sabe os comandos? digite: /comandos");
  2137.     SendClientMessage(playerid,-1,"- Está perdido? chame um taxi, digite /taxi");
  2138.     SendClientMessage(playerid,-1,"- Quer saber quem são os donos do server? digite: /creditos");
  2139.     SendClientMessage(playerid,PROCE,"~~~~~~~~~~~~~~~~~~~~~~~~~ Ajuda ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2140.     return true;
  2141. }
  2142.  
  2143. CMD:creditos(playerid, params[])
  2144. {
  2145.     #pragma unused params
  2146.     SendClientMessage(playerid,PROCE,"~~~~~~~~~~~~~~~~~~~~~~~~~ Créditos ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2147.     SendClientMessage(playerid,-1,"- Fundador: AleeFerreira");
  2148.     SendClientMessage(playerid,-1,"- Scripter: AleeFerreira");
  2149.     SendClientMessage(playerid,-1,"- Mapper: AleeFerreira");
  2150.     SendClientMessage(playerid,-1,"- Sub-donos: MatheusMorais e Wellington");
  2151.     SendClientMessage(playerid,-1,"- Leia as regras do servidor em nosso fórum: /forum!");
  2152.     SendClientMessage(playerid,PROCE,"~~~~~~~~~~~~~~~~~~~~~~~~~ Créditos ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2153.     return true;
  2154. }
  2155.  
  2156. CMD:forum(playerid, params[])
  2157. {
  2158.     #pragma unused params
  2159.     SendClientMessage(playerid,PROCE,"~~~~~~~~~~~~~~~~~~~~~~~~~ Fórum ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2160.     SendClientMessage(playerid,-1,"- Endereço: grandlc.forumeiros.com");
  2161.     SendClientMessage(playerid,-1,"- As regras do servidor se encontram no fórum e devem ser lidas!");
  2162.     SendClientMessage(playerid,PROCE,"~~~~~~~~~~~~~~~~~~~~~~~~~ Fórum ~~~~~~~~~~~~~~~~~~~~~~~~~");
  2163.     return true;
  2164. }
  2165.  
  2166. CMD:admins(playerid, params[])
  2167. {
  2168.     SendClientMessage(playerid,C_MSG, "» Administradores online:");
  2169.     new pAdmin[24],
  2170.         count = 0,
  2171.         msg[120];
  2172.     for(new i=0; i<MAX_PLAYERS; i++)
  2173.     {
  2174.         if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >=1)
  2175.         {
  2176.             GetPlayerName(i,pAdmin,24);
  2177.             format(msg,sizeof(msg),"%s [ID: %d]", pAdmin,i);
  2178.             SendClientMessage(playerid, 0xFFFFFFAA, msg);
  2179.             count++;
  2180.         }
  2181.     }
  2182.     if(count == 0)
  2183.     {
  2184.         SendClientMessage(playerid,-1,"Nenhum administrador connectado no momento!");
  2185.     }
  2186.     return true;
  2187. }
  2188. //COMANDOS TESTE DE ADMINS
  2189.  
  2190. CMD:setarlevel(playerid, params[])
  2191. {
  2192.     new id, level, Nome1[24], Nome2[24];
  2193.     GetPlayerName(playerid,Nome1,24);
  2194.     if(PlayerInfo[playerid][Admin] < 1)
  2195.         return SendClientMessage(playerid,C_MSG,"Sem permissão!");
  2196.     if(sscanf(params,"ud",id,level))
  2197.         return SendClientMessage(playerid,ERRO,"Use: /setarlevel [id][level]");
  2198.     SetPlayerScore(id, level);
  2199.     new msg1[200], msg2[200], msg3[200];
  2200.     GetPlayerName(id,Nome2,24);
  2201.     format(msg1,sizeof(msg1),"* O administrador %s setou seu level para: %d!",NomeDele(playerid),level);
  2202.     SendClientMessage(id,C_MSG,msg1);
  2203.     format(msg2,sizeof(msg2),"* Você setou o level do jogador %s para: %d",NomeDele(id), level);
  2204.     SendClientMessage(playerid,C_MSG,msg2);
  2205.     format(msg3,sizeof(msg3),"(Admin) O administrador %s setou o level do jogador: %s para: %d",NomeDele(playerid),NomeDele(id),level);
  2206.     MensagemAdmin(PROCE,msg3);
  2207.     return true;
  2208. }
  2209.  
  2210. CMD:setarsaldo(playerid, params[])
  2211. {
  2212.     new id, quantia, Nome1[24], Nome2[24];
  2213.     GetPlayerName(playerid,Nome1,MAX_PLAYER_NAME);
  2214.     if(PlayerInfo[playerid][Admin] < 1)
  2215.         return SendClientMessage(playerid,C_MSG,"Sem permissão!");
  2216.     if(sscanf(params,"ud",id,quantia))
  2217.         return SendClientMessage(playerid,ERRO,"Use: /setarsaldo [id] [quantia]");
  2218.     PlayerInfo[id][Saldo] += quantia;
  2219.     new msg1[210], msg2[210], msg3[210];
  2220.     GetPlayerName(id,Nome2,24);
  2221.     format(msg1,sizeof(msg1),"* O administrador %s setou + %d em seu saldo bancário!",NomeDele(playerid),quantia);
  2222.     SendClientMessage(id,C_MSG,msg1);
  2223.     format(msg2,sizeof(msg2),"* Você setou + %d no saldo bancário do jogador %s",quantia,NomeDele(id));
  2224.     SendClientMessage(playerid,C_MSG,msg2);
  2225.     format(msg3,sizeof(msg3),"(Admin) O administrador %s setou + %d no saldo do jogador %s",NomeDele(playerid),quantia,NomeDele(id));
  2226.     MensagemAdmin(PROCE,msg3);
  2227.     return true;
  2228. }
  2229. //********************************* COMANDOS DOS POLICIAIS *******************************************
  2230.  
  2231. CMD:procurar(playerid, params[])
  2232. {
  2233.     if(!PlayerPolicial(playerid)) return SendClientMessage(playerid,C_MSG,"Você não é um policial!");
  2234.     {
  2235.         new iddele,
  2236.             motivo,
  2237.             msg[200],
  2238.             msg2[200],
  2239.             pName[MAX_PLAYER_NAME],
  2240.             nomeprocurado[MAX_PLAYER_NAME];
  2241.         if(sscanf(params,"us[128]",iddele,motivo)) return SendClientMessage(playerid,ERRO,"Use: /procurar [id] [Motivo]");
  2242.         if(!IsPlayerConnected(iddele)) return SendClientMessage(playerid,ERRO,"Jogador não conectado!");
  2243.         if(iddele == playerid) return SendClientMessage(playerid,ERRO,"Você não pode procurar você mesmo!");
  2244.         if(GetPlayerWantedLevel(iddele) == 1)
  2245.         {
  2246.             SetPlayerWantedLevel(iddele, 2);
  2247.         }
  2248.         if(GetPlayerWantedLevel(iddele) == 2)
  2249.         {
  2250.             SetPlayerWantedLevel(iddele, 3);
  2251.         }
  2252.         if(GetPlayerWantedLevel(iddele) == 3)
  2253.         {
  2254.             SetPlayerWantedLevel(iddele, 4);
  2255.         }
  2256.         if(GetPlayerWantedLevel(iddele) == 4)
  2257.         {
  2258.             SetPlayerWantedLevel(iddele, 5);
  2259.         }
  2260.         if(GetPlayerWantedLevel(iddele) == 5)
  2261.         {
  2262.             SetPlayerWantedLevel(iddele,6);
  2263.         }
  2264.         GetPlayerName(iddele,nomeprocurado,MAX_PLAYER_NAME);
  2265.         GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  2266.         format(msg,sizeof(msg),"(PROCURADO) O policial %s colocou 1 estrela de procurado em você!( Motivo: %s )",pName,motivo);
  2267.         format(msg2,sizeof(msg),"(PROCURADO) Você colocou 1 estrela de procurado em %s! ( Motivo: %s )",nomeprocurado,motivo);
  2268.         SendClientMessage(iddele,LCLARO,msg);
  2269.         SendClientMessage(playerid,LCLARO,msg2);
  2270.         for(new i = 0; i < MAX_PLAYERS; i++)
  2271.         {
  2272.             if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >= 1)
  2273.             {
  2274.                 new msg3[200];
  2275.                 format(msg3,sizeof(msg3),"(Admin) O policial %s procurou o jogador %s pelo motivo: %s",pName,nomeprocurado,motivo);
  2276.                 SendClientMessage(i,LCLARO,msg3);
  2277.             }
  2278.         }
  2279.     }
  2280.     return true;
  2281. }
  2282.  
  2283. CMD:algemar(playerid, params[])
  2284. {
  2285.     if(!PlayerPolicial(playerid)) return SendClientMessage(playerid,C_MSG,"Você não é um policial!");
  2286.     new id,motivo, pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
  2287.     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  2288.     if(sscanf(params,"us[128]",id,motivo)) return SendClientMessage(playerid,ERRO,"Use: /algemar [id] [Motivo]");
  2289.     if(id == playerid) return SendClientMessage(playerid,ERRO,"Você não pode algemar você mesmo!");
  2290.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,C_MSG,"Jogador não conectado!");
  2291.     if(PlayerInfo[id][Algemado] == 1) return SendClientMessage(playerid,C_MSG,"Este jogador já está algemado!");
  2292.     PlayerInfo[id][Algemado] = 1;
  2293.     TogglePlayerControllable(id, 0);
  2294.     GetPlayerName(id, aName, MAX_PLAYER_NAME);
  2295.     new msg1[200], msg2[200], msg3[200];
  2296.     GameTextForPlayer(id, "~b~ALGEMADO!", 3000, 0);
  2297.     format(msg1,sizeof(msg1),"(ALGEMADO) O policial %s te algemou! ( Motivo: %s )",pName,motivo);
  2298.     SendClientMessage(id,LCLARO,msg1);
  2299.     format(msg2,sizeof(msg2),"(ALGEMADO) Você algemou o jogador %s com o motivo: %s",aName,motivo);
  2300.     SendClientMessage(playerid,LCLARO,msg2);
  2301.     for(new i = 0; i < MAX_PLAYERS; i++)
  2302.     {
  2303.         if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >=1)
  2304.         {
  2305.             format(msg3,sizeof(msg3),"(Admin) O policial %s algemou %s com o motivo: %s");
  2306.             SendClientMessage(i,LCLARO,msg3);
  2307.         }
  2308.     }
  2309.     return true;
  2310. }
  2311.  
  2312. CMD:desalgemar(playerid, params[])
  2313. {
  2314.     if(!PlayerPolicial(playerid)) return SendClientMessage(playerid,C_MSG,"Você não é um policial!");
  2315.     new id, pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
  2316.     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  2317.     if(sscanf(params,"u",id)) return SendClientMessage(playerid,ERRO,"Use: /desalgemar [id]");
  2318.     if(id == playerid) return SendClientMessage(playerid,ERRO,"Você não pode usar esse comando em você mesmo!");
  2319.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,C_MSG,"Jogador não conectado!");
  2320.     if(PlayerInfo[id][Algemado] == 0) return SendClientMessage(playerid,C_MSG,"Esse jogador não está algemado!");
  2321.     PlayerInfo[id][Algemado] = 0;
  2322.     TogglePlayerControllable(id, 1);
  2323.     GetPlayerName(id, aName, MAX_PLAYER_NAME);
  2324.     new msg1[200], msg2[200], msg3[200];
  2325.     GameTextForPlayer(id, "~b~DESALGEMADO!", 3000, 0);
  2326.     format(msg1,sizeof(msg1),"(DESALGEMADO) O policial %s te desalgemou!",pName);
  2327.     SendClientMessage(id,LCLARO,msg1);
  2328.     format(msg2,sizeof(msg2),"(DESALGEMADO) Você desalgemou o jogador %s!",aName);
  2329.     SendClientMessage(playerid,LCLARO,msg2);
  2330.     for(new i = 0; i < MAX_PLAYERS; i++)
  2331.     {
  2332.         if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >=1)
  2333.         {
  2334.             format(msg3,sizeof(msg3),"(Admin) O policial %s desalgemou o jogador %s",pName,aName);
  2335.             SendClientMessage(i,LCLARO,msg3);
  2336.         }
  2337.     }
  2338.     return true;
  2339. }
  2340.  
  2341. CMD:multar(playerid, params[])
  2342. {
  2343.     if(!PlayerPolicial(playerid)) return SendClientMessage(playerid,C_MSG,"Você não é um policial!");
  2344.     new id,motivo,quantia,pName[MAX_PLAYER_NAME], aName[MAX_PLAYER_NAME];
  2345.     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  2346.     if(sscanf(params,"us[128]d",id,motivo,quantia)) return SendClientMessage(playerid,ERRO,"Use: /multar [id] [motivo] [quantia]");
  2347.     if(id == playerid) return SendClientMessage(playerid,ERRO,"Você não pode usar esse comando em você mesmo!");
  2348.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,C_MSG,"Jogador não conectado!");
  2349.     if(PlayerInfo[id][Algemado] == 0) return SendClientMessage(playerid,C_MSG,"O jogador precisa está algemado para você multá-lo!");
  2350.     GivePlayerMoney(id, -quantia);
  2351.     GetPlayerName(id, aName, MAX_PLAYER_NAME);
  2352.     new msg1[200], msg2[200], msg3[200];
  2353.     GameTextForPlayer(id, "~b~MULTADO!", 3000, 0);
  2354.     format(msg1,sizeof(msg1),"(MULTADO) O policial %s multou você! Valor: R$ %d | Motivo: %s", pName,quantia,motivo);
  2355.     SendClientMessage(id,LCLARO,msg1);
  2356.     format(msg2,sizeof(msg2),"(MULTA) Multa aplicada com sucesso!");
  2357.     SendClientMessage(playerid,LCLARO,msg2);
  2358.     for(new i = 0; i < MAX_PLAYERS; i++)
  2359.     {
  2360.         if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >=1)
  2361.         {
  2362.             format(msg3,sizeof(msg3),"(Admin) O policial %s multou %s! Valor: %d | Motivo: %s",pName,aName,quantia,motivo);
  2363.             SendClientMessage(i,LCLARO,msg3);
  2364.         }
  2365.     }
  2366.     return true;
  2367. }
  2368.  
  2369. CMD:procedimento(playerid, params[])
  2370. {
  2371.     if(!PlayerPolicial(playerid)) return SendClientMessage(playerid,C_MSG,"Você não é um policial!");
  2372.     new id;
  2373.     if(sscanf(params,"u",id)) return SendClientMessage(playerid,ERRO,"Use: /procedimento [id]");
  2374.     if(id == playerid) return SendClientMessage(playerid,ERRO,"Você não pode usar esse comando em você mesmo!");
  2375.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid,C_MSG,"Jogador não conectado!");
  2376.     new msg1[200], msg2[200];
  2377.     GameTextForPlayer(id, "~b~PARADO!", 3000, 0);
  2378.     format(msg1,sizeof(msg1),"[ PROCEDIMENTO ] Parado, encoste o veiculo e espere a verificação do policial!");
  2379.     SendClientMessage(id,PROCE,msg1);
  2380.     format(msg2,sizeof(msg2),"* O pedido de encostamento foi enviado com sucesso!");
  2381.     SendClientMessage(playerid,PROCE,msg1);
  2382.     return true;
  2383. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement