Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- /* PT: CRIADO POR DPLAYER
- EN: CREATOR: DPLAYER */
- /////////////////////////////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #include <c_vehicleinfo>
- #include <a_players>
- #include <a_vehicles>
- #include <DOF2>
- #include <zcmd>
- #include <sscanf>
- #include <streamer>
- #include <foreach>
- #define ADMIN_SPEC_TYPE_NONE 0
- #define ADMIN_SPEC_TYPE_PLAYER 1
- #define ADMIN_SPEC_TYPE_VEHICLE 2
- #define MAX_CHECKPOINTS 100
- #define MAX_IDLE_TIME 5
- #define IsConnected(%0) if (IsPlayerConnected((%0)))
- #define dLoop(%0) for(new %0 = 0; %0 < MAX_PLAYERS; %0++) if(IsPlayerConnected(%0))
- #define FC:%0(%1) forward %0(%1);public %0(%1)
- //Cores
- #define coradmin 0xFFA500AA
- #define corpc1 0x1E90FFAA
- #define AzulClaro 0xB0C4DEAA
- #define Blue 0x33AAFFFF
- #define Verde 0x00D700AA
- #define Vermelho 0xFF0000AA
- #define Azul 0x00FFFFAA
- #define Roxo 0x9E3EFFAA
- #define Amarelo 0xFFFF00FF
- #define Branco 0xFFFFFFAA
- #define Preto 0x00000000
- #define Violeta 0x9955DEEE
- #define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
- #define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
- // Profissões
- #define Desempregado 0 // Baixa
- #define Taxista 1 // Média
- #define Assaltante 2 // Crime
- #define Seguranca 3 // Media
- #define Carteiro 4 // Baixa
- #define Caminhoneiro 5 // Baixa
- #define Medico 6 // Media
- #define Mecanico 7 // Baixa
- #define Advogado 8 // Média
- #define Aposentado 9 // Alta
- #define P_Militar 10 // Alta
- #define P_Civil 11 // Alta
- #define P_Interpol 12 // Alta
- #define P_Federal 13 // Alta
- #define P_FBI 14 // Alta
- #define P_Swat 15 // Alta
- #define P_Rodoviaria 16 // Alta
- #define Sequestrador 17 // Crime
- #define MotoristaP 18 // Baixa
- #define Mendingo 19 // Baixa
- #define Jornalista 20 // Media
- //Menus Dialog
- #define REGISTRO 100
- #define LOGIN 101
- #define DialogSexo 103
- #define CLIMA 104
- #define dUtilitarios 105
- #define dEmpregos 106
- #define dClasseAlta 107
- #define dClasseMedia 108
- #define dClasseBaixa 109
- #define dCrimeClasse 110
- #define DIALOGID 111
- #define DIALOGID1 112
- #define DIALOGV 113
- #define DIALOGID2 114
- #define DIALOGID3 115
- #define DIALOGID4 116
- #define DIALOGID5 117
- #define DIALOGID6 118
- #define dLicencas 119
- #define PASTA_CONTAS "/Contas/%s.ini" //Diretório onde as contas são salvas
- #define PASTA_BANS "/Contas/Banidos" //Diretório dos banimentos!
- #define DIRETORIOB "/Contas/Banco/%s.ini"
- //#define GivePlayerGrana(%0,%1) dMoney[%0] += %1, GivePlayerMoney(%0,%1)
- #define GivePlayerGrana(%0,%1) GivePlayerMoney(%0,%1)
- #define ResetPlayerGrana(%0) dMoney[%0] = 0, ResetPlayerMoney(%0)
- #define GetPlayerGrana(%0) dMoney[%0]
- //#define GetPlayerGrana(%0) (dMoney[%0] != GetPlayerMoney(%0) ? CallLocalFunction("OnMoneyHack", "ii", %0) : GetPlayerMoney(%0))
- new MensagensRandom[3][256] = {
- "( Auto - Mensagem ) Digite: /comandos , Para Visualizar Os Comandos do Servidor .",
- "( Auto - Mensagem ) Veja os Criadores / Ajudandes do Servidor Usando: /creditos .",
- "( Auto - Mensagem ) O GameMode foi Criado por : dPlaYer e está proibida a remoção dos créditos."
- };
- new CoresMRandom[] = {
- 0x80FF00AA
- };
- enum pInfo
- {
- Logado,
- LoginsFalsos
- }
- enum pPos
- {
- Float:LastX,
- Float:LastY,
- Float:LastZ,
- }
- new Equipado[MAX_PLAYERS], PrimeiraPessoa[MAX_PLAYERS], Level[MAX_PLAYERS] , Experiencia[MAX_PLAYERS], gSpectateID[MAX_PLAYERS], gSpectateType[MAX_PLAYERS],TemJP[MAX_PLAYERS],
- NumeroLoto[MAX_PLAYERS] , TGanhador , DinheiroAcumuladoLoto , vernumerosorteado[MAX_PLAYERS] , TaJogando[MAX_PLAYERS], AFK[MAX_PLAYERS], hora, minutoss,PJetPack[MAX_PLAYERS],
- dia, dMoney[MAX_PLAYERS], Taximetro[MAX_PLAYERS][2], PrecoCorrida[MAX_PLAYERS], StringDL[256] , dFile[128], PlayerInfo[MAX_PLAYERS][pInfo],LogoSAMP[MAX_PLAYERS],
- Text:BoxLoto , Text:TextLoteria , Text:TextSalarioLoto, Text:TextAus1 , Text:TextAus2, Text:TextBaixo1 , CarrosDP[18] , CarrosHP[7], PlayerLastPos[MAX_PLAYERS][pPos],
- PlayerAfkTicks[MAX_PLAYERS] , Float:PlayerCurrentPos[3], IsAdmin[MAX_PLAYERS], GzFavela, GzParque, TempoLevel[MAX_PLAYERS], Profissao[MAX_PLAYERS], Gasolina[MAX_PLAYERS], PSamp,
- TemPSurf[MAX_PLAYERS], EstaPreso[MAX_PLAYERS], TimerPreso[MAX_PLAYERS] , IsVip[MAX_PLAYERS] , Text:BoxIntro , Text:IntroText1 , Text:IntroText2 , Text:IntroText3 , Text:IntroText4,
- vidc, modeloc , Text:VeloText0[MAX_PLAYERS] , Text:VeloText1[MAX_PLAYERS] , Text:VeloText2[MAX_PLAYERS] , Text:VeloText3[MAX_PLAYERS] , Text:VeloText5[MAX_PLAYERS], bool:LogadoB[MAX_PLAYERS],
- bool:SenhaB[MAX_PLAYERS] , LigadorCel[MAX_PLAYERS], RecebedorCel[MAX_PLAYERS], EmLigacao[MAX_PLAYERS], AceitLigacao[MAX_PLAYERS], Dominando[MAX_PLAYERS], ProvocouSkate[MAX_PLAYERS], TempoGuerraSkate,
- AlguemDominando, Cela1[MAX_PLAYERS] , Cela2[MAX_PLAYERS] , Cela3[MAX_PLAYERS] , Text3D:LabelPlayer[MAX_PLAYERS];
- new CarrosH[0][1] =
- {
- 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
- 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
- 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
- 442, 443, 444, 445, 447, 448, 449, 450, 451, 455, 456,
- 457, 456, 457, 458, 459, 470, 471, 474, 475, 477, 478,
- 479, 480, 482, 483, 485, 486, 489, 490, 491, 492, 494,
- 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
- 506, 507, 508, 514, 515, 516, 517, 518, 521, 522, 523,
- 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
- 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
- 550, 551, 552, 554, 555, 556, 557, 558, 559, 560, 561,
- 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
- 573, 574, 575, 576, 578, 579, 580, 581, 582, 583, 584,
- 585, 586, 587, 588, 589, 590, 591, 594, 596, 597, 598,
- 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
- 610
- };
- new Airplanes[0][1] =
- {
- 460, 487, 476, 511, 512, 513, 519, 520, 553, 577, 592,
- 593, 460, 476
- };
- new Boats[0][1] =
- {
- 430, 446, 452, 453, 454, 472, 473, 474, 484, 493,
- 595, 430, 446, 452, 453, 454
- };
- new NomeCarro[212][] =
- {
- "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana",
- "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat",
- "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife",
- "Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo",
- "Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
- "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
- "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito",
- "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring",
- "Sandking", "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B",
- "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster","Stunt", "Tanker",
- "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
- "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak",
- "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit",
- "Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
- "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway",
- "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog",
- "Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
- "Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A",
- "Luggage Trailer B", "Stairs", "BoxVille", "Tiller", "Utility Trailer"
- };
- // Pickups
- new SaidaDP, EntradaDP, EntradaUtilitarios, SaidaUTL, EntrarPref, SairPref, EntrarAEscola , SairAEscola,
- EntrarCentral, SairCentral, PickupProf, SairBanco, EntrarBanco, EntrarCentro, SairCentro;
- // Forwards
- forward MudarHora();
- forward LoteriaPublic();
- forward BanLog(string[]);
- forward Taxi();
- forward CombustivelVeiculos();
- forward Velocimetro();
- forward LevelPublic();
- forward MandarRMensagens();
- forward IsNumeric(const string[]);
- main(){}
- public OnGameModeInit()
- {
- SetGameModeText("Boreal RPG");
- SendRconCommand("hostname Boreal [ RPG ] ® SA:MP 0.3e");
- print("===============================================================================");
- print(" GameMode Boreal RPG Carregado com Sucesso!");
- print(" Este Foi GameMode Re-Criado por dPlaYer_");
- print(" Com Novos Conteudos,Atualizacao,Remocao de Bugs,Outros");
- print("===============================================================================\n");
- //======================================= Veiculos ========================================
- //Carros / Motos Hospital
- CarrosHP[0] = AddStaticVehicle(487,-292.9399,1007.3346,19.8073,358.6371,29,42); // heli-hosp
- CarrosHP[1] = AddStaticVehicle(522,-338.9988,1061.5620,19.3061,0.6272,1,3); // moto-hosp
- CarrosHP[2] = AddStaticVehicle(522,-336.6566,1061.5696,19.2994,355.8684,1,3); // moto-hosp
- CarrosHP[3] = AddStaticVehicle(522,-334.4579,1061.5270,19.3028,356.8936,1,3); // moto-hosp
- CarrosHP[4] = AddStaticVehicle(522,-331.8118,1061.5819,19.3099,357.6658,8,82); // moto-hosp
- CarrosHP[5] = AddStaticVehicle(522,-328.8756,1061.5317,19.3049,353.2344,1,3); // moto-hosp
- // Carros / Motos da DP
- CarrosDP[0] = AddStaticVehicle(427,1605.3044,-1606.6864,13.6658,180.2834,0,1); // Carro-DP
- CarrosDP[1] = AddStaticVehicle(427,1600.9781,-1606.7438,13.6289,179.7672,0,1); // Carro-DP
- CarrosDP[2] = AddStaticVehicle(427,1596.1467,-1606.7711,13.5759,180.1573,0,1); // Carro-DP
- CarrosDP[3] = AddStaticVehicle(427,1592.0189,-1606.7498,13.5380,180.9068,0,1); // Carro-DP
- CarrosDP[4] = AddStaticVehicle(596,1588.2010,-1605.3330,12.9200,179.9344,0,1); // Carro-DP
- CarrosDP[5] = AddStaticVehicle(596,1584.2837,-1605.3312,12.9181,181.1962,0,1); // Carro-DP
- CarrosDP[6] = AddStaticVehicle(596,1580.6594,-1605.4951,12.9389,181.1555,0,1); // Carro-DP
- CarrosDP[7] = AddStaticVehicle(596,1577.1396,-1605.3586,12.8702,181.6530,0,1); // Carro-DP
- CarrosDP[8] = AddStaticVehicle(490,1573.4358,-1605.9906,13.5168,179.8688,0,0); // Carro-DP
- CarrosDP[9] = AddStaticVehicle(490,1569.1477,-1606.0416,13.5180,179.6565,0,0); // Carro-DP
- CarrosDP[10] = AddStaticVehicle(490,1564.7357,-1606.0890,13.5160,178.5018,0,0); // Carro-DP
- CarrosDP[11] = AddStaticVehicle(490,1560.4122,-1606.1499,13.4911,178.7210,0,0); // Carro-DP
- CarrosDP[12] = AddStaticVehicle(523,1556.1492,-1604.9941,12.9415,181.1519,0,0); // Carro-DP
- CarrosDP[13] = AddStaticVehicle(523,1553.9086,-1605.0771,12.9416,176.5080,0,0); // Carro-DP
- CarrosDP[14] = AddStaticVehicle(523,1552.0410,-1605.0570,12.9415,182.0315,0,0); // Carro-DP
- CarrosDP[15] = AddStaticVehicle(523,1549.9292,-1605.1558,12.9180,179.7617,0,0); // Carro-DP
- CarrosDP[16] = AddStaticVehicle(497,1563.0851,-1619.9470,13.6767,268.4767,0,1); // Carro-DP
- //Fim Carros
- //Pickups Inicio
- SaidaDP = CreatePickup(1247, 1, 1554.5309, -1675.6157, 16.1953);
- EntradaDP = CreatePickup(1318, 1, 246.9260, 63.1708, 1003.6406);
- EntradaUtilitarios = CreatePickup(1276, 1, 1352.3068,-1758.4059,13.5078);
- SaidaUTL = CreatePickup(1246, 1, -26.0753,-187.4198,1003.5469);
- EntrarPref = CreatePickup(1277, 1, 1478.6147, -1771.7782, 18.7958);
- SairPref = CreatePickup(1318, 1, 389.5828, 173.8764, 1008.3828);
- EntrarAEscola = CreatePickup(1314, 1, 1809.7018, -1166.7360, 24.2266);
- SairAEscola = CreatePickup(1318, 1, -2026.9381, -104.0587, 1035.1719);
- EntrarCentral = CreatePickup(1239, 1, 366.5288, 158.7328, 1008.3828);
- SairCentral = CreatePickup(1318, 1, 1494.3634, 1304.1212, 1093.2891);
- PickupProf = CreatePickup(1210, 1, 1490.4816, 1305.5992, 1093.2964);
- SairBanco = CreatePickup(1318, 1, 1415.1571, -988.8884,1639.7843);
- EntrarBanco = CreatePickup(1274, 1, 1462.3181, -1010.7484, 26.8438);
- EntrarCentro = CreatePickup(1277, 1, 1631.9540, -1172.4180, 24.0843);
- SairCentro = CreatePickup(1318, 1, 834.2897, 7.2396, 1004.1870);
- //Pickups Fim
- SetWeather(2);
- DisableInteriorEnterExits();
- EnableStuntBonusForAll(0);
- // 3D TEXT LABEL
- Create3DTextLabel("Departamento de Polícia\nLos Santos\nAperte ENTER", -1 , 1554.5309, -1675.6157, 16.1953, 60.0 , 0); // Pickup Entrada DP
- Create3DTextLabel("Loja de Utilitários\nLos Santos\nAperte ENTER", -1 , 1352.3068, -1758.4059, 13.5078, 60.0, 0);
- Create3DTextLabel("Saída\nAperte ENTER", -1 , 246.9260, 63.1708, 1003.6406, 60.0 , 0); // Pickup Saida DP
- Create3DTextLabel("Saida\nAperte ENTER", -1 , -26.0753, -187.4198, 1003.5469, 60.0, 0);// Pickup Saida Utilitarios
- Create3DTextLabel("Prefeitura Municipal\nLos Santos\nAperte ENTER", -1, 1478.6147, -1771.7782, 18.7958, 60.0, 0);// Pickup Entrada Prefeitura
- Create3DTextLabel("Saída\nAperte ENTER", -1, 389.5828, 173.8764, 1008.3828, 60.0, 0);// Pickup Saida Prefeitura
- Create3DTextLabel("Auto Escola\nLos Santos\nAperte ENTER", -1, 1809.7018, -1166.7360, 24.2266, 60.0, 0);// Pickup Entrada Auto Escola
- Create3DTextLabel("Saída\nAperte ENTER", -1, -2026.9381, -104.0587, 1035.1719, 60.0, 0);// Pickup Saida Auto Escola
- Create3DTextLabel("Central de Empregos\nAperte ENTER", -1, 366.5288, 158.7328, 1008.3828, 60.0, 0);// 3d Text Central Entrada
- Create3DTextLabel("Saída\nAperte ENTER", -1, 1494.3634, 1304.1212, 1093.2891, 60.0, 0);// 3d Text Central Saida
- Create3DTextLabel("/empregos", -1, 1490.4816, 1305.5992, 1093.2964, 60.0, 0);// 3d Text Central CMD
- Create3DTextLabel("Banco Central\nLos Santos\nAperte ENTER", -1, 1462.3181, -1010.7484, 26.8438, 60.0, 0);// entradabanco
- Create3DTextLabel("Saída\nAperte ENTER", -1, 1415.1571, -988.8884, 1639.7843, 60.0, 0);//saida banco
- Create3DTextLabel("/criarconta", -1, 1424.6754, -981.2695, 1639.7843, 60.0, 0);// banco
- Create3DTextLabel("/banco", -1, 1417.7922, -981.4893, 1639.7843, 60.0, 0);// banco
- Create3DTextLabel("/senhabanco", -1, 1421.2357, -981.5718, 1639.7843, 60.0, 0);// banco
- Create3DTextLabel("Centro de Licenças\nLos Santos\nAperte ENTER", -1, 1631.9540, -1172.4180, 24.0843, 60.0, 0);// entrada licenca centro
- Create3DTextLabel("Saída\nAperte ENTER", -1, 834.2897, 7.2396, 1004.1870, 60.0 , 0);
- Create3DTextLabel("/licencas", -1, 822.8384,3.1775,1004.1797, 60.0 , 0);
- //
- AddPlayerClass(299, 608.2704, -1458.6222, 14.3811, 269.15, 0, 0, 0, 0, 0, 0);
- //Banidos / Nicks / Proibidos Re- Criar Caso não exista nas scripts files.
- if(!fexist("/Contas/Banidos/JogadoresBanidos.ini")) DOF2_CreateFile("JogadoresBanidos.ini");
- if(!fexist("/Contas/Banidos/NicksBanidos.ini")) DOF2_CreateFile("NicksBanidos.ini");
- if(!fexist("/Contas/Banidos/NicksProibidos.ini")) DOF2_CreateFile("NicksProibidos.ini");
- //SetTimers
- SetTimer("LoteriaPublic", 600000, 1);
- SetTimer("Taxi", 5000, 1);
- SetTimer("CombustivelVeiculos", 30000 , 1);
- SetTimer("Velocimetro", 100, 1);
- SetTimer("Clima", 600000, 1);
- SetTimer("MandarRMensagens", 180000,1);
- SetTimer("AtualizarLabel", 1000,1);
- SetTimer("LevelPublic", 60000, 1);
- SetTimer("MudarHora", 2000, true);
- SetTimer("AMoneyHack", 2000, 1);
- //Texdraws
- for (new i = 0; i < GetMaxPlayers(); i++)
- {
- VeloText0[i] = TextDrawCreate(515.000000, 269.000000, ".");
- TextDrawBackgroundColor(VeloText0[i], -65281);
- TextDrawFont(VeloText0[i], 1);
- TextDrawLetterSize(VeloText0[i], 10.380004, 0.900000);
- TextDrawColor(VeloText0[i], -1);
- TextDrawSetOutline(VeloText0[i], 0);
- TextDrawSetProportional(VeloText0[i], 1);
- TextDrawSetShadow(VeloText0[i], 1);
- VeloText1[i] = TextDrawCreate(515.000000, 365.000000, ".");
- TextDrawBackgroundColor(VeloText1[i], -65281);
- TextDrawFont(VeloText1[i], 1);
- TextDrawLetterSize(VeloText1[i], 10.380004, 0.900000);
- TextDrawColor(VeloText1[i], -1);
- TextDrawSetOutline(VeloText1[i], 0);
- TextDrawSetProportional(VeloText1[i], 1);
- TextDrawSetShadow(VeloText1[i], 1);
- VeloText2[i] = TextDrawCreate(530.000000, 285.000000, "~g~100 ~w~KM/H");
- TextDrawBackgroundColor(VeloText2[i], 255);
- TextDrawFont(VeloText2[i], 1);
- TextDrawLetterSize(VeloText2[i], 0.440000, 1.200000);
- TextDrawColor(VeloText2[i], -1);
- TextDrawSetOutline(VeloText2[i], 1);
- TextDrawSetProportional(VeloText2[i], 1);
- VeloText3[i] = TextDrawCreate(531.000000, 304.000000, "~g~100 ~w~Litros");
- TextDrawBackgroundColor(VeloText3[i], 255);
- TextDrawFont(VeloText3[i], 1);
- TextDrawLetterSize(VeloText3[i], 0.440000, 1.200000);
- TextDrawColor(VeloText3[i], -1);
- TextDrawSetOutline(VeloText3[i], 1);
- TextDrawSetProportional(VeloText3[i], 1);
- VeloText5[i] = TextDrawCreate(548.000000, 325.000000, "Infernus");
- TextDrawBackgroundColor(VeloText5[i], 255);
- TextDrawFont(VeloText5[i], 1);
- TextDrawLetterSize(VeloText5[i], 0.310000, 1.500000);
- TextDrawColor(VeloText5[i], -1);
- TextDrawSetOutline(VeloText5[i], 1);
- TextDrawSetProportional(VeloText5[i], 1);
- }
- BoxIntro = TextDrawCreate(700.000000, -9.000000, "_");
- TextDrawBackgroundColor(BoxIntro, 255);
- TextDrawFont(BoxIntro, 1);
- TextDrawLetterSize(BoxIntro, 0.500000, 53.000000);
- TextDrawColor(BoxIntro, -1);
- TextDrawSetOutline(BoxIntro, 0);
- TextDrawSetProportional(BoxIntro, 1);
- TextDrawSetShadow(BoxIntro, 1);
- TextDrawUseBox(BoxIntro, 1);
- TextDrawBoxColor(BoxIntro, 255);
- TextDrawTextSize(BoxIntro, -70.000000, 50.000000);
- IntroText1 = TextDrawCreate(180.000000, 160.000000, "Boreal RPG");
- TextDrawBackgroundColor(IntroText1, 65535);
- TextDrawFont(IntroText1, 1);
- TextDrawLetterSize(IntroText1, 0.730000, 4.000000);
- TextDrawColor(IntroText1, -1);
- TextDrawSetOutline(IntroText1, 1);
- TextDrawSetProportional(IntroText1, 1);
- IntroText2 = TextDrawCreate(180.000000, 147.000000, ".");
- TextDrawBackgroundColor(IntroText2, -1);
- TextDrawFont(IntroText2, 1);
- TextDrawLetterSize(IntroText2, 21.160045, 1.000000);
- TextDrawColor(IntroText2, -1);
- TextDrawSetOutline(IntroText2, 0);
- TextDrawSetProportional(IntroText2, 1);
- TextDrawSetShadow(IntroText2, 1);
- IntroText3 = TextDrawCreate(304.000000, 200.000000, "Versao: 1.0~n~semforum.brasil.net");
- TextDrawBackgroundColor(IntroText3, 65535);
- TextDrawFont(IntroText3, 1);
- TextDrawLetterSize(IntroText3, 0.280000, 1.599999);
- TextDrawColor(IntroText3, -1);
- TextDrawSetOutline(IntroText3, 1);
- TextDrawSetProportional(IntroText3, 1);
- IntroText4 = TextDrawCreate(180.000000, 237.000000, ".");
- TextDrawBackgroundColor(IntroText4, -1);
- TextDrawFont(IntroText4, 1);
- TextDrawLetterSize(IntroText4, 21.160045, 1.000000);
- TextDrawColor(IntroText4, -1);
- TextDrawSetOutline(IntroText4, 0);
- TextDrawSetProportional(IntroText4, 1);
- TextDrawSetShadow(IntroText4, 1);
- TextLoteria = TextDrawCreate(20.000000, 200.000000, "~g~[ ~w~Loteria & Salario ~g~] ~n~Premio Acumulado~w~ : 500000~g~ R$~n~Numero Sorteado~w~ : 72~n~~g~Ganhador ~w~: Niguem");
- TextDrawBackgroundColor(TextLoteria, 255);
- TextDrawFont(TextLoteria, 1);
- TextDrawLetterSize(TextLoteria, 0.350000, 1.500000);
- TextDrawColor(TextLoteria, -1);
- TextDrawSetOutline(TextLoteria, 1);
- TextDrawSetProportional(TextLoteria, 1);
- TextSalarioLoto = TextDrawCreate(20.000000, 255.000000, "~g~Seu Salario~w~ : 6500 ~g~R$");
- TextDrawBackgroundColor(TextSalarioLoto, 255);
- TextDrawFont(TextSalarioLoto, 1);
- TextDrawLetterSize(TextSalarioLoto, 0.350000, 1.500000);
- TextDrawColor(TextSalarioLoto, -1);
- TextDrawSetOutline(TextSalarioLoto, 1);
- TextDrawSetProportional(TextSalarioLoto, 1);
- TextAus1 = TextDrawCreate(207.000000, 282.000000, "~b~~h~~h~Voce esta no Modo 'Ausente'~n~e esta bloqueado de upar.");
- TextDrawBackgroundColor(TextAus1, 255);
- TextDrawFont(TextAus1, 1);
- TextDrawLetterSize(TextAus1, 0.500000, 2.900000);
- TextDrawColor(TextAus1, -1);
- TextDrawSetOutline(TextAus1, 0);
- TextDrawSetProportional(TextAus1, 1);
- TextDrawSetShadow(TextAus1, 1);
- TextAus2 = TextDrawCreate(200.000000, 310.000000, "~n~~b~~h~~h~Para Sair Do Modo 'Ausente' Use: /sairaus");
- TextDrawBackgroundColor(TextAus2, 255);
- TextDrawFont(TextAus2, 1);
- TextDrawLetterSize(TextAus2, 0.370000, 2.599999);
- TextDrawColor(TextAus2, -1);
- TextDrawSetOutline(TextAus2, 0);
- TextDrawSetProportional(TextAus2, 1);
- TextDrawSetShadow(TextAus2, 1);
- TextBaixo1 = TextDrawCreate(243.000000, 432.000000, "~g~~h~~h~sem-nada.forumbrasil.net");
- TextDrawBackgroundColor(TextBaixo1, 255);
- TextDrawFont(TextBaixo1, 1);
- TextDrawLetterSize(TextBaixo1, 0.460000, 1.600000);
- TextDrawColor(TextBaixo1, -1);
- TextDrawSetOutline(TextBaixo1, 1);
- TextDrawSetProportional(TextBaixo1, 1);
- //gang zones
- GzFavela = GangZoneCreate(2016.010986, -1161.922363, 2324.010986, -923.518310);
- GzParque = GangZoneCreate(1861.328125, -1455.078125, 1972.65625, -1349.609375);
- //GangZoneCreate(1859.010375, -1460.937563, 1974.609375, -1351.562510);
- // Objetos + Outros
- UsePlayerPedAnims();
- SetGameModeText("• Brasil - LS");
- SendRconCommand("mapname • Los Santos [ 0.3e ]");
- //Delegacia Objetos
- CreateDynamicObject(987, 1539.712402, -1617.860229, 15.864212, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(987, 1539.558594, -1605.747192, 15.920271, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(987, 1539.591431, -1602.403564, 15.923369, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(987, 1552.073120, -1602.460083, 15.911283, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(987, 1563.900391, -1602.440063, 15.911283, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(987, 1575.692017, -1602.587036, 15.787424, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(987, 1587.663574, -1602.587036, 15.804110, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(987, 1599.633789, -1602.587036, 15.867235, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(987, 1607.935181, -1602.587036, 15.843401, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(987, 1607.812500, -1614.482788, 15.886260, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(987, 1607.812500, -1626.008301, 15.778906, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(987, 1607.654907, -1637.863525, 15.914963, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(987, 1595.940918, -1638.659058, 15.833544, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(3749, 1551.805176, -1627.452393, 18.241226, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(2755, 1549.655029, -1619.792725, 15.646338, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(2755, 1549.630005, -1635.219849, 15.633092, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(1985, 1579.702148, -1635.100586, 15.435662, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(973, 1534.571045, -1711.216675, 13.387095, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(973, 1534.536743, -1701.927856, 13.387095, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(973, 1534.600586, -1693.167358, 13.340213, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(973, 1535.045532, -1686.178223, 12.840220, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(970, 1536.434448, -1681.462158, 12.934294, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1536.276489, -1664.047852, 12.934294, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(973, 1534.348633, -1659.169434, 13.223033, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(973, 1534.372192, -1650.187012, 13.223033, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(973, 1534.353271, -1642.250854, 13.223033, 0.0000, 0.0000, 90.0000);
- // Interior Banco - LS
- CreateDynamicObject(14789,1424.69030800,-1004.06616200,1643.01867700,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(2774,1433.02624500,-1004.64392100,1635.81982400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2774,1429.29699700,-1004.61865200,1641.28112800,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2774,1440.95703100,-979.68206800,1640.29772900,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2774,1429.33715800,-979.54528800,1639.72338900,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2774,1449.31408700,-984.50500500,1648.02319300,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2774,1413.91406300,-984.51538100,1643.07348600,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(1886,1448.51013200,-1003.64294400,1647.09399400,19.76700000,0.00000000,223.35840000); //
- CreateDynamicObject(1886,1414.70654300,-980.60443100,1647.06164600,19.76700000,0.00000000,43.35840000); //
- CreateDynamicObject(2774,1430.41687000,-999.01727300,1638.72241200,0.00000000,269.75920000,0.00000000); //
- CreateDynamicObject(2774,1408.14929200,-998.99682600,1638.72241200,0.00000000,269.75920000,180.00000000); //
- CreateDynamicObject(2774,1443.57727100,-986.63464400,1638.72338900,0.00000000,269.75920000,270.00000000); //
- CreateDynamicObject(2774,1443.60449200,-998.99816900,1647.79748500,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(11359,1414.35620100,-988.98535200,1639.79589800,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(2774,1413.92736800,-986.01171900,1643.04699700,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(2774,1413.76367200,-992.08538800,1643.67334000,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(626,1427.55456500,-997.32299800,1640.76647900,0.00000000,0.00000000,135.00000000); //
- CreateDynamicObject(626,1427.48828100,-990.75250200,1640.84155300,0.00000000,0.00000000,135.00000000); //
- CreateDynamicObject(2773,1427.75671400,-995.78118900,1639.31018100,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1427.69494600,-992.84143100,1639.31018100,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1427.59692400,-989.12860100,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1429.86315900,-982.92736800,1639.31018100,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(626,1427.66528300,-983.12860100,1640.84155300,0.00000000,0.00000000,236.25000000); //
- CreateDynamicObject(2773,1432.75585900,-982.99078400,1639.31018100,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(626,1434.64831500,-983.18890400,1640.84155300,0.00000000,0.00000000,236.25000000); //
- CreateDynamicObject(2773,1437.09143100,-983.05499300,1639.31018100,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(2773,1440.04028300,-983.01275600,1639.31018100,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(3462,1448.46691900,-993.01446500,1640.29797400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(3462,1448.51208500,-982.99261500,1640.18151900,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(626,1441.63623000,-997.04772900,1640.74145500,0.00000000,0.00000000,146.25000000); //
- CreateDynamicObject(14632,1443.64868200,-995.93463100,1638.66772500,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(14632,1432.15637200,-1018.01525900,1639.98815900,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(1514,1432.29492200,-998.85247800,1639.74011200,0.00000000,0.00000000,180.00000000); //
- CreateDynamicObject(1514,1438.35253900,-998.84674100,1639.81567400,0.00000000,0.00000000,180.00000000); //
- CreateDynamicObject(2773,1435.18383800,-996.75927700,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1435.15246600,-993.93255600,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1439.33862300,-996.65869100,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1439.28894000,-994.00067100,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(1723,1426.28015100,-994.86358600,1638.70727500,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(1723,1426.24462900,-991.15045200,1638.73230000,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(1723,1422.27746600,-996.93505900,1638.68225100,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(1723,1422.27929700,-993.21002200,1638.65722700,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(2637,1424.23242200,-992.17358400,1638.83874500,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(2637,1424.22851600,-995.70416300,1638.83874500,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(3657,1432.63330100,-987.73901400,1639.20239300,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(3657,1432.63110400,-986.97723400,1639.20239300,0.00000000,0.00000000,180.00000000); //
- CreateDynamicObject(3657,1438.11157200,-986.97753900,1639.20239300,0.00000000,0.00000000,180.00000000); //
- CreateDynamicObject(3657,1438.08630400,-987.73071300,1639.22741700,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2961,1439.02832000,-999.82666000,1639.21130400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2961,1433.50561500,-999.82763700,1639.30139200,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2946,1414.35522500,-990.51348900,1638.75561500,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2946,1414.38024900,-987.39251700,1638.75500500,0.00000000,0.00000000,180.00000000); //
- CreateDynamicObject(2963,1424.16528300,-1004.81567400,1640.78112800,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(2963,1426.80676300,-1004.83252000,1640.82690400,0.00000000,0.00000000,90.00000000); //
- CreateDynamicObject(1886,1414.73059100,-993.52301000,1646.90856900,17.18870000,0.00000000,67.50000000); //
- CreateDynamicObject(2773,1431.41455100,-996.84582500,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2773,1431.47338900,-994.01709000,1639.30151400,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(632,1434.73535200,-987.75750700,1639.13122600,0.00000000,0.00000000,213.75000000); //
- CreateDynamicObject(2942,1417.71362300,-980.47515900,1639.36352500,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(1216,1443.28137200,-989.31127900,1639.38781700,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(2942,1421.21716300,-980.44891400,1639.38549800,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(2942,1424.63049300,-980.52667200,1639.37146000,0.00000000,0.00000000,0.00000000); //
- CreateDynamicObject(1216,1443.27783200,-991.42486600,1639.42419400,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(1216,1443.25122100,-987.27819800,1639.37622100,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(1216,1443.25976600,-985.48498500,1639.37622100,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(2773,1441.22863800,-993.04296900,1639.30151400,0.00000000,0.00000000,270.00000000); //
- CreateDynamicObject(2824,1424.29724100,-992.05493200,1639.24768100,0.00000000,0.00000000,78.75000000); //
- return 1;
- }
- public OnGameModeExit()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerColor(i,0xFFFFFFAA);
- SalvarDados(i);
- PlayerInfo[i][Logado] = 0;
- }
- }
- DOF2_Exit();
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
- {
- new Float:Life, Float:Colete, Float:Dano;
- GetPlayerArmour(damagedid, Colete);
- GetPlayerHealth(damagedid, Life);
- if(Colete > 0)
- {
- if(amount > Colete)
- {
- Dano = amount - Colete;
- Life = Life - Dano;
- SetPlayerArmour(damagedid, 0.0);
- SetPlayerHealth(damagedid, Life);
- return 1;
- }
- Colete = Colete - amount;
- SetPlayerArmour(damagedid, Colete);
- }
- if(Colete < 1)
- {
- Life = Life - amount;
- SetPlayerHealth(damagedid, Life);
- }
- return 1;
- }
- FC:ChecarPorteArmas(playerid)
- {
- format(dFile, sizeof(dFile), PASTA_CONTAS, GetName(playerid));
- if(DOF2_GetInt(dFile, "PorteArmas") == 0){ResetPlayerWeapons(playerid);}
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[200];
- //SetTimerEx("Intro1", 2000, false, "d", playerid);
- SetTimerEx("ChecarPorteArmas", 1000, 1, "e" , playerid);
- SetPlayerColor(playerid, 0xFFFFFFAA);
- format(string, sizeof(string), "{1E90FF}~> {FFFAFA}%s (%d) conectou-se ao servidor.", GetName(playerid), playerid);
- SendClientMessageToAll(-1, string);
- PlayerInfo[playerid][LoginsFalsos] = 0;
- PlayerInfo[playerid][Logado] = 0;
- if(DOF2_GetInt("/Contas/Banidos/NicksBanidos.ini", GetName(playerid)) == 1)
- {
- SendClientMessage(playerid, Vermelho, "( Info ) Este Nome está banido no servidor!!");
- format(string, sizeof(string), "( Info ) %s (%d) foi Kickado, Motivo:( Nick Banido ).", GetName(playerid) ,playerid);
- SendClientMessageToAll(Vermelho, string);
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Informações Banimento", "---------------------- Info Ban ----------------------\nVocê deve ter feito alguma coisa de errada para ter sido banido\nContate a adminstração para saber qual foi o motivo que você foi banido.\nEsta conta ficará banida até que se prove a inocência do infrator.", "Fechar", "");
- Kick(playerid);
- return 1;
- }
- else if(DOF2_GetInt("/Contas/Banidos/JogadoresProibidos.ini", GetName(playerid)) == 1)
- {
- SendClientMessage(playerid, Vermelho, "( Info - Ban ) Esta conta está banida!!");
- format(string, sizeof(string), "( Info - Ban ) %s (%d) foi Kickado, Motivo: ( Banido ).", GetName(playerid) ,playerid);
- SendClientMessageToAll(Vermelho, string);
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Informações Banimento", "---------------------- Info Ban ----------------------\nVocê deve ter feito alguma coisa de errada para ter sido banido\nContate a adminstração para saber qual foi o motivo que você foi banido.\nEsta conta ficará banida até que se prove a inocência do infrator.", "Fechar", "");
- Kick(playerid);
- return 1;
- }
- else if(DOF2_GetInt("/Contas/Banidos/NicksProibidos.ini", GetName(playerid)) == 1)
- {
- SendClientMessage(playerid, Vermelho, "( Info ) Este nome é proibido no servidor!");
- format(string, sizeof(string), "( Info ) %s (%d) foi Kickado, Motivo:( Nick Proibido ).", GetName(playerid) ,playerid);
- SendClientMessageToAll(Vermelho, string);
- Kick(playerid);
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Informações Banimento", "---------------------- Info Ban ----------------------\nVocê deve ter feito alguma coisa de errada para ter sido banido\nContate a adminstração para saber qual foi o motivo que você foi banido.\nEsta conta ficará banida até que se prove a inocência do infrator.", "Fechar", "");
- return 1;
- }
- //MapIcons
- SetPlayerMapIcon(playerid, 0, 1554.5309, -1675.6157, 16.1953, 30, 0); // Departamento de Polícia
- SetPlayerMapIcon(playerid, 1, 1352.3068, -1758.4059, 13.5078, 17, 0); // Utilitarios
- SetPlayerMapIcon(playerid, 2, 1478.6147, -1771.7782, 18.7958, 20, 0); // Prefeitura
- SetPlayerMapIcon(playerid, 3, 1809.7018, -1166.7360, 24.2266, 55, 0); // Auto Escola
- SetPlayerMapIcon(playerid, 4, 1462.3181, -1010.7484, 26.8438, 52, 0); // Banco
- SetPlayerMapIcon(playerid, 5, 1631.9540, -1172.4180, 24.0843, 16, 0); // Centro de Licenças
- //
- LogadoB[playerid] = false;
- new conta[256];
- format(conta, sizeof(conta), "/Contas/%s.ini", nome(playerid));
- if(PlayerInfo[playerid][Logado] == 0)
- {
- if (!DOF2_FileExists(conta))
- {
- format(conta, sizeof(conta), "{1E90FF}Usuário {FFFAFA}: %s\n{1E90FF}Status da Conta {FFFAFA}: {FF0000}Não Registrada\n{1E90FF}Insira uma senha e clique em {FFFAFA}'Registrar'", nome(playerid));
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Conta", conta, "Registrar", "Sair");
- }
- else if(DOF2_FileExists(conta))
- {
- format(conta, sizeof(conta), "{1E90FF}Usuário {FFFAFA}: %s\n{1E90FF}Status da Conta {FFFAFA}: Registrada\n{1E90FF}Insira sua senha e clique em {FFFAFA}'Logar'", nome(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Conta", conta, "Logar", "Sair");
- }
- SetPlayerPos(playerid, -2023.0532, 896.6314, 67.2109);
- SetPlayerCameraPos(playerid, -2025.2670, 928.9287, 86.9998);
- SetPlayerCameraLookAt(playerid, -2031.3472, 928.7211, 86.9998);
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(IsAdmin[playerid] == 1)
- {
- if(fNitro(vehicleid))
- {
- AddVehicleComponent(vehicleid, 1010);
- }
- }
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- new Menu:Current = GetPlayerMenu(playerid);
- HideMenuForPlayer(Current, playerid);
- TogglePlayerControllable(playerid, true);
- TogglePlayerControllable(playerid, true);
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new Arq[24];
- format(Arq, sizeof(Arq), PASTA_CONTAS, GetName(playerid));
- SalvarDados(playerid);
- PlayerInfo[playerid][Logado] = 0;
- new string[256];
- switch(reason)
- {
- case 0: format(string,sizeof string,"%s (%d) desconectou-se do Servidor {FF0000}( {FFFFFF}Conexão {FF0000})", GetName(playerid) , playerid);
- case 1: format(string,sizeof string,"%s (%d) desconectou-se do Servidor {FF0000}( {FFFFFF}Vontade Própria {FF0000})",GetName(playerid) , playerid);
- case 2: format(string,sizeof string,"%s (%d) desconectou-se do Servidor {FF0000}( {FFFFFF}Kickado/Banido {FF0000})",GetName(playerid) , playerid);
- }
- SendClientMessageToAll(-1, string);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- AtualizarCores(playerid);
- GangZoneShowForAll(GzFavela , 0xFF0000AA);
- GangZoneShowForAll(GzParque , 0xFF000096);
- return 1;
- }
- FC:AtualizarLabel(playerid)
- {
- dLoop(i)
- {
- new prof[60];
- format(prof, sizeof(prof), PASTA_CONTAS, GetName(i));
- if (DOF2_GetInt(prof, "Profissao") == 0)
- {
- Update3DTextLabelText(LabelPlayer[i], -1, "Desempregado");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 1)
- {
- Update3DTextLabelText(LabelPlayer[i], -1, "Taxista");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 2)
- {
- Update3DTextLabelText(LabelPlayer[i], -1, "Assaltante");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 3)
- {
- Update3DTextLabelText(LabelPlayer[i], -1, "Segurança");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 4) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Carteiro");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 5) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Caminhoneiro");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 6) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Médico");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 7) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Mecânico");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 8) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Advogado");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 9) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Aposentado");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 10) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Policial Militar");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 11) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Policial Civil");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 12) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Membro da Interpol");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 13) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Policial Federal");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 14) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Membro da F.B.I");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 15) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Membro da S.W.A.T");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 16) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Policial Rodoviário");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 17) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Sequestrador");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 18) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Motorista Particular");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 19) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Mendingo");
- }
- else if (DOF2_GetInt(prof, "Profissao") == 20) {
- Update3DTextLabelText(LabelPlayer[i], -1, "Jornalista");
- }
- else if (IsAdmin[i] == 1) {
- Update3DTextLabelText(LabelPlayer[i], Verde, "- Adminstrador -");
- }
- else if (IsVip[i] == 1) {
- Update3DTextLabelText(LabelPlayer[i], Amarelo, "- Vip -");
- }
- }
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(gettime() < GetPVarInt(playerid, "flood")) return SendClientMessage(playerid, Vermelho, "( Info ) Aguarde 1 Segundo Para enviar outra mensagem."), false;
- SetPVarInt(playerid, "flood", (gettime() + 1));
- if(strlen(text) > 60) return SendClientMessage(playerid, Vermelho, "( Info ) Texto grande demais!");
- new sChat[256], sNome[MAX_PLAYER_NAME];
- if(EmLigacao[playerid] == 1)
- {
- format(sChat, sizeof(sChat), "( Celular ) %s (%d) : %s", sNome, playerid , sChat);
- SendClientMessage(LigadorCel[playerid], Amarelo, sChat);
- //
- format(sChat, sizeof(sChat), "( Celular ) %s (%d) : %s", sNome, playerid , sChat);
- SendClientMessage(RecebedorCel[playerid], Amarelo, sChat);
- }
- if(IsAdmin[playerid] == 1 && !IsVip[playerid])
- {
- GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
- format(sChat, 128, "» %s {FFFAFA}: %s", sNome,text,playerid);
- for(new i; i != GetMaxPlayers(); i++)
- SendClientMessage(i, GetPlayerColor(playerid), sChat);
- }
- else if(!IsAdmin[playerid] && IsVip[playerid] == 1)
- {
- GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
- format(sChat, 128, "» %s {FFFAFA} [%d]: %s » {FFFAFA}[{FFFF00}VIP{FFFAFA}]", sNome,playerid, text);
- for(new i; i != GetMaxPlayers(); i++)
- SendClientMessage(i, GetPlayerColor(playerid), sChat);
- }
- else if(!IsAdmin[playerid] && !IsVip[playerid])
- {
- GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
- format(sChat, 128, "» %s {FFFAFA} [%d] : %s", sNome,playerid, text);
- for(new i; i != GetMaxPlayers(); i++)
- SendClientMessage(i, GetPlayerColor(playerid), sChat);
- }
- else if(IsAdmin[playerid] == 1 && IsVip[playerid] == 1)
- {
- GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
- format(sChat, 128, "» %s {FFFAFA} [%d]: %s » {FFFAFA}[{FFFF00}VIP / ADMIN{FFFAFA}]", sNome,playerid, text);
- for(new i; i != GetMaxPlayers(); i++)
- SendClientMessage(i, GetPlayerColor(playerid), sChat);
- }
- return 0;
- }
- FC:AtualizarCores(playerid)
- {
- new sFile[60];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(IsAdmin[playerid] == 1)
- {
- SetPlayerColor(playerid, 0x0FFDD349);
- return 1;
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 0)
- {
- SetPlayerColor(playerid, -1);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 1) // x
- {
- SetPlayerColor(playerid, 0x33CCFFAA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 2) //x
- {
- SetPlayerColor(playerid, 0x9ACD32AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 3)
- {
- SetPlayerColor(playerid, 0xFFFFB3AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 4) // x
- {
- SetPlayerColor(playerid, 0xFFFF00AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 5) // x
- {
- SetPlayerColor(playerid, 0x9E3EFFAA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 6) // x
- {
- SetPlayerColor(playerid, 0xA60000AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 7) // x
- {
- SetPlayerColor(playerid, 0x00FF00AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 8) // x
- {
- SetPlayerColor(playerid, 0xFFFFB0AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 9) // x
- {
- SetPlayerColor(playerid, 0xFFFF04AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 10) // x
- {
- SetPlayerColor(playerid, 0x6A6A35AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 11)
- {
- SetPlayerColor(playerid, 0x33CCFFAA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 12)
- {
- SetPlayerColor(playerid, 0x7777FFAA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 13)
- {
- SetPlayerColor(playerid, 0x009F9FAA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 14)
- {
- SetPlayerColor(playerid, 0x934FF6F6);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 15)
- {
- SetPlayerColor(playerid, 0xFFA6A6AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 16)
- {
- SetPlayerColor(playerid, 0x800080AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 17)
- {
- SetPlayerColor(playerid, 0x79E1FFAA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 18)
- {
- SetPlayerColor(playerid, 0x00E1E1AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 19)
- {
- SetPlayerColor(playerid, 0x790079AA);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 20)
- {
- SetPlayerColor(playerid, 0xAAAAAAAA);
- }
- return 1;
- }
- FC:AtualizarCSpawn(playerid)
- {
- new sFile[60];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(DOF2_GetInt(sFile, "Profissao") == 0)
- {
- SetPlayerPos(playerid, 1280.7905,-1337.3821,13.3722);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 1) // x
- {
- SetPlayerPos(playerid, 2153.8550,-1797.9377,13.5539);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 2) //x
- {
- SetPlayerPos(playerid, 1153.2084,-1181.3967,32.8187);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 3)
- {
- //
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 4) // x
- {
- SetPlayerPos(playerid, 1211.3303,-1747.8651,13.5941);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 5) // x
- {
- SetPlayerPos(playerid, -525.0360,-505.5577,25.5234);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 6) // x
- {
- SetPlayerPos(playerid, 1177.5985,-1322.3787,14.0786);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 7) // x
- {
- SetPlayerPos(playerid, 1835.6530,-1875.6486,13.5781);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 8) // x
- {
- SetPlayerPos(playerid, 1774.6375,-1669.0959,14.4268);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 9) // x
- {
- SetPlayerPos(playerid, 1243.3101,-1699.3876,14.8672);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 10) // x
- {
- SetPlayerPos(playerid, 252.9100,67.8120,1003.6406);
- SetPlayerInterior(playerid, 6);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 11)
- {
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 12)
- {
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 13)
- {
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 14)
- {
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 15)
- {
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 16)
- {
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 17)
- {
- SetPlayerPos(playerid, 2244.2620,-1929.4495,13.5469);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 18)
- {
- SetPlayerPos(playerid, 1208.7290,-2036.4012,69.0078);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 19)
- {
- SetPlayerPos(playerid, 2288.2229,-1105.2611,37.9967);
- }
- else if(DOF2_GetInt(sFile, "Profissao") == 20)
- {
- SetPlayerPos(playerid, 735.2441,-1355.3424,14.8382);
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == SaidaDP) return 1;
- if(pickupid == EntradaDP) return 1;
- if(pickupid == EntradaUtilitarios) return 1;
- if(pickupid == SaidaUTL) return 1;
- if(pickupid == EntrarPref) return 1;
- if(pickupid == SairPref) return 1;
- if(pickupid == EntrarAEscola) return 1;
- if(pickupid == SairAEscola) return 1;
- if(pickupid == EntrarCentral) return 1;
- if(pickupid == SairCentral) return 1;
- if(pickupid == PickupProf) return 1;
- if(pickupid == SairBanco) return 1;
- if(pickupid == EntrarBanco) return 1;
- if(pickupid == EntrarCentro) return 1;
- if(pickupid == SairCentro) return 1;
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- //new string[256];
- new banco[190], extrato[200], anox, mesx, diax, horax, minutox, segundox;
- format(banco, sizeof(banco), DIRETORIOB, nome(playerid));
- if (dialogid == REGISTRO)
- {
- new sFile[256];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if (response)
- {
- DOF2_CreateFile(sFile);
- DOF2_SetString(sFile, "Senha", inputtext);
- DOF2_SetInt(sFile, "Profissao", 0);
- DOF2_SetInt(sFile, "HTerrestre", 0);
- DOF2_SetInt(sFile, "HAerea", 0);
- DOF2_SetInt(sFile, "HNautica", 0);
- DOF2_SetInt(sFile, "Preso", 0);
- DOF2_SetInt(sFile, "TempoPreso", 0);
- DOF2_SetInt(sFile, "Level", 0);
- DOF2_SetInt(sFile, "TempoLevel", 0);
- DOF2_SetInt(sFile, "Experiencia", 0);
- DOF2_SetInt(sFile, "Gasolina", 30);
- DOF2_SetInt(sFile, "TemJP", 0);
- DOF2_SetInt(sFile, "LogoSAMP", 0);
- DOF2_SetInt(sFile, "TemPSurf", 0);
- DOF2_SetInt(sFile, "PorteArmas", 0);
- DOF2_SetInt(sFile, "NivelAdmin", 0);
- DOF2_SetInt(sFile, "Vip", 0);
- DOF2_SetInt(sFile, "Skin", 299);
- DOF2_SetInt(sFile, "Banido", 0);
- DOF2_SetInt(sFile, "EstiloLuta", 0);
- SetPlayerSkin(playerid, DOF2_GetInt(sFile, "Skin"));
- SetPlayerColor(playerid, 0xFFFFFFAA);
- PlayerPlaySound(playerid, 1057, 0, 0, 0);
- //
- Level[playerid] = 0;
- Gasolina[playerid] = 30;
- EstaPreso[playerid] = 0;
- TempoLevel[playerid] = 0;
- Experiencia[playerid] = 0;
- IsAdmin[playerid] = 0;
- IsVip[playerid] = 0;
- Profissao[playerid] = Desempregado;
- //
- ShowPlayerDialog(playerid, DialogSexo, DIALOG_STYLE_MSGBOX, "Sexo", "Qual é seu sexo?", "Masculino", "Feminino");
- new xd[150];
- format(xd, sizeof(xd), "{FFFAFA}• Você se registrou com a senha: {FFDAB9}'%s'{FFFAFA}, Guarde-a pois será nessesário para ter acesso a sua conta novamente.", inputtext);
- SendClientMessage(playerid, Vermelho, xd);
- new ano, mes, dia2, stringd[30], stringh[30], Hour, Minute, Second;
- getdate(ano, mes, dia2);
- format(stringd, sizeof(stringd), " (%d/%d/%d)", dia2, mes, ano);
- gettime(Hour, Minute, Second);
- format(stringh, sizeof(stringh), " (%d:%d:%d)", Hour, Minute, Second);
- DOF2_SetString(sFile, "Logou", stringd);
- DOF2_SetString(sFile, "Horas", stringh);
- DOF2_SaveFile();
- }
- else
- {
- format(StringDL, sizeof(StringDL), "{1E90FF}Usuário {FFFAFA}: %s\n{1E90FF}Status da Conta {FFFAFA}: {FF0000}Não Registrada\n{1E90FF}Insira uma senha e clique em {FFFAFA}'Registrar'", nome(playerid));
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Conta", StringDL, "Registrar", "Sair");
- }
- }
- if(dialogid == DialogSexo)
- {
- new sFile[256];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(response == 1)
- {
- SetPlayerSkin(playerid, 299);
- DOF2_SetInt(sFile, "Skin", 299);
- DOF2_SetFloat(sFile, "SpawnX", 608.2704);
- DOF2_SetFloat(sFile, "SpawnY", -1458.6222);
- DOF2_SetFloat(sFile, "SpawnZ", 14.3811);
- SetSpawnInfo(playerid, 1, DOF2_GetInt(sFile, "Skin"), DOF2_GetFloat(sFile, "SpawnX"), DOF2_GetFloat(sFile, "SpawnY"), DOF2_GetFloat(sFile, "SpawnZ"), 354.1657, 0, 0, 0, 0, 0, 0);
- format(sFile, sizeof(sFile), "{1E90FF}Agora Logue-se Em Sua Conta!\n{1E90FF}Usuário {FFFAFA}: %s\n{1E90FF}Status da Conta {FFFAFA}: Registrada\n{1E90FF}Insira sua senha e clique em {FFFAFA}'Logar'", nome(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Conta", sFile, "Logar", "Sair");
- }
- else
- {
- SetPlayerSkin(playerid, 65);
- DOF2_SetInt(sFile, "Skin", 65);
- DOF2_SetFloat(sFile, "SpawnX", 608.2704);
- DOF2_SetFloat(sFile, "SpawnY", -1458.6222);
- DOF2_SetFloat(sFile, "SpawnZ", 14.3811);
- SetSpawnInfo(playerid, 1, DOF2_GetInt(sFile, "Skin"), DOF2_GetFloat(sFile, "SpawnX"), DOF2_GetFloat(sFile, "SpawnY"), DOF2_GetFloat(sFile, "SpawnZ"), 354.1657, 0, 0, 0, 0, 0, 0);
- format(sFile, sizeof(sFile), "{1E90FF}Usuário {FFFAFA}: %s\n{1E90FF}Status da Conta {FFFAFA}: Registrada\n{1E90FF}Insira sua senha e clique em {FFFAFA}'Logar'", nome(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Conta", sFile, "Logar", "Sair");
- }
- return 1;
- }
- if (dialogid == LOGIN)
- {
- new Arq[256];
- format(Arq, sizeof(Arq), PASTA_CONTAS, GetName(playerid));
- if (response)
- {
- if(!strcmp(inputtext, DOF2_GetString(Arq, "Senha"), false))
- {
- PlayerInfo[playerid][Logado] = 1;
- GivePlayerGrana(playerid, DOF2_GetInt(Arq, "Dinheiro"));
- SetSpawnInfo(playerid, 0, DOF2_GetInt(Arq, "Skin"), DOF2_GetFloat(Arq, "SpawnX"), DOF2_GetFloat(Arq, "SpawnY"), DOF2_GetFloat(Arq, "SpawnZ"), 354.1657, 0, 0, 0, 0, 0, 0);
- //
- IsAdmin[playerid] = DOF2_GetInt(Arq, "NivelAdmin");
- IsVip[playerid] = DOF2_GetInt(Arq, "Vip");
- SetPlayerSkin(playerid, DOF2_GetInt(Arq, "Skin"));
- Experiencia[playerid] = DOF2_GetInt(Arq, "Experiencia");
- TempoLevel[playerid] = DOF2_GetInt(Arq, "TempoLevel");
- Gasolina[playerid] = DOF2_GetInt(Arq, "Gasolina");
- Profissao[playerid] = DOF2_GetInt(Arq, "Profissao");
- AtualizarLabel(playerid);
- //
- if(DOF2_GetInt(Arq, "EstiloLuta") == 1)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
- }
- if(DOF2_GetInt(Arq, "EstiloLuta") == 2)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
- }
- if(DOF2_GetInt(Arq, "EstiloLuta") == 3)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- }
- if(DOF2_GetInt(Arq, "EstiloLuta") == 4)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- }
- if(DOF2_GetInt(Arq, "EstiloLuta") == 5)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
- }
- if(DOF2_GetInt(Arq, "EstiloLuta") == 6)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
- }
- //
- TemJP[playerid] = DOF2_GetInt(Arq, "TemJP");
- LogoSAMP[playerid] = DOF2_GetInt(Arq, "LogoSAMP");
- TemPSurf[playerid] = DOF2_GetInt(Arq, "TemPSurf");
- //
- Level[playerid] = DOF2_GetInt(Arq, "Level");
- SetPlayerFightingStyle(playerid, DOF2_GetInt(Arq, "Lutas"));
- AtualizarCSpawn(playerid);
- AtualizarCores(playerid);
- //SetPlayerInterior(playerid, 0);
- new ano, mes, dia2, stringd[30], stringh[30], Hour, Minute, Second;
- getdate(ano, mes, dia2);
- format(stringd, sizeof(stringd), " (%d/%d/%d)", dia2, mes, ano);
- gettime(Hour, Minute, Second);
- format(stringh, sizeof(stringh), " (%d:%d:%d)", Hour, Minute, Second);
- DOF2_SetString(Arq, "Logou", stringd);
- DOF2_SetString(Arq, "Horas", stringh);
- //
- TextDrawHideForPlayer(playerid, BoxIntro);
- TextDrawHideForPlayer(playerid, IntroText1);
- TextDrawHideForPlayer(playerid, IntroText2);
- TextDrawHideForPlayer(playerid, IntroText3);
- TextDrawHideForPlayer(playerid, IntroText4);
- TextDrawShowForPlayer(playerid, TextBaixo1);
- SpawnPlayer(playerid);
- SetTimerEx("ChecarPorteArmas", 1000, 1, "e" , playerid);
- DOF2_SaveFile();
- }
- else
- {
- PlayerInfo[playerid][LoginsFalsos]++;
- if (PlayerInfo[playerid][LoginsFalsos] >= 3)
- {
- format(StringDL, sizeof(StringDL), "( Info ) %s foi kickado automaticamente. ( %d tentativas de login)", GetName(playerid), 3);
- SendClientMessageToAll(0x00C1C1AA, StringDL);
- SetPlayerColor(playerid, 0xFFFFFFAA);
- Kick(playerid);
- }
- else
- {
- format(StringDL, sizeof(StringDL), "{1E90FF}Senha Incorreta!\n{1E90FF}Insira sua senha e clique em {FFFAFA}'Logar'", nome(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Conta", StringDL, "Logar", "Sair");
- }
- }
- }
- else
- {
- format(StringDL, sizeof(StringDL), "{1E90FF}Usuário {FFFAFA}: %s\n{1E90FF}Status da Conta {FFFAFA}: Registrada\n{1E90FF}Insira sua senha e clique em {FFFAFA}'Logar'", nome(playerid));
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Conta", StringDL, "Logar", "Sair");
- }
- }
- if (dialogid == dUtilitarios)
- {
- if (response)
- {
- new sFile[60];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if (listitem == 0)
- {
- DOF2_SetInt(sFile, "TemJP", 1);
- SendClientMessage(playerid, Verde, "( Utilitários ) Você acaba de comprar um JetPack! Para Pegar Use: /jetpack");
- GivePlayerMoney(playerid, -750000);
- PJetPack[playerid] = 0;
- }
- if(listitem == 1)
- {
- DOF2_SetInt(sFile, "LogoSAMP", 1);
- SetPlayerAttachedObject(playerid, 1, 18749, 1, 0.800000, 0.000000, 0.000000, 156.986312, 100.000000, 20.000000, 1.332795, 2.000000, 1.486337);
- SendClientMessage(playerid, Verde, "( Utilitários ) Você acaba de comprar o objeto: Logo SA:MP ! Para Usar, Digite: /lsamp");
- GivePlayerMoney(playerid, -50000);
- LogoSAMP[playerid] = 1;
- }
- if(listitem == 2)
- {
- DOF2_SetInt(sFile, "TemPSurf", 1);
- SetPlayerAttachedObject( playerid, 0, 2404, 1, 0.051352, -0.140526, -0.077093, 0.000000, 121.550628, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_SURF_BOARD - Prancha de surf nas costas
- SendClientMessage(playerid, Verde, "( Utilitários ) Você acaba de comprar o objeto: Prancha de Surf ! Para Usar, Digite: /psurf");
- GivePlayerMoney(playerid, -75000);
- TemPSurf[playerid] = 1;
- }
- }
- }
- if (dialogid == dLicencas)
- {
- if(response)
- {
- new sFile[40];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(listitem == 0) // Terrestre
- {
- if (DOF2_GetInt(sFile, "HTerrestre") == 1) return SendClientMessage(playerid, Amarelo, "( Info ) Você não pode comprar esta habilitação novamente pois você já tem!");
- DOF2_SetInt(sFile, "HTerrestre", 1);
- SendClientMessage(playerid, Amarelo, "( Info ) Você comprou a Habilitação Terrestre!");
- GivePlayerGrana(playerid, -700);
- }
- if(listitem == 1) // Nautica
- {
- if (DOF2_GetInt(sFile, "HNautica") == 1) return SendClientMessage(playerid, Amarelo, "( Info ) Você não pode comprar esta habilitação novamente pois você já tem!");
- DOF2_SetInt(sFile, "HNautica", 1);
- SendClientMessage(playerid, Amarelo, "( Info ) Você comprou a Habilitação Náutica!");
- GivePlayerGrana(playerid, -1000);
- }
- if(listitem == 2) // Aerea
- {
- if (DOF2_GetInt(sFile, "HAerea") == 1) return SendClientMessage(playerid, Amarelo, "( Info ) Você não pode comprar esta habilitação novamente pois você já tem!");
- DOF2_SetInt(sFile, "HAerea", 1);
- SendClientMessage(playerid, Amarelo, "( Info ) Você comprou a Habilitação Aérea!");
- GivePlayerGrana(playerid, -1300);
- }
- if(listitem == 3) // Porte de Armas
- {
- if (DOF2_GetInt(sFile, "PorteArmas") == 1) return SendClientMessage(playerid, Amarelo, "( Info ) Você não pode comprar esta o porte de armas novamente pois você já tem!");
- DOF2_SetInt(sFile, "PorteArmas", 1);
- SendClientMessage(playerid, Amarelo, "( Info ) Você comprou a Licença para Usar Armas ( Porte de Armas ) !");
- GivePlayerGrana(playerid, -2500);
- }
- }
- }
- if (dialogid == dEmpregos)
- {
- if(response)
- {
- new sFile[24];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, dClasseAlta, DIALOG_STYLE_LIST, "Empregos - Classe Alta", "Aposentado - Level 950 [ 4000R$ ]\nPolícia Militar - Level 70 [ 1300R$ ]\nPolícia Civil - Level 90 [ 1600R$ ]\nInterpol - Level 110 [ 1900R$ ]\nPolícia Federal - Level 130 [ 2200R$ ]\nF.B.I - Level 150 [ 2500R$ ]\nS.W.A.T - Level 180 [ 2800R$ ]\nPolícia Rodoviaria - Level 50 [ 1000R$ ]", "Selecionar", "Cancelar");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, dClasseMedia, DIALOG_STYLE_LIST, "Empregos - Classe Média", "Taxista - Level 10 [ 700R$ ]\nSegurança - Level 65 [ 1100R$ ]\nMédico - Level 25 [ 900R$ ]\nAdvogado - Level 50 [ 1500R$ ]\nJornalista - Level 40 [ 920R$ ]", "Selecionar", "Cancelar");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, dClasseBaixa, DIALOG_STYLE_LIST, "Empregos - Classe Baixa", "Carteiro - Level 5 [ 400R$ ]\nCaminhoneiro - Level 10 [ 700R$ ]\nMecânico - Level 0 [ 200R$ ]\nMotorista Particular - Level 0 [ 500R$ ]\nMendingo - Level 0 [ 100R$ ]", "Selecionar", "Cancelar");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, dCrimeClasse, DIALOG_STYLE_LIST, "Empregos - Crime", "Assaltante - Level 40 [ 850R$ ]\nSequestrador - Level 60 [ 900R$ ]", "Selecionar", "Cancelar");
- }
- if(listitem == 4)
- {
- Profissao[playerid] = 0;
- DOF2_SetInt(sFile, "Profissao", 0);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora está desempregado! ");
- AtualizarLabel(playerid);
- }
- }
- }
- if(dialogid == dClasseAlta)
- {
- new sFile[40];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(response)
- {
- if(listitem == 0)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 9;
- AtualizarLabel(playerid);
- DOF2_SetInt(sFile, "Profissao", 9);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Aposentado");
- SetPlayerSkin(playerid, 261);
- }
- if(listitem == 1)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 10;
- DOF2_SetInt(sFile, "Profissao", 10);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial Militar");
- SetPlayerSkin(playerid, 265);
- }
- if(listitem == 2)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 11;
- DOF2_SetInt(sFile, "Profissao", 11);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial Civil");
- SetPlayerSkin(playerid, 266);
- }
- if(listitem == 3)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 12;
- DOF2_SetInt(sFile, "Profissao", 12);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial da Interpol");
- SetPlayerSkin(playerid, 267);
- }
- if(listitem == 4)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 13;
- DOF2_SetInt(sFile, "Profissao", 13);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial Federal");
- SetPlayerSkin(playerid, 280);
- }
- if(listitem == 5)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 14;
- DOF2_SetInt(sFile, "Profissao", 14);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial da FBI");
- SetPlayerSkin(playerid, 286);
- }
- if(listitem == 6)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 15;
- DOF2_SetInt(sFile, "Profissao", 15);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial da SWAT");
- SetPlayerSkin(playerid, 285);
- }
- if(listitem == 7)
- {
- AtualizarCores(playerid);
- Profissao[playerid] = 16;
- DOF2_SetInt(sFile, "Profissao", 16);
- AtualizarLabel(playerid);
- SendClientMessage(playerid, Amarelo, "( Info ) Você agora trabalha como: Policial Rodoviário");
- SetPlayerSkin(playerid, 284);
- }
- }
- }
- if(dialogid == dClasseMedia)
- {
- new sFile[40];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(response)
- {
- if(listitem == 0)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 1)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 2)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 3)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 4)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- }
- }
- if(dialogid == dClasseBaixa)
- {
- new sFile[40];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(response)
- {
- if(listitem == 0)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 1)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 2)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 3)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 4)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- }
- }
- if(dialogid == dCrimeClasse)
- {
- new sFile[40];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(playerid));
- if(response)
- {
- if(listitem == 0)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- if(listitem == 1)
- {
- AtualizarCores(playerid);
- AtualizarLabel(playerid);
- }
- }
- }
- if (dialogid == CLIMA) // Menu
- {
- if (response)
- {
- if (listitem == 0) // Clima
- {
- ShowPlayerDialog(playerid, CLIMA + 1, DIALOG_STYLE_LIST, "Clima", "Ensolarado \nTemporal \nNublado \nCeu Azul \nTempestade de Areia \nEscuro \nQuente \nVoltar", "Selecionar", "Cancelar");
- }
- if (listitem == 1) // Hora
- {
- ShowPlayerDialog(playerid, CLIMA + 2, DIALOG_STYLE_LIST, "Hora", "1:00 \n3:00 \n5:00 \n7:00 \n9:00 \n11:00 \n13:00 \n15:00 \n17:00 \n19:00 \n21:00 \n23:00 \nVoltar", "Selecionar", "Cancelar");
- }
- }
- return 1;
- }
- if (dialogid == CLIMA + 1) // Clima
- {
- if (response)
- {
- if (listitem == 0) // Ensolarado
- {
- SetWeather(5);
- }
- if (listitem == 1) // Temporal
- {
- SetWeather(8);
- }
- if (listitem == 2) // Nublado
- {
- SetWeather(9);
- }
- if (listitem == 3) // Ceu Azul
- {
- SetWeather(10);
- }
- if (listitem == 4) // Tempestade de Areia
- {
- SetWeather(19);
- }
- if (listitem == 5) // Escuro
- {
- SetWeather(45);
- }
- if (listitem == 6) // Quente
- {
- SetWeather(11);
- }
- if (listitem == 7) // Voltar
- {
- ShowPlayerDialog(playerid, CLIMA, DIALOG_STYLE_LIST, "Climas / Tempos", "Clima \nHora", "Selecionar", "Cancelar");
- }
- }
- return 1;
- }
- if (dialogid == CLIMA + 2) // Hora
- {
- if (response)
- {
- if (listitem == 0) //
- {
- SetPlayerTime(playerid, 1, 0);
- }
- if (listitem == 1) //
- {
- SetPlayerTime(playerid, 3, 0);
- }
- if (listitem == 2) //
- {
- SetPlayerTime(playerid, 5, 0);
- }
- if (listitem == 3) //
- {
- SetPlayerTime(playerid, 7, 0);
- }
- if (listitem == 4) //
- {
- SetPlayerTime(playerid, 9, 0);
- }
- if (listitem == 5) //
- {
- SetPlayerTime(playerid, 11, 0);
- }
- if (listitem == 6) //
- {
- SetPlayerTime(playerid, 13, 0);
- }
- if (listitem == 7) //
- {
- SetPlayerTime(playerid, 15, 0);
- }
- if (listitem == 8) //
- {
- SetPlayerTime(playerid, 17, 0);
- }
- if (listitem == 9) //
- {
- SetPlayerTime(playerid, 19, 0);
- }
- if (listitem == 10) //
- {
- SetPlayerTime(playerid, 21, 0);
- }
- if (listitem == 11) //
- {
- SetPlayerTime(playerid, 23, 0);
- }
- if (listitem == 12) //
- {
- ShowPlayerDialog(playerid, CLIMA, DIALOG_STYLE_LIST, "Climas / Tempos", "Clima \nHora", "Selecionar", "Cancelar");
- }
- }
- return 1;
- }
- if(dialogid == DIALOGID2)
- {
- if(response)
- {
- new dinheiro = strval(inputtext);
- if(!DOF2_FileExists(banco)) return SendClientMessage(playerid, Vermelho, "( Info ) Você ainda não tem uma conta bancária.");
- if(!LogadoB[playerid]) return SendClientMessage(playerid, Vermelho, "( Info ) Você precisa logar em sua conta bancária.");
- if(GetPlayerMoney(playerid) < dinheiro || dinheiro <= 0) return SendClientMessage(playerid, Vermelho, "( Info ) Quantia Inválida.");
- if(dinheiro > 10000000) return SendClientMessage(playerid, Vermelho, "( Info ) Você só pode depositar no máximo até 10 milhões!");
- GivePlayerMoney(playerid, -dinheiro);
- new quantidade = DOF2_GetInt(banco, "Saldo");
- DOF2_SetInt(banco, "Saldo", quantidade + dinheiro);
- getdate(anox, mesx, diax);
- gettime(horax, minutox, segundox);
- new saldo = DOF2_GetInt(banco, "Saldo");
- format(extrato, sizeof(extrato), "Conta Bancária\n -- Extrato Bancário --\nNome do Usuário: %s\nSaldo Atual: %dR$\nhorax: %d:%d:%d\nData: %d/%d/%d", nome(playerid), saldo, horax, minutox, segundox, diax, mesx, anox);
- ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Banco - 24/7", extrato, "Fechar", "");
- }
- }
- if(dialogid == DIALOGID3)
- {
- if(response)
- {
- new dinheiro = strval(inputtext);
- if(!DOF2_FileExists(banco)) return SendClientMessage(playerid, Vermelho, "( Info ) Você ainda não tem uma conta bancária.");
- if(!LogadoB[playerid]) return SendClientMessage(playerid, Vermelho, "( Info ) Você precisa logar em sua conta bancária.");
- if(strfind(inputtext, "-", true) != -1) return SendClientMessage(playerid, Vermelho ,"( Info ) Valor invalido.");
- new saldo = DOF2_GetInt(banco, "Saldo");
- if(saldo < dinheiro || dinheiro <= 0) return SendClientMessage(playerid, Vermelho, "( Info ) Quantia Inválida.");
- GivePlayerMoney(playerid, dinheiro);
- new quantidade = DOF2_GetInt(banco, "Saldo");
- DOF2_SetInt(banco, "Saldo", quantidade - dinheiro);
- getdate(anox, mesx, diax);
- gettime(horax, minutox, segundox);
- format(extrato, sizeof(extrato), "Conta Bancária\n -- Extrato Bancário --\nNome do Usuário: %s\nSaldo Atual: %dR$\nhorax: %d:%d:%d\nData: %d/%d/%d", nome(playerid), quantidade, horax, minutox, segundox, diax, mesx, anox);
- DOF2_SaveFile();
- ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Banco - 24/7", extrato, "Fechar", "");
- }
- }
- if(dialogid == DIALOGID5)
- {
- if(response)
- {
- getdate(anox, mesx, diax);
- gettime(horax, minutox, segundox);
- new saldo = DOF2_GetInt(banco, "Saldo");
- format(extrato, sizeof(extrato), "Conta Bancária\n -- Extrato Bancário --\nNome do Usuário: %s\nSaldo Atual: %dR$\nhorax: %d:%d:%d\nData: %d/%d/%d", nome(playerid), saldo, horax, minutox, segundox, diax, mesx, anox);
- ShowPlayerDialog(playerid, 200, DIALOG_STYLE_MSGBOX, "Banco - 24/7", extrato, "Fechar", "");
- }
- else
- {
- format(banco, sizeof(banco), "Conta Bancária\n -- Transação Bancária --\n\nSeu Usuário: %s\n\nQual transação você deseja realizar:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID6, DIALOG_STYLE_MSGBOX, "Banco - 24/7", banco, "Depositar", "Sacar");
- }
- }
- if(dialogid == DIALOGID6)
- {
- if(response)
- {
- format(banco, sizeof(banco), "Conta Bancária\n -- Deposito Bancário --\n\nSeu Usuário: %s\n\nInsira a quantia que deseja depositar:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID2, DIALOG_STYLE_INPUT, "Banco - 24/7", banco, "Depositar", "Cancelar");
- }
- else
- {
- format(banco, sizeof(banco), "Conta Bancária\n -- Saque Bancário --\n\nSeu Usuário: %s\n\nInsira a quantia que deseja sacar:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID3, DIALOG_STYLE_INPUT, "Banco - 24/7", banco, "Sacar", "Cancelar");
- }
- }
- if(dialogid == DIALOGID4)
- {
- if(response)
- {
- if(strlen(inputtext))
- {
- DOF2_CreateFile(banco);
- DOF2_SetString(banco, "Senha", inputtext);
- DOF2_SetInt(banco, "Saldo", 0);
- format(banco, sizeof(banco), "( Info ) Sua conta bancária foi criada com sucesso! - Senha : %s", inputtext);
- SendClientMessage(playerid, -1, banco);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- LogadoB[playerid] = true;
- DOF2_SaveFile();
- }
- else
- {
- format(banco, sizeof(banco), "Não deixe o campo Em Branco!\n\nSeu Usuário: %s\n\nInsira uma senha para prosseguir:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGV, DIALOG_STYLE_INPUT, "Banco - 24/7", banco, "Criar", "Cancelar");
- }
- }
- }
- if(dialogid == DIALOGID)
- {
- if(response)
- {
- if(strlen(inputtext))
- {
- new acesso[150];
- acesso = DOF2_GetString(banco, "Senha");
- if(strcmp(inputtext, acesso, true) == 0)
- {
- SendClientMessage(playerid, -1, "( Info ) Sua conta bancária foi carregada com sucesso!");
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- LogadoB[playerid] = true;
- if(SenhaB[playerid] == true)
- {
- format(banco, sizeof(banco), "Seu Usuário: %s\n\nInsira sua nova senha bancária:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID1, DIALOG_STYLE_INPUT, "Conta", banco, "Confirmar", "Cancelar");
- SenhaB[playerid] = false;
- }
- }
- else
- {
- format(banco, sizeof(banco), "Senha Incorreta!\n\nSeu Usuário: %s\n\nInsira sua senha bancária:", nome(playerid));
- ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, "Banco - 24/7", banco, "Entrar", "Cancelar");
- SendClientMessage(playerid, Vermelho, "( Info ) Senha Incorreta.");
- }
- }
- else
- {
- format(banco, sizeof(banco), "Não deixe o campo em branco!\n\nSeu Usuário: %s\n\nInsira sua senha para prosseguir:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGV, DIALOG_STYLE_INPUT, "Banco - 24/7", banco, "Entrar", "Cancelar");
- }
- }
- }
- if(dialogid == DIALOGID1)
- {
- if(response)
- {
- format(banco, sizeof(banco), "* %s Sua senha bancária foi alterada para : '%s' Guarde-a.", nome(playerid), inputtext);
- SendClientMessage(playerid, Vermelho, banco);
- }
- }
- /*if(dialogid == mudarsenha)
- {
- if(response == 1)
- {
- format(dFile, sizeof(dFile), PASTA_CONTAS, GetName(playerid));
- DOF2_SetString(dFile, "Senha", inputtext);
- SendClientMessage(playerid, Verde, "( Info ) Senha Alterada com sucesso!");
- }
- }*/
- return 1;
- }
- public MandarRMensagens()
- {
- new string[256];
- new random1 = random(sizeof(MensagensRandom));
- new random2 = random(sizeof(CoresMRandom));
- format(string, sizeof(string), "%s", MensagensRandom[random1]);
- SendClientMessageToAll(CoresMRandom[random2],string);
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new model = GetVehicleModel(GetPlayerVehicleID(playerid));
- new StringST[60];
- format(StringST, sizeof(StringST), PASTA_CONTAS, GetName(playerid));
- //Camera 1º Pessoa
- /*if(newstate == PLAYER_STATE_DRIVER && PrimeiraPessoa[playerid] == 1)
- {
- SetPVarInt(playerid, #Object, CreateObject(18688, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
- AttachObjectToPlayer(GetPVarInt(playerid, #Object), playerid, 0.0190, 0.1059, 0.5557, 88.0, 0.0, 87.0);//playerid, 0.0194, 0.1061, 0.5559, 90.0, 0.0, 90.0);
- AttachCameraToObject(playerid, GetPVarInt(playerid, #Object));
- } else if \/ */
- if(oldstate == PLAYER_STATE_DRIVER && PrimeiraPessoa[playerid] == 1) {
- DestroyObject(GetPVarInt(playerid, #Object));
- DeletePVar(playerid, #Object);
- PrimeiraPessoa[playerid] = 0;
- SetCameraBehindPlayer(playerid);
- }
- if(model == 596 || model == 427 || model == 497 || model == 523)
- {
- if(IsAdmin[playerid] == 1 || DOF2_GetInt(StringST,"Profissao") == 10 || DOF2_GetInt(StringST,"Profissao") == 11 || DOF2_GetInt(StringST,"Profissao") == 12 || DOF2_GetInt(StringST,"Profissao") == 13 || DOF2_GetInt(StringST,"Profissao") == 14 || DOF2_GetInt(StringST,"Profissao") == 15)
- {
- //
- }
- else
- {
- SendClientMessage(playerid, -1,"( Info ) Você não pode dirigir um carro de polícia!");
- RemovePlayerFromVehicle(playerid);
- }
- }
- for(new i; i < 200; i++)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vehicleid) == CarrosH[i][0])
- {
- if (DOF2_GetInt(StringST, "HTerrestre") == 0)
- {
- SendClientMessage(playerid, Vermelho, "( Info ) Você está conduzindo um veículo sem habilitação, você pode ser multado! Cuidado com os Policiais!");
- }
- }
- if(GetVehicleModel(vehicleid) == Airplanes[i][0])
- {
- if (DOF2_GetInt(StringST, "HAerea") == 0)
- {
- SendClientMessage(playerid, Vermelho, "( Info ) Você está conduzindo um veículo sem habilitação, você pode ser multado! Cuidado com os Policiais!");
- }
- }
- if(GetVehicleModel(vehicleid) == Boats[i][0])
- {
- if (DOF2_GetInt(StringST, "HNautica") == 0)
- {
- SendClientMessage(playerid, Vermelho, "( Info ) Você está conduzindo um veículo sem habilitação, você pode ser multado! Cuidado com os Policiais!");
- }
- }
- }
- if (Gasolina[playerid] < 0)
- {
- SendClientMessage(playerid, 0x972FFFAA, "( Info ) Você não pode mover o carro sem gasolina.");
- RemovePlayerFromVehicle(playerid);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- return 1;
- }
- forward IsNumeric(const string[]);
- public IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++) if (string[i] > '9' || string[i] < '0') return 0;
- return 1;
- }
- stock GetPlayer2DZone(playerid, zoneada[], len)
- {
- new Float: x;
- new Float: y;
- new Float: z;
- GetPlayerPos(playerid, x, y, z);
- for (new i = 0; i != sizeof(gSAZones); i++)
- {
- if (x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
- {
- return format(zoneada, len, gSAZones[i][SAZONE_NAME], 0);
- }
- }
- return 0;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- if(IsPlayerInPSkate(playerid))
- {
- Dominando[playerid] = 0;
- AlguemDominando = 0;
- ProvocouSkate[playerid] = 0;
- }
- return 1;
- }
- public CombustivelVeiculos()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new mFile[32] , iState = GetPlayerVehicleSeat(i);
- format(mFile, sizeof(mFile), PASTA_CONTAS, GetName(i));
- vidc = GetPlayerVehicleID(i);
- modeloc = GetVehicleModel(vidc);
- if(!(modeloc == 509 || modeloc == 510 || modeloc == 481))
- {
- GetPlayerState(i);
- if(IsPlayerInAnyVehicle(i)) continue;
- if(iState == 0) return DOF2_SetInt(mFile, "Gasolina", DOF2_GetInt(mFile, "Gasolina") - 1);
- if(Gasolina[i] < 2)
- {
- if(IsPlayerInAnyVehicle(i)) return SendClientMessage(i, Vermelho, "( Info ) O Seu Tanque de Combustível está vazio, vá até o posto mais próximo para re-abastecer seu veículo.");
- RemovePlayerFromVehicle(i);
- }
- }
- }
- return 1;
- }
- public Velocimetro()
- {
- for(new i = 0; i < MAX_VEHICLES; i++)
- {
- if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- new Float: X,Float: Y,Float: Z,Float: Speed , nocarro[30],velocidade
- , box1[40], box2[40], box3[40];
- GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
- Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 230.0);
- velocidade = floatround(Speed, floatround_floor);
- new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
- PlayerVehicleModelID -= 400;
- format(nocarro, 30, NomeCarro[PlayerVehicleModelID]);
- //format(string, 256, "~y~~h~Velocidade~w~: %i~b~~h~ KM/H ~n~~y~~h~Modelo~w~: %s ~n~~y~~h~Combustivel~w~: %d~b~~h~ Litros", velocidade, nocarro, Gasolina[i]);//DOF2_GetInt(arq, "Gasolina"));
- format(box1 , 256, "~n~~g~%i ~w~KM/H", velocidade);
- TextDrawSetString(VeloText2[i], box1);
- format(box2 , 256, "~n~~g~%d ~w~Litros", Gasolina[i]);
- TextDrawSetString(VeloText3[i], box2);
- format(box3 , 256, "~n~%s", nocarro);
- TextDrawSetString(VeloText5[i], box3);
- TextDrawShowForPlayer(i, VeloText0[i]);
- TextDrawShowForPlayer(i, VeloText1[i]);
- TextDrawShowForPlayer(i, VeloText2[i]);
- TextDrawShowForPlayer(i, VeloText3[i]);
- TextDrawShowForPlayer(i, VeloText5[i]);
- }
- else if(!IsPlayerInAnyVehicle(i))
- {
- TextDrawHideForPlayer(i, VeloText0[i]);
- TextDrawHideForPlayer(i, VeloText1[i]);
- TextDrawHideForPlayer(i, VeloText2[i]);
- TextDrawHideForPlayer(i, VeloText3[i]);
- TextDrawHideForPlayer(i, VeloText5[i]);
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (IsAdmin[playerid] == 1)
- {
- if (IsPlayerInAnyVehicle(playerid))
- {
- new var0 = GetPlayerVehicleID(playerid);
- if (fNitro(var0) && (oldkeys & 1 || oldkeys & 4))
- {
- RemoveVehicleComponent(var0, 1010);
- AddVehicleComponent(var0, 1010);
- }
- }
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1554.5309, -1675.6157, 16.1953)) //Entrada DP
- {
- SetPlayerPos(playerid, 246.1938, 65.1244, 1003.6406);
- SetPlayerInterior(playerid, 6);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 246.9260,63.1708,1003.6406)) // Saida DP
- {
- SetPlayerPos(playerid, 1553.2592, -1675.4808, 16.1953);
- SetPlayerInterior(playerid, 0);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1352.3068, -1758.4059, 13.5078)) //Entrada Utilitarios
- {
- SetPlayerPos(playerid, -25.7294, -185.3465, 1003.5469);
- SetPlayerInterior(playerid, 17);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , -26.0753, -187.4198, 1003.5469)) //Saida Utilitarios
- {
- SetPlayerPos(playerid, 1351.9530, -1755.2668, 13.3550);
- SetPlayerInterior(playerid, 0);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1478.6147, -1771.7782, 18.7958)) //Entrada Prefeitura
- {
- SetPlayerPos(playerid, 385.5677, 174.1882, 1008.3828);
- SetPlayerInterior(playerid, 3);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 389.5828, 173.8764, 1008.3828)) //Saida Prefeitura
- {
- SetPlayerPos(playerid, 1478.6147, -1771.7782, 18.7958);
- SetPlayerInterior(playerid, 0);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1809.7018, -1166.7360, 24.2266)) //Saida Auto Escola
- {
- SetPlayerPos(playerid, -2029.2554, -105.0380, 1035.1719);
- SetPlayerInterior(playerid, 3);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , -2026.9381, -104.0587, 1035.1719)) //Saida Auto Escola
- {
- SetPlayerPos(playerid, 1809.0400, -1171.0183, 23.8281);
- SetPlayerInterior(playerid, 0);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 366.5288, 158.7328, 1008.3828)) //Entrada Central
- {
- SetPlayerPos(playerid, 1494.7965, 1306.7031, 1093.2943);
- SetPlayerInterior(playerid, 3);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1494.3634, 1304.1212, 1093.2891)) //Saida Central
- {
- SetPlayerPos(playerid, 366.4662, 161.0530, 1008.3828);
- SetPlayerInterior(playerid, 3);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1462.3181, -1010.7484, 26.8438)) // Entrada Banco
- {
- //SetPlayerPos(playerid, 1417.3867, -989.1342, 1639.7843);
- SetPlayerPos(playerid, 1417.5822, -988.7551, 1640.0978);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1415.1571, -988.8884, 1639.7843)) // Saida Banco
- {
- SetPlayerPos(playerid, 1462.4246, -1013.8778, 26.7837);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 1631.9540,-1172.4180,24.0843)) // Entrada Centro Licenças
- {
- SetPlayerPos(playerid, 832.1034, 7.4615, 1004.1797);
- SetPlayerInterior(playerid, 3);
- }
- if(newkeys == KEY_SECONDARY_ATTACK && PlayerToPoint(2.0, playerid , 834.2897, 7.2396, 1004.1870)) // Saida Centro Licenças
- {
- SetPlayerPos(playerid, 1632.2113,-1170.3450,24.0781);
- SetPlayerInterior(playerid, 0);
- }
- return 1;
- }
- AntiWH()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- new string[135+24];
- if (!IsPlayerAdmin(i) && IsAdmin[i] == 0)
- {
- if (GetPlayerWeapon(i) == 37)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Flame Thrower)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerWeapon(i) == 36)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Rocket Launcher)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerWeapon(i) == 35)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Heat Seeking RPG)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerWeapon(i) == 45)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Thermal Goggles)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerWeapon(i) == 40)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Detonador)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK && PJetPack[i] == 0)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Jetpack)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerWeapon(i) == 38)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Minigun)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- else if (GetPlayerWeapon(i) == 39)
- {
- format(string, sizeof(string), "{FF0000}[ {FFFAFA}ANTI - WH {FF0000}] {FFFAFA}%s {FF0000}foi banido automaticamente pelo sistema. {FFFAFA}(Motivo: Sachel Charges)", nome(i));
- SendClientMessage(i, -1, string);
- SendClientMessage(i, Vermelho, "( Info ) Você foi banido do servidor!");
- GameTextForPlayer(i, "~r~banido~w~!", 2500, 3);
- SetPlayerPos(i, 831.9581, -1102.1510, 24.2969);
- Ban(i);
- return 1;
- }
- }
- }
- return 0;
- }
- fNitro(n)
- {
- GetVehicleModel(n);
- random(sizeof(n));
- return n;
- }
- public Taxi()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (Taximetro[i][0] == 1)
- {
- if (GetPlayerGrana(i) > PrecoCorrida[i] + 3)
- {
- new string[256];
- PrecoCorrida[i] = PrecoCorrida[i] + 3;
- format(string, sizeof(string), "( Taximetro ) O taxímetro cobra: $%d", PrecoCorrida[i]);
- SendClientMessage(i, 0xFFFF00AA, string);
- SendClientMessage(Taximetro[i][1], Verde, string);
- }
- if (GetPlayerGrana(i) < PrecoCorrida[i] + 3)
- {
- SendClientMessage(i, Vermelho, "( Taximetro ) Você não tem mais dinheiro para o taxi,e foi expulso do veiculo.");
- SendClientMessage(Taximetro[i][1], Vermelho, "( Info ) Seu passageiro ficou sem dinheiro e por isso foi expulso do taxi.");
- GivePlayerGrana(i, 0 - PrecoCorrida[i]);
- GivePlayerGrana(Taximetro[i][1], PrecoCorrida[i]);
- RemovePlayerFromVehicle(i);
- PrecoCorrida[i] = 0;
- Taximetro[i][1] = 0;
- }
- }
- }
- }
- public BanLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\r\n", string);
- new File: hFile;
- hFile = fopen("ban.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public LevelPublic()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- new sFile[256];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(i));
- if (AFK[i] == 0)
- {
- DOF2_SetInt(sFile, "TempoLevel", DOF2_GetInt(sFile, "TempoLevel") + 1);
- }
- else if (TempoLevel[i] > 7)
- {
- DOF2_SetInt(sFile, "Experiencia", DOF2_GetInt(sFile, "Experiencia") + 1);
- format(sFile, sizeof(sFile), "( Info - UP ) Você ganhou +1 ponto de experiência. (%d/5)", DOF2_GetInt(sFile, "Experiencia"));
- PlayerPlaySound(i, 1057, 0, 0, 0);
- SendClientMessage(i, 0x80FFFFAA, sFile);
- DOF2_SetInt(dFile, "TempoLevel", 0);
- Experiencia[i]++;
- TempoLevel[i] = 0;
- DOF2_SetInt(sFile, "TempoLevel", TempoLevel[i]);
- }
- else if (Experiencia[i] >= 5)
- {
- Level[i]++;
- DOF2_SetInt(sFile, "Level", Level[i]);
- format(sFile, sizeof(sFile), "( Info - UP ) Você juntou 5 de Experiencia e ganhou mais um 'Level', Um Total de : '%d' Leveis ", Level[i]);
- SendClientMessage(i, 0x80FFFFAA, sFile);
- PlayerPlaySound(i, 1057, 0, 0, 0);
- Experiencia[i] = 0;
- DOF2_SetInt(sFile, "Experiencia", Experiencia[i]);
- }
- else if(AFK[i] == 1)
- {
- SendClientMessage(i, Vermelho, "( Info - UP ) Você está proibido de passar de nível pois está no modo ausente!");
- }
- }
- }
- }
- forward TempoAFK();
- public TempoAFK()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- //
- GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]);
- if (!floatcmp(PlayerCurrentPos[0], PlayerLastPos[i][LastX]) && !floatcmp(PlayerCurrentPos[1], PlayerLastPos[i][LastY]))
- {
- PlayerAfkTicks[i]++;
- }
- else
- {
- PlayerAfkTicks[i] = 0;
- }
- PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
- PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
- PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];
- if (PlayerAfkTicks[i] == MAX_IDLE_TIME * 60)
- {
- AFK[i] = 1;
- SendClientMessage(i, Vermelho, "( Info ) Você está proibido de upar pois está no modo ausente.");
- SetPlayerVirtualWorld(i, 1);
- SetCameraBehindPlayer(i);
- TogglePlayerControllable(i, 0);
- TextDrawShowForPlayer(i, TextAus1);
- TextDrawShowForPlayer(i, TextAus2);
- }
- }
- }
- }
- stock SaveLastPosition(vehicleid)
- {
- new Float:SaveCoord_X, Float:SaveCoord_Y, Float:SaveCoord_Z;
- GetVehiclePos(vehicleid, SaveCoord_X, SaveCoord_Y, SaveCoord_Z);
- sVehicle_X[vehicleid]=SaveCoord_X;
- sVehicle_Y[vehicleid]=SaveCoord_Y;
- sVehicle_Z[vehicleid]=SaveCoord_Z;
- }
- stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- return 0;
- }
- stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
- {
- new RetValue = 0;
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z );
- if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
- {
- RetValue = 1;
- }
- return RetValue;
- }
- stock GetDistanceBetweenPlayers(playerid,playerid2)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- new Float:tmpdis;
- GetPlayerPos(playerid,x1,y1,z1);
- GetPlayerPos(playerid2,x2,y2,z2);
- tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- return floatround(tmpdis);
- }
- stock GetPlayerArea(playerid)
- {
- new str[130];
- format(str,sizeof(str),"%s",Zones[GetPlayerZone(playerid)][zone_name]);
- return str;
- }
- stock GetPlayerZone(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- for(new i=0;i<sizeof(Zones);i++)
- {
- if(x > Zones[i][zone_minx] && y > Zones[i][zone_miny] && z > Zones[i][zone_minz] && x < Zones[i][zone_maxx] && y < Zones[i][zone_maxy] && z < Zones[i][zone_maxz])
- return i;
- }
- return false;
- }
- stock chrfind(needle, haystack[], start = 0)
- {
- while(haystack[start])
- {
- if(haystack[start++] == needle)
- {
- return start-1;
- }
- }
- return -1;
- }
- stock GetName(playerid)
- {
- new Name[24];
- GetPlayerName(playerid,Name,24);
- return Name;
- }
- stock GetSkinName(skinid)
- {
- new returnt[64];
- switch(skinid)
- {
- case 0 : { format(returnt,sizeof(returnt), "Carl CJ Johnson"); }
- case 1 : { format(returnt,sizeof(returnt), "The Truth"); }
- case 2 : { format(returnt,sizeof(returnt), "Maccer"); }
- case 3 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 4 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 5 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 6 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 7 : { format(returnt,sizeof(returnt), "Taxi Driver/Train Driver"); }
- case 8 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 9 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 10 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 11 : { format(returnt,sizeof(returnt), "Casino Worker"); }
- case 12 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 13 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 14 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 15 : { format(returnt,sizeof(returnt), "RS Haul Owner"); }
- case 16 : { format(returnt,sizeof(returnt), "Airport Ground Worker"); }
- case 17 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 18 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 19 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 20 : { format(returnt,sizeof(returnt), "Madd Dogg's Manager"); }
- case 21 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 22 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 23 : { format(returnt,sizeof(returnt), "BMXer"); }
- case 24 : { format(returnt,sizeof(returnt), "Madd Dogg Bodyguard"); }
- case 25 : { format(returnt,sizeof(returnt), "Madd Dogg Bodyguard"); }
- case 26 : { format(returnt,sizeof(returnt), "Mountain Climber"); }
- case 27 : { format(returnt,sizeof(returnt), "Builder"); }
- case 28 : { format(returnt,sizeof(returnt), "Drug Dealer"); }
- case 29 : { format(returnt,sizeof(returnt), "Drug Dealer"); }
- case 30 : { format(returnt,sizeof(returnt), "Drug Dealer"); }
- case 31 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 32 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 33 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 34 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 35 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 36 : { format(returnt,sizeof(returnt), "Golfer"); }
- case 37 : { format(returnt,sizeof(returnt), "Golfer"); }
- case 38 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 39 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 40 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 41 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 42 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 43 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 44 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 45 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 46 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 47 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 48 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 49 : { format(returnt,sizeof(returnt), "Snakehead (Da Nang)"); }
- case 50 : { format(returnt,sizeof(returnt), "Mechanic"); }
- case 51 : { format(returnt,sizeof(returnt), "Mountain Biker"); }
- case 52 : { format(returnt,sizeof(returnt), "Mountain Biker"); }
- case 53 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 54 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 55 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 56 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 57 : { format(returnt,sizeof(returnt), "Feds"); }
- case 58 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 59 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 60 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 61 : { format(returnt,sizeof(returnt), "Pilot"); }
- case 62 : { format(returnt,sizeof(returnt), "Colonel Fuhrberger"); }
- case 63 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 64 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 65 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 66 : { format(returnt,sizeof(returnt), "Pool Player"); }
- case 67 : { format(returnt,sizeof(returnt), "Pool Player"); }
- case 68 : { format(returnt,sizeof(returnt), "Priest"); }
- case 69 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 70 : { format(returnt,sizeof(returnt), "Scientist"); }
- case 71 : { format(returnt,sizeof(returnt), "Security Guard"); }
- case 72 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 73 : { format(returnt,sizeof(returnt), "Jethro"); }
- case 74 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 75 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 76 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 77 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 78 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 79 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 80 : { format(returnt,sizeof(returnt), "Boxer"); }
- case 81 : { format(returnt,sizeof(returnt), "Boxer"); }
- case 82 : { format(returnt,sizeof(returnt), "Elvis Wannabe"); }
- case 83 : { format(returnt,sizeof(returnt), "Elvis Wannabe"); }
- case 84 : { format(returnt,sizeof(returnt), "Elvis Wannabe"); }
- case 85 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 86 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 87 : { format(returnt,sizeof(returnt), "Whore"); }
- case 88 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 89 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 90 : { format(returnt,sizeof(returnt), "Whore"); }
- case 91 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 92 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 93 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 94 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 95 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 96 : { format(returnt,sizeof(returnt), "Jogger"); }
- case 97 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 98 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 99 : { format(returnt,sizeof(returnt), "Skeelering"); }
- case 100 : { format(returnt,sizeof(returnt), "Biker"); }
- case 101 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 102 : { format(returnt,sizeof(returnt), "Balla"); }
- case 103 : { format(returnt,sizeof(returnt), "Balla"); }
- case 104 : { format(returnt,sizeof(returnt), "Balla"); }
- case 105 : { format(returnt,sizeof(returnt), "Grove Street Families"); }
- case 106 : { format(returnt,sizeof(returnt), "Grove Street Families"); }
- case 107 : { format(returnt,sizeof(returnt), "Grove Street Families"); }
- case 108 : { format(returnt,sizeof(returnt), "Los Santos Vagos"); }
- case 109 : { format(returnt,sizeof(returnt), "Los Santos Vagos"); }
- case 110 : { format(returnt,sizeof(returnt), "Los Santos Vagos"); }
- case 111 : { format(returnt,sizeof(returnt), "The Russian Mafia"); }
- case 112 : { format(returnt,sizeof(returnt), "The Russian Mafia"); }
- case 113 : { format(returnt,sizeof(returnt), "The Russian Mafia"); }
- case 114 : { format(returnt,sizeof(returnt), "Varios Los Aztecas"); }
- case 115 : { format(returnt,sizeof(returnt), "Varios Los Aztecas"); }
- case 116 : { format(returnt,sizeof(returnt), "Varios Los Aztecas"); }
- case 117 : { format(returnt,sizeof(returnt), "Traid"); }
- case 118 : { format(returnt,sizeof(returnt), "Traid"); }
- case 119 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 120 : { format(returnt,sizeof(returnt), "Traid"); }
- case 121 : { format(returnt,sizeof(returnt), "Da Nang Boy"); }
- case 122 : { format(returnt,sizeof(returnt), "Da Nang Boy"); }
- case 123 : { format(returnt,sizeof(returnt), "Da Nang Boy"); }
- case 124 : { format(returnt,sizeof(returnt), "The Mafia"); }
- case 125 : { format(returnt,sizeof(returnt), "The Mafia"); }
- case 126 : { format(returnt,sizeof(returnt), "The Mafia"); }
- case 127 : { format(returnt,sizeof(returnt), "The Mafia"); }
- case 128 : { format(returnt,sizeof(returnt), "Farm Inhabitant"); }
- case 129 : { format(returnt,sizeof(returnt), "Farm Inhabitant"); }
- case 130 : { format(returnt,sizeof(returnt), "Farm Inhabitant"); }
- case 131 : { format(returnt,sizeof(returnt), "Farm Inhabitant"); }
- case 132 : { format(returnt,sizeof(returnt), "Farm Inhabitant"); }
- case 133 : { format(returnt,sizeof(returnt), "Farm Inhabitant"); }
- case 134 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 135 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 136 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 137 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 138 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 139 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 140 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 141 : { format(returnt,sizeof(returnt), "Office Worker"); }
- case 142 : { format(returnt,sizeof(returnt), "Taxi Driver"); }
- case 143 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 144 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 145 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 146 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 147 : { format(returnt,sizeof(returnt), "Director"); }
- case 148 : { format(returnt,sizeof(returnt), "Secretary"); }
- case 149 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 150 : { format(returnt,sizeof(returnt), "Secretary"); }
- case 151 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 152 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 153 : { format(returnt,sizeof(returnt), "Coffee mam'"); }
- case 154 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 155 : { format(returnt,sizeof(returnt), "Well Stacked Pizza"); }
- case 156 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 157 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 158 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 159 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 160 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 161 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 162 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 163 : { format(returnt,sizeof(returnt), "Bouncer"); }
- case 164 : { format(returnt,sizeof(returnt), "Bouncer"); }
- case 165 : { format(returnt,sizeof(returnt), "MIB Agent"); }
- case 166 : { format(returnt,sizeof(returnt), "MIB Agent"); }
- case 167 : { format(returnt,sizeof(returnt), "Cluckin' Bell"); }
- case 168 : { format(returnt,sizeof(returnt), "Food Vendor"); }
- case 169 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 170 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 171 : { format(returnt,sizeof(returnt), "Casino Worker"); }
- case 172 : { format(returnt,sizeof(returnt), "Hotel Services"); }
- case 173 : { format(returnt,sizeof(returnt), "San Fierro Rifa"); }
- case 174 : { format(returnt,sizeof(returnt), "San Fierro Rifa"); }
- case 175 : { format(returnt,sizeof(returnt), "San Fierro Rifa"); }
- case 176 : { format(returnt,sizeof(returnt), "Tatoo Shop"); }
- case 177 : { format(returnt,sizeof(returnt), "Tatoo Shop"); }
- case 178 : { format(returnt,sizeof(returnt), "Whore"); }
- case 179 : { format(returnt,sizeof(returnt), "Ammu-Nation Salesmen"); }
- case 180 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 181 : { format(returnt,sizeof(returnt), "Punker"); }
- case 182 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 183 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 184 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 185 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 186 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 187 : { format(returnt,sizeof(returnt), "Buisnessman"); }
- case 188 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 189 : { format(returnt,sizeof(returnt), "Valet"); }
- case 190 : { format(returnt,sizeof(returnt), "Barbara Schternvart"); }
- case 191 : { format(returnt,sizeof(returnt), "Helena Wankstein"); }
- case 192 : { format(returnt,sizeof(returnt), "Michelle Cannes"); }
- case 193 : { format(returnt,sizeof(returnt), "Katie Zhan"); }
- case 194 : { format(returnt,sizeof(returnt), "Millie Perkins"); }
- case 195 : { format(returnt,sizeof(returnt), "Denise Robinson"); }
- case 196 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 197 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 198 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 199 : { format(returnt,sizeof(returnt), "Farm-Town inhabitant"); }
- case 200 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 201 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 202 : { format(returnt,sizeof(returnt), "Farmer"); }
- case 203 : { format(returnt,sizeof(returnt), "Karate Teacher"); }
- case 204 : { format(returnt,sizeof(returnt), "Karate Teacher"); }
- case 205 : { format(returnt,sizeof(returnt), "Burger Shot Cashier"); }
- case 206 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 207 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 208 : { format(returnt,sizeof(returnt), "Well Stacked Pizza"); }
- case 209 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 210 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 211 : { format(returnt,sizeof(returnt), "Shop Staff"); }
- case 212 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 213 : { format(returnt,sizeof(returnt), "Weird old man"); }
- case 214 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 215 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 216 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 217 : { format(returnt,sizeof(returnt), "Shop Staff"); }
- case 218 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 219 : { format(returnt,sizeof(returnt), "Secretary"); }
- case 220 : { format(returnt,sizeof(returnt), "Taxi Driver"); }
- case 221 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 222 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 223 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 224 : { format(returnt,sizeof(returnt), "Sofori"); }
- case 225 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 226 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 227 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 228 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 229 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 230 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 231 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 232 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 233 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 234 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 235 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 236 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 237 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 238 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 239 : { format(returnt,sizeof(returnt), "Homeless"); }
- case 240 : { format(returnt,sizeof(returnt), "The D.A"); }
- case 241 : { format(returnt,sizeof(returnt), "Afro-American"); }
- case 242 : { format(returnt,sizeof(returnt), "Mexican"); }
- case 243 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 244 : { format(returnt,sizeof(returnt), "Whore"); }
- case 245 : { format(returnt,sizeof(returnt), "Prostitute"); }
- case 246 : { format(returnt,sizeof(returnt), "Whore"); }
- case 247 : { format(returnt,sizeof(returnt), "Biker"); }
- case 248 : { format(returnt,sizeof(returnt), "Biker"); }
- case 249 : { format(returnt,sizeof(returnt), "Pimp"); }
- case 250 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 251 : { format(returnt,sizeof(returnt), "Beach Visitor"); }
- case 252 : { format(returnt,sizeof(returnt), "Naked Valet"); }
- case 253 : { format(returnt,sizeof(returnt), "Bus Driver"); }
- case 254 : { format(returnt,sizeof(returnt), "Drug Dealer"); }
- case 255 : { format(returnt,sizeof(returnt), "Limo Driver"); }
- case 256 : { format(returnt,sizeof(returnt), "Whore"); }
- case 257 : { format(returnt,sizeof(returnt), "Whore"); }
- case 258 : { format(returnt,sizeof(returnt), "Golfer"); }
- case 259 : { format(returnt,sizeof(returnt), "Golfer"); }
- case 260 : { format(returnt,sizeof(returnt), "Construction Site"); }
- case 261 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 262 : { format(returnt,sizeof(returnt), "Taxi Driver"); }
- case 263 : { format(returnt,sizeof(returnt), "Normal Ped"); }
- case 264 : { format(returnt,sizeof(returnt), "Clown"); }
- case 265 : { format(returnt,sizeof(returnt), "Tenpenny"); }
- case 266 : { format(returnt,sizeof(returnt), "Pulaski"); }
- case 267 : { format(returnt,sizeof(returnt), "Officer Frank Tenpenny (Crooked Cop)"); }
- case 268 : { format(returnt,sizeof(returnt), "Dwaine"); }
- case 269 : { format(returnt,sizeof(returnt), "Melvin Big Smoke Harris"); }
- case 270 : { format(returnt,sizeof(returnt), "Sweet "); }
- case 271 : { format(returnt,sizeof(returnt), "Lance Ryder Wilson"); }
- case 272 : { format(returnt,sizeof(returnt), "Mafia Boss"); }
- case 273 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 274 : { format(returnt,sizeof(returnt), "Paramedic"); }
- case 275 : { format(returnt,sizeof(returnt), "Paramedic"); }
- case 276 : { format(returnt,sizeof(returnt), "Paramedic"); }
- case 277 : { format(returnt,sizeof(returnt), "Firefighter"); }
- case 278 : { format(returnt,sizeof(returnt), "Firefighter"); }
- case 279 : { format(returnt,sizeof(returnt), "Firefighter"); }
- case 280 : { format(returnt,sizeof(returnt), "Los Santos Police"); }
- case 281 : { format(returnt,sizeof(returnt), "San Fierro Police"); }
- case 282 : { format(returnt,sizeof(returnt), "Las Venturas Police"); }
- case 283 : { format(returnt,sizeof(returnt), "Country Sheriff"); }
- case 284 : { format(returnt,sizeof(returnt), "San Andreas Police Dept."); }
- case 285 : { format(returnt,sizeof(returnt), "S.W.A.T Special Forces"); }
- case 286 : { format(returnt,sizeof(returnt), "Federal Agents"); }
- case 287 : { format(returnt,sizeof(returnt), "San Andreas Army"); }
- case 288 : { format(returnt,sizeof(returnt), "Desert Sheriff"); }
- case 289 : { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- case 290 : { format(returnt,sizeof(returnt), "Ken Rosenberg"); }
- case 291 : { format(returnt,sizeof(returnt), "Desert Sheriff"); }
- case 292 : { format(returnt,sizeof(returnt), "Cesar Vialpando"); }
- case 293 : { format(returnt,sizeof(returnt), "Jeffrey OG Loc Cross"); }
- case 294 : { format(returnt,sizeof(returnt), "Wu Zi Mu (Woozie)"); }
- case 295 : { format(returnt,sizeof(returnt), "Michael Toreno"); }
- case 296 : { format(returnt,sizeof(returnt), "Jizzy B."); }
- case 297 : { format(returnt,sizeof(returnt), "Madd Dogg"); }
- case 298 : { format(returnt,sizeof(returnt), "Catalina"); }
- case 299 : { format(returnt,sizeof(returnt), "Claude"); }
- default: { format(returnt,sizeof(returnt), "INVALID_SKIN_ID"); }
- }
- return returnt;
- }
- stock strrest(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[128];
- while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- FC:AMoneyHack()
- {
- for ( new i = 0 ; i < MAX_PLAYERS ; i ++ )
- {
- new ch[40];
- format(ch, sizeof(ch), PASTA_CONTAS, GetName(i));
- ResetPlayerMoney(i);
- GivePlayerGrana(i, DOF2_GetInt(ch, "Dinheiro"));
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- AntiWH();
- LevelSetavel();
- if(PlayerProx(playerid) <= 5.0) return PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
- return 1;
- }
- public MudarHora()
- {
- if (minutoss < 60)
- {
- minutoss = minutoss + 1;
- }
- else if (minutoss == 60)
- {
- minutoss = 0;
- hora = hora + 1;
- }
- else if (hora == 24)
- {
- hora = 0;
- dia = dia + 1;
- }
- else if (dia == 30)
- {
- dia = 1;
- }
- SetWorldTime(hora);
- return 1;
- }
- forward RelogioBasico(playerid);
- public RelogioBasico(playerid)
- {
- new year,month,day,hour,minute,second;
- getdate(year,month,day);
- gettime(hour,minute,second);
- new mes[12];
- if(month == 1) { mes = "Janeiro"; }
- else if(month == 2) {mes = "Fevereiro";}
- else if(month == 3) {mes = "Marco";}
- else if(month == 4) {mes = "Abril";}
- else if(month == 5) {mes = "Maio";}
- else if(month == 6) {mes = "Junho";}
- else if(month == 7) {mes = "Julho";}
- else if(month == 8) {mes = "Agosto";}
- else if(month == 9) {mes = "Setembro";}
- else if(month == 10) {mes = "Outubro";}
- else if(month == 11) {mes = "Novembro";}
- else if(month == 12) {mes= "Dezembro";}
- if(hour == 0 && minute >= 0 && minute <= 59) { SetWorldTime(0); }
- if(hour == 1 && minute >= 0 && minute <= 59) { SetWorldTime(1); }
- if(hour == 2 && minute >= 0 && minute <= 59) { SetWorldTime(2); }
- if(hour == 3 && minute >= 0 && minute <= 59) { SetWorldTime(3); }
- if(hour == 4 && minute >= 0 && minute <= 59) { SetWorldTime(4); }
- if(hour == 5 && minute >= 0 && minute <= 39) { SetWorldTime(5); }
- if(hour == 5 && minute >= 40 && minute <= 49) { SetWorldTime(23); }
- if(hour == 5 && minute >= 50 && minute <= 59) { SetWorldTime(22); }
- if(hour == 6 && minute >= 0 && minute <= 9) { SetWorldTime(21); }
- if(hour == 6 && minute >= 30 && minute <= 59) { SetWorldTime(7); }
- if(hour == 7 && minute >= 0 && minute <= 59) { SetWorldTime(7); }
- if(hour == 8 && minute >= 0 && minute <= 59) { SetWorldTime(8); }
- if(hour == 9 && minute >= 0 && minute <= 59) { SetWorldTime(9); }
- if(hour == 10 && minute >= 0 && minute <= 59) { SetWorldTime(10); }
- if(hour == 11 && minute >= 0 && minute <= 59) { SetWorldTime(11); }
- if(hour == 12 && minute >= 0 && minute <= 59) { SetWorldTime(12); }
- if(hour == 13 && minute >= 0 && minute <= 59) { SetWorldTime(13); }
- if(hour == 14 && minute >= 0 && minute <= 59) { SetWorldTime(14); }
- if(hour == 15 && minute >= 0 && minute <= 59) { SetWorldTime(15); }
- if(hour == 16 && minute >= 0 && minute <= 59) { SetWorldTime(16); }
- if(hour == 17 && minute >= 0 && minute <= 59) { SetWorldTime(17); }
- if(hour == 17 && minute >= 35 && minute <= 39) { SetWorldTime(20); }
- if(hour == 17 && minute >= 40 && minute <= 49) { SetWorldTime(21); }
- if(hour == 17 && minute >= 55 && minute <= 59) { SetWorldTime(23); }
- if(hour == 18 && minute >= 0 && minute <= 29) { SetWorldTime(5); }
- if(hour == 19 && minute >= 0 && minute <= 59) { SetWorldTime(4); }
- if(hour == 20 && minute >= 0 && minute <= 59) { SetWorldTime(3); }
- if(hour == 21 && minute >= 0 && minute <= 59) { SetWorldTime(2); }
- if(hour == 22 && minute >= 0 && minute <= 59) { SetWorldTime(1); }
- if(hour == 23 && minute >= 0 && minute <= 59) { SetWorldTime(0); }
- }
- stock PlayerProx(playerid)
- {
- new
- Float: P[3],
- Float: Raio = 0b0110000100000110100010111111100
- ;
- if(GetPlayerPos(playerid, P[0], P[1], P[2]))
- {
- new LOL = -1, Float: gPos, Float: sPos[3];
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(GetPlayerPos(i, sPos[0], sPos[1], sPos[2]))
- {
- sPos[0] -= P[0], sPos[1] -= P[1] , sPos[2] -= P[2];
- gPos = sPos[0] * sPos[0] + sPos[1] * sPos[1] + sPos[2] * sPos[2];
- if(sPos[0] * sPos[0] + sPos[1] * sPos[1] + sPos[2] * sPos[2] < Raio)
- {
- Raio = gPos, LOL = i;
- }
- }
- }
- return LOL;
- }
- return 1;
- }
- stock ConverterTexto(string[])
- {
- for(new arraysize = 0; arraysize < strlen(string); arraysize++)
- {
- if(strfind(string, "â", true) != -1){new pos = strfind(string, "â", true); strdel(string, pos, pos+strlen("â")); strins(string, "™", pos, sizeof(pos));}
- if(strfind(string, "ã", true) != -1){new pos = strfind(string, "ã", true); strdel(string, pos, pos+strlen("ã")); strins(string, "š", pos, sizeof(pos));}
- if(strfind(string, "á", true) != -1){new pos = strfind(string, "á", true); strdel(string, pos, pos+strlen("á")); strins(string, "˜", pos, sizeof(pos));}
- if(strfind(string, "é", true) != -1){new pos = strfind(string, "é", true); strdel(string, pos, pos+strlen("é")); strins(string, "ž", pos, sizeof(pos));}
- if(strfind(string, "ú", true) != -1){new pos = strfind(string, "ú", true); strdel(string, pos, pos+strlen("ú")); strins(string, "“", pos, sizeof(pos));}
- if(strfind(string, "ó", true) != -1){new pos = strfind(string, "ó", true); strdel(string, pos, pos+strlen("ó")); strins(string, "¦", pos, sizeof(pos));}
- if(strfind(string, "ê", true) != -1){new pos = strfind(string, "ê", true); strdel(string, pos, pos+strlen("ê")); strins(string, "Ÿ", pos, sizeof(pos));}
- if(strfind(string, "í", true) != -1){new pos = strfind(string, "í", true); strdel(string, pos, pos+strlen("í")); strins(string, "¢", pos, sizeof(pos));}
- if(strfind(string, "ç", true) != -1){new pos = strfind(string, "ç", true); strdel(string, pos, pos+strlen("ç")); strins(string, "œ", pos, sizeof(pos));}
- if(strfind(string, "ô", true) != -1){new pos = strfind(string, "ô", true); strdel(string, pos, pos+strlen("ô")); strins(string, "§", pos, sizeof(pos));}
- }
- }
- /* Exemplo de uso /\
- CMD:b(playerid, params[])
- {
- new
- message[ 128 ];
- if( sscanf ( params, "s[128]", message ) ) return SendClientMessage( playerid, -1, #Syntax /b [texto] );
- ConverterTexto(message); // <<
- GameTextForAll(message, 3000, 3);
- return true;
- }
- */
- public OnEnterExitModShop(playerid, enterexit, interiorid)
- {
- if(enterexit == 0) return TogglePlayerControllable(playerid, 1);
- else if(enterexit == 1) return TogglePlayerControllable(playerid, 0);
- return 1;
- }
- stock GetPlayerWeaponName(playerid)
- {
- static str[21];
- switch(GetPlayerWeapon(playerid))
- {
- case 0: str = "Unarmed";
- case 1: str = "Brass Knuckles";
- case 2: str = "Golf Club";
- case 3: str = "Nite Stick";
- case 4: str = "Knife";
- case 5: str = "Baseball Bat";
- case 6: str = "Shovel";
- case 7: str = "Pool Cue";
- case 8: str = "Katana";
- case 9: str = "Chainsaw";
- case 10: str = "Purple Dildo";
- case 11: str = "Small White Vibrator";
- case 12: str = "Large White Vibrator";
- case 13: str = "Silver Vibrator";
- case 14: str = "Flowers";
- case 15: str = "Cane";
- case 16: str = "Grenade";
- case 17: str = "Tear Gas";
- case 18: str = "Molotov Cocktail";
- case 22: str = "9mm";
- case 23: str = "Silenced 9mm";
- case 24: str = "Desert Eagle";
- case 25: str = "Shotgun";
- case 26: str = "Sawn-off Shotgun";
- case 27: str = "Combat Shotgun";
- case 28: str = "Micro SMG";
- case 29: str = "MP5";
- case 30: str = "AK-47";
- case 31: str = "M4";
- case 32: str = "Tec9";
- case 33: str = "Country Rifle";
- case 34: str = "Sniper Rifle";
- case 35: str = "Rocket Launcher";
- case 36: str = "HS Rocket Launcher";
- case 37: str = "Flamethrower";
- case 38: str = "Minigun";
- case 39: str = "Satchel Charge";
- case 40: str = "Detonator";
- case 41: str = "Spraycan";
- case 42: str = "Fire Extinguisher";
- case 43: str = "Camera";
- case 44: str = "Nightvision Goggles";
- case 45: str = "Thermal Goggles";
- case 46: str = "Parachute";
- }
- return str;
- }
- /*stock GetProfissao(playerid)
- {
- static str[21];
- switch(Profissao[playerid])
- {
- case 0: str = "Desempregado";
- case 1: str = "Taxista";
- case 2: str = "Assaltante";
- case 3: str = "Seguranca";
- case 4: str = "Carteiro";
- case 5: str = "Caminhoneiro";
- case 6: str = "Medico";
- case 7: str = "Mecanico";
- case 8: str = "Advogado";
- case 9: str = "Aposentado";
- case 10: str = "Policia Militar";
- case 11: str = "Policia Civil";
- case 12: str = "Interpol";
- case 13: str = "Federal";
- case 14: str = "F.B.I";
- case 15: str = "S.W.A.T";
- case 16: str = "Policia Rodoviraria";
- case 17: str = "Sequestrador";
- case 18: str = "Motorista Partiuclar";
- case 19: str = "Mendingo";
- case 20: str = "Jornalista";
- }
- return str;
- }*/
- stock Float: GetDistanceToPlayer(playerid, playerid2)
- {
- new Float: x1,Float: y1,Float: z1,Float: x2,Float: y2,Float: z2;
- if (!IsPlayerConnected(playerid) || !IsPlayerConnected(playerid2))
- {
- return -1.00;
- }
- GetPlayerPos(playerid, x1, y1, z1);
- GetPlayerPos(playerid2, x2, y2, z2);
- return floatsqroot(floatpower(floatabs(floatsub(x2, x1)), 2) + floatpower(floatabs(floatsub(y2, y1)), 2) + floatpower(floatabs(floatsub(z2, z1)), 2));
- }
- stock nome(playerid)
- {
- new nj[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nj, sizeof(nj));
- return nj;
- }
- forward LevelSetavel();
- public LevelSetavel()
- {
- for (new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- new sFile[60];
- format(sFile, sizeof(sFile), PASTA_CONTAS, GetName(i));
- SetPlayerScore(i, DOF2_GetInt(sFile, "Level"));
- }
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- new String[60];
- if(PlayerInfo[playerid][Logado] == 0) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não logou então não pode usar nenhum comando.");
- if(!IsAdmin[playerid])
- {
- if(EstaPreso[playerid] == 1) return SendClientMessage(playerid, 0xFF0000AA, "Você não pode digitar nenhum comando na cadeia.");
- }
- if(!success)
- {
- format(String, sizeof(String), "( Info - Server ) O Comando '%s' é Inválido!", cmdtext);
- return SendClientMessage(playerid, Vermelho, String);
- }
- return true;
- }
- /* Sistema de Dominios */
- CMD:dominar(playerid)
- {
- if(IsPlayerInPSkate(playerid))
- {
- if(Dominando[playerid] == 1) return SendClientMessage(playerid, Vermelho, "( Info ) Você já está dominando este território");
- if(AlguemDominando == 1) return SendClientMessage(playerid, Vermelho, "( Info ) Alguem já está dominando este território! Aguarde");
- new string[100];
- Dominando[playerid] = 1;
- ProvocouSkate[playerid] = 1;
- AlguemDominando = 1;
- format(string, sizeof(string), "( GangZones ) %s está tentando dominar a pista de skate!", GetName(playerid));
- SendClientMessageToAll(Amarelo, string);
- SendClientMessage(playerid, Amarelo, "( Info - GZ ) Você está Dominando a Pista de Skate.. Aguarde 1 Minuto");
- TempoGuerraSkate = SetTimerEx("GuerraSkate", 60000, 0, "i", playerid);
- GangZoneFlashForAll(GzParque, Branco);
- }
- else
- {
- SendClientMessage(playerid, Vermelho, "Você não está em nenhum território!");
- }
- return 1;
- }
- stock IsPlayerInPSkate(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(x >= 1861.328 && y >= -1455.078 && x <= 1972.656 && y <= -1349.609) return 1;
- else return 0;
- }
- FC:GuerraSkate(playerid)
- {
- if(IsPlayerInPSkate(playerid))
- {
- new string[100];
- GangZoneStopFlashForAll(GzParque);
- GangZoneShowForAll(GzParque, GetPlayerColor(playerid));
- Dominando[playerid] = 0;
- ProvocouSkate[playerid] = 0;
- AlguemDominando = 0;
- KillTimer(TempoGuerraSkate);
- format(string, sizeof(string), "( GangZones ) %s conseguiu dominar a pista de skate!", GetName(playerid));
- SendClientMessageToAll(Amarelo, string);
- SendClientMessage(playerid, Amarelo, "( Info - GZ ) Você dominou um território e ganhou 200R$.");
- GivePlayerGrana(playerid, 200);
- }
- else
- {
- GangZoneStopFlashForAll(GzParque);
- GangZoneShowForAll(GzParque, 0xFF000096);
- }
- return 1;
- }
- /* Sistema de Dominios */
- /* Lista de Comandos do Servidor */
- CMD:admins(playerid)
- {
- SendClientMessage(playerid, Verde, "» Adminstradores Online:");
- new Jogador[24];
- new count = 0;
- new msg[120];
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && IsAdmin[i])
- {
- GetPlayerName(i, Jogador, 24);
- format(msg, sizeof(msg), "%s (%d)", Jogador, i);
- SendClientMessage(playerid, 0xFFFFFFAA, msg);
- count++;
- }
- }
- if (count == 0){}
- return 1;
- }
- CMD:vips(playerid)
- {
- SendClientMessage(playerid, Verde, "» Jogados Vips Online:");
- new Jogador[24];
- new count = 0;
- new msg[120];
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && IsVip[i])
- {
- GetPlayerName(i, Jogador, 24);
- format(msg, sizeof(msg), "%s (%d)", Jogador, i);
- SendClientMessage(playerid, 0xFFFFFFAA, msg);
- count++;
- }
- }
- if (count == 0){}
- return 1;
- }
- CMD:test1(playerid)
- {
- SetPlayerAttachedObject(playerid, 1, 2630, 1, 0.800000, 0.000000, 0.000000, 156.986312, 100.000000, 20.000000, 1.332795, 2.000000, 1.486337);
- return 1;
- }
- CMD:test2(playerid)
- {
- SetPlayerAttachedObject(playerid, 1, 3074, 1, 0.800000, 0.000000, 0.000000, 156.986312, 100.000000, 20.000000, 1.332795, 2.000000, 1.486337);
- return 1;
- }
- CMD:test3(playerid)
- {
- SetPlayerAttachedObject(playerid, 1, 1314, 1, 0.800000, 0.000000, 0.000000, 156.986312, 100.000000, 20.000000, 1.332795, 2.000000, 1.486337);
- return 1;
- }
- CMD:equipamentos(playerid)
- {
- if(Equipado[playerid] == 0)
- {
- SetPlayerAttachedObject(playerid, 0 , 19142 , 11 , 0.1, 0.05, 0.0, 0.0, 0.0, 0.0);
- SetPlayerAttachedObject(playerid, 1 , 19141 , 12 , 0.11, 0.0, 0.0, 0.0, 0.0, 0.0);
- SetPlayerAttachedObject(playerid, 2 , 18637 , 13 , 0.35, 0.0, 0.0, 0.0, 0.0, 180.0);
- SetPlayerAttachedObject(playerid, 3 , 18642 , 14 , 0.1, 0.0, -0.11, 0.0, -90.0, 90.0);
- SendClientMessage(playerid, Vermelho, "( Info ) Você colocou seus equipamentos de batalha!");
- }
- else if(Equipado[playerid] == 1)
- {
- SendClientMessage(playerid, Vermelho, "( Info ) Você removeu seus equipamentos de batalha!");
- RemovePlayerAttachedObject(playerid, 0);
- RemovePlayerAttachedObject(playerid, 1);
- RemovePlayerAttachedObject(playerid, 2);
- RemovePlayerAttachedObject(playerid, 3);
- }
- return 1;
- }
- CMD:primeirapessoa(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "( Erro ) O Modo Primeira Pessoa não pode ser usado em Carros.");
- if(PrimeiraPessoa[playerid] == 0)
- {
- PrimeiraPessoa[playerid] = 1;
- SendClientMessage(playerid, Vermelho, "( Info ) O Modo 1º Pessoa Foi Ativado, Entre em um Carro para ativar o modo.");
- SetPVarInt(playerid, #Object, CreateObject(18698, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
- AttachObjectToPlayer(GetPVarInt(playerid, #Object), playerid, 0.0190, 0.1059, 0.5557, 88.0, 0.0, 87.0);
- //AttachCameraToObject(playerid, GetPVarInt(playerid, #Object));
- }
- else if(PrimeiraPessoa[playerid] == 1)
- {
- PrimeiraPessoa[playerid] = 0;
- SendClientMessage(playerid, Vermelho, "( Info ) O Modo 1º Pessoa Foi Desativado.");
- DestroyObject(GetPVarInt(playerid, #Object));
- DeletePVar(playerid, #Object);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- CMD:relatorio(playerid, params[])
- {
- new text[128], str[256];
- if(sscanf(params,"s", text)) return SendClientMessage(playerid, Vermelho ,"Use: /relatorio [Texto]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerAdmin(playerid) && IsAdmin[playerid] == 1)
- {
- format(str ,sizeof(str),"[ Relatório ] %s (%d) : %s", GetName(playerid), i , text);
- SendClientMessage(i, Verde, str);
- }
- SendClientMessage(playerid, Amarelo ,"( Info ) Relatório Enviado com Sucesso!");
- }
- return 1;
- }
- /* Comandos Adminstradores */
- CMD:alterarcela(playerid, params[])
- {
- new cela, id, str[60];
- if(Profissao[playerid] <= 15 && 10 >= Profissao[playerid] || IsAdmin[playerid] == 1)
- {
- if(sscanf(params, "ui", id, cela)) return SendClientMessage(playerid, Vermelho ,"Use: /alterarcela <playerid> < 1 | 2 | 3 >");
- if(cela > 3) return SendClientMessage(playerid, Vermelho ,"( Erro ) Cela Inválida.");
- if(!EstaPreso[id]) return SendClientMessage(playerid, Vermelho ,"( Erro ) Este jogador não está preso.");
- if(cela == 1)
- {
- Cela1[id] = 1;
- SetPlayerPos(id, 264.0872 , 77.3831 , 1001.0391);
- SetPlayerInterior(id, 6);
- format(str ,sizeof(str),"( Info ) O Adminstrador %s alterou sua cela.", GetName(playerid));
- SendClientMessage(id, Verde, str);
- }
- else if(cela == 2)
- {
- SetPlayerPos(id, 263.7667 , 82.3926 , 1001.0391);
- SetPlayerInterior(id, 6);
- Cela2[id] = 1;
- format(str ,sizeof(str),"( Info ) O Adminstrador %s alterou sua cela.", GetName(playerid));
- SendClientMessage(id, Verde, str);
- }
- else if(cela == 3)
- {
- SetPlayerPos(id, 263.6069 , 87.0886 , 1001.0391);
- SetPlayerInterior(id, 6);
- Cela3[id] = 1;
- format(str ,sizeof(str),"( Info ) O Adminstrador %s alterou sua cela.", GetName(playerid));
- SendClientMessage(id, Verde, str);
- }
- }
- return 1;
- }
- CMD:prender(playerid, params[])
- {
- new prenderid, tempo, str[80];
- if(Profissao[playerid] <= 15 && 10 >= Profissao[playerid] || IsAdmin[playerid] == 1)
- {
- format(str, sizeof(str), PASTA_CONTAS, GetName(prenderid));
- if(sscanf(params, "ui", prenderid, tempo)) return SendClientMessage(playerid,0xFF0000AA,"Use: /prender <playerid> <tempo>");
- if(!IsPlayerConnected(prenderid)) return SendClientMessage(playerid,0xFF0000AA,"( Erro ) Este jogador não está online.");
- if(EstaPreso[prenderid] == 1) return SendClientMessage(playerid,0xFF0000AA,"( Erro ) Este jogador já está preso.");
- if(tempo < 0) return SendClientMessage(playerid,0xFF0000AA,"( Erro ) Tempo invalido.");
- format(str, sizeof(str), "( Info - Cadeia ) %s prendeu %s por %d minutos.", GetName(playerid) , GetName(prenderid) , tempo);
- SendClientMessageToAll(0xFF0000AA, str);
- SendClientMessage(prenderid,0xFF0000AA,"( Info - Cadeia ) Você acaba de ser preso!");
- SetPlayerPos(prenderid, 264.0872 , 77.3831 , 1001.0391);
- SetPlayerInterior(prenderid, 6);
- Cela1[prenderid] = 1;
- ResetPlayerWeapons(prenderid);
- EstaPreso[prenderid] = 1;
- TimerPreso[prenderid] = SetTimerEx("InPrisao", 60000*tempo, false, "i", prenderid);
- DOF2_SetInt(str, "Preso", 1);
- DOF2_SetInt(str, "TempoPreso", TimerPreso[prenderid]);
- }
- else {
- SendClientMessage(playerid, Vermelho, "( Info ) Você não tem permissão!");
- }
- return 1;
- }
- CMD:soltar(playerid, params[])
- {
- new prenderid, str[80];
- if(Profissao[playerid] <= 15 && 10 >= Profissao[playerid] || IsAdmin[playerid] == 1)
- {
- format(str, sizeof(str), PASTA_CONTAS, GetName(prenderid));
- if(sscanf(params, "u", prenderid)) return SendClientMessage(playerid,0xFF0000AA,"Use: /soltar <playerid>");
- if(!IsPlayerConnected(prenderid)) return SendClientMessage(playerid,0xFF0000AA,"( Erro ) Este jogador não está online.");
- if(EstaPreso[prenderid] == 0) return SendClientMessage(playerid,0xFF0000AA,"( Erro ) Este jogador não está preso.");
- format(str, sizeof(str), "( Info - Cadeia ) %s soltou %s da prisão", GetName(playerid), GetName(prenderid));
- SendClientMessageToAll(0xFF0000AA, str);
- SendClientMessage(prenderid,0xFF0000AA,"( Info - Cadeia ) Você acaba de ser solto!");
- SetPlayerPos(prenderid, 252.9100,67.8120,1003.6406);
- SetPlayerInterior(prenderid, 6);
- EstaPreso[prenderid] = 0;
- Cela1[prenderid] = 0;
- Cela2[prenderid] = 0;
- Cela3[prenderid] = 0;
- KillTimer(TimerPreso[prenderid]);
- DOF2_SetInt(str, "Preso", 0);
- DOF2_SetInt(str, "TempoPreso", 0);
- }
- else {
- SendClientMessage(playerid, Vermelho, "( Info ) Você não tem permissão!");
- }
- return 1;
- }
- forward InPrisao(prenderid);
- public InPrisao(prenderid)
- {
- new str[80];
- format(str, sizeof(str), PASTA_CONTAS, GetName(prenderid));
- SetPlayerPos(prenderid, 252.9100,67.8120,1003.6406);
- SetPlayerInterior(prenderid, 6);
- EstaPreso[prenderid] = 0;
- Cela1[prenderid] = 0;
- Cela2[prenderid] = 0;
- Cela3[prenderid] = 0;
- KillTimer(TimerPreso[prenderid]);
- DOF2_SetInt(str, "Preso", 0);
- DOF2_SetInt(str, "TempoPreso", 0);
- SendClientMessage(prenderid, Vermelho, "( Info - Cadeia ) Você cumpriu sua pena e foi solto da cadeia!");
- return 1;
- }
- CMD:darcombustivel(playerid, params[])
- {
- new quant, dString[126], id;
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "ud", id, quant)) return SendClientMessage(playerid, 0xF0F0F0AA, "Use: /darcombustivel [id] [quantia]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xF0F0F0AA, "( Erro ) Jogador não conectado");
- if(0 < quant > 139) return SendClientMessage(playerid, 0xF0F0F0AA, "( Erro ) Quantia entre 0 e 140");
- format(dString, sizeof(dString), PASTA_CONTAS, GetName(id));
- Gasolina[id] = quant;
- DOF2_SetInt(dString, "Gasolina", quant);
- format(dString, sizeof(dString), "( AdminCMD ) Você colocou %d Litros no combustível de %s.", quant);
- SendClientMessage(playerid, Amarelo, dString);
- format(dString, sizeof(dString), "( AdminCMD ) O Adminstrador %s colocou %d Litros de Gasolina Em Seu Combustível.", GetName(playerid), quant);
- SendClientMessage(id, Amarelo, dString);
- return true;
- }
- CMD:dargrana(playerid, params[])
- {
- new wGrana, Wc1[30], Wc2[30], wString[126], id;
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "ud", id, wGrana)) return SendClientMessage(playerid, 0xF0F0F0AA, "Use: /dargrana [ID] [Quantia]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xF0F0F0AA, "( Erro ) Jogador não conectado");
- GetPlayerName(playerid, Wc1, 23);
- GetPlayerName(id, Wc2, 23);
- GivePlayerMoney(id, wGrana);
- format(wString, sizeof(wString), PASTA_CONTAS, GetName(id));
- DOF2_SetInt(wString, "Dinheiro", DOF2_GetInt(wString, "Dinheiro") + wGrana);
- format(wString, sizeof(wString), "{FFFF00}( AdminCMD ) Você deu {009900}$%d {FFFF00} para o jogador %s.", wGrana, Wc2);
- SendClientMessage(playerid, Amarelo, wString);
- format(wString, sizeof(wString), "{FFFF00}( AdminCMD ) Você ganhou {009900}$%d {FFFF00}do admin %s.", wGrana, Wc1);
- SendClientMessage(id, Amarelo, wString);
- return true;
- }
- CMD:tirargrana(playerid, params[])
- {
- new wGrana, Wc1[30], Wc2[30], wString[126], id;
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "ud", id, wGrana)) return SendClientMessage(playerid, 0xF0F0F0AA, "Use: /retirargrana [ID] [Quantia]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xF0F0F0AA, "( Erro ) Jogador não conectado");
- GetPlayerName(playerid, Wc1, 23);
- GetPlayerName(id, Wc2, 23);
- GivePlayerMoney(id, -wGrana);
- format(wString, sizeof(wString), "{FFFF00}( AdminCMD ) Você tirou{FF4F4F}-$%d {FFFF00}do jogador %s.", wGrana, Wc2);
- SendClientMessage(playerid, Amarelo, wString);
- format(wString, sizeof(wString), "{FFFF00}( AdminCMD ) Você perdeu {FF4F4F}-$%d {FFFF00} do admin %s.", wGrana, Wc1);
- SendClientMessage(id, Amarelo, wString);
- return true;
- }
- CMD:desbugar(playerid, params[])
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new Ele;
- if(sscanf(params, "u", Ele)) return SendClientMessage(playerid, Vermelho, "Use: /spawn (ID ou Nome)");
- if(!IsPlayerConnected(Ele)) return SendClientMessage(playerid, Vermelho, "( Erro ) O Jogador está offline!");
- SpawnPlayer(Ele);
- SendClientMessage(Ele, coradmin, "( AdminCMD ) Você foi spawnado por um adminstrador.");
- return true;
- }
- CMD:cv(playerid, params[])
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new vehicle, id, Float:X, Float:Y, Float:Z, Float:A;
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /cv [400-611]");
- if (id >= 400 && id <= 611)
- {
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- vehicle = CreateVehicle(id, X, Y, Z, A, -1, -1, 30000);
- PutPlayerInVehicle(playerid, vehicle, 0);
- }
- else
- {
- SendClientMessage(playerid, Vermelho, "( Erro ) ID's de 400 a 611.");
- }
- return 1;
- }
- CMD:dv(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new vid;
- vid = GetPlayerVehicleID(playerid);
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho,"( Erro ) Você não está em um carro!");
- DestroyVehicle(vid);
- SendClientMessage(playerid, 0x0080FFAA ,"( Info ) Veiculo deletado com sucesso!");
- return 1;
- }
- CMD:reparar(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não é um adminstrador");
- new vid = GetPlayerVehicleID(playerid);
- if(!vid) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não está em um veículo!");
- RepairVehicle(vid);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
- return 1;
- }
- CMD:rv(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new string[140+24];
- for (new v; v < MAX_VEHICLES; v++) SetVehicleToRespawn(v);
- format(string,sizeof(string), "( AdminCMD ) O Adminstrador %s Respawnou Todos os Veículos.", GetName(playerid));
- SendClientMessageToAll(Verde, string);
- return 1;
- }
- CMD:setlevel(playerid, params[])
- {
- new id, qnt , sFile[60], dString[32];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "ui", id, qnt)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /setlevel [id] [quantia]");
- format(dString, sizeof(dString), PASTA_CONTAS, GetName(id));
- format(sFile, sizeof(sFile), "( Info ) Você setou o level do jogador %s para: %d", GetName(id), qnt);
- SendClientMessage(playerid, Amarelo, sFile);
- //DOF2_SetInt(sFile, "Level", qnt);
- DOF2_SetInt(dString, "Level", qnt);
- Level[id] = qnt;
- return 1;
- }
- CMD:gmx(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new dString[100];
- format(dString, sizeof(dString), "( GMX ) O Adminstrador %s deu GMX No Servidor! Seus Dados Foram Salvos!", GetName(playerid));
- SendClientMessage(playerid, Amarelo, dString);
- dLoop(i)
- {
- SalvarDados(i);
- }
- SendRconCommand("gmx");
- return 1;
- }
- CMD:salvardados(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new dString[100];
- format(dString, sizeof(dString), "( Info - Dados ) O Adminstrador %s vai reiniciar o servidor e seus dados foram salvos!", GetName(playerid));
- SendClientMessage(playerid, Amarelo, dString);
- dLoop(i)
- {
- SalvarDados(i);
- }
- return 1;
- }
- CMD:darlevel(playerid, params[])
- {
- new id, qnt , sFile[60], dString[32];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "ui", id, qnt)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /darlevel [id] [quantia]");
- format(dString, sizeof(dString), PASTA_CONTAS, GetName(id));
- format(sFile, sizeof(sFile), "( Info ) Você deu para o jogador %s, %d Leveis", GetName(id), qnt);
- SendClientMessage(playerid, Amarelo, sFile);
- DOF2_SetInt(sFile, "Level", DOF2_GetInt(sFile, "Level")+qnt);
- Level[id] = Level[id]+qnt;
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- new id, mot , sFile[60];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "us", id, mot)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /ban [id] [motivo]");
- if(DOF2_GetInt("/Contas/Banidos/JogadoresBanidos.ini", GetName(id)) == 1) return SendClientMessage(playerid, 0xFF4500AA, "( Erro ) Este jogador já está banido do servidor!");
- format(sFile, sizeof(sFile), "( Info - Ban ) O Jogador %s Foi Banido !", GetName(id));
- SendClientMessage(playerid, Amarelo, sFile);
- DOF2_SetInt("/Contas/Banidos/JogadoresBanidos.ini", GetName(id), 1);
- Ban(id);
- DOF2_SaveFile();
- return 1;
- }
- CMD:banirnick(playerid, params[])
- {
- new nick[24] , sFile[60];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "s", nick)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /banirnick [Nick]");
- format(sFile, sizeof(sFile), "( Info - Ban ) O Nick %s Foi Banido !", nick);
- SendClientMessage(playerid, Amarelo, sFile);
- DOF2_SetInt("/Contas/Banidos/NicksBanidos.ini", nick, 1);
- DOF2_SaveFile();
- return 1;
- }
- CMD:jetpack(playerid)
- {
- if(!IsAdmin[playerid] && TemJP[playerid] == 0) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "Você não pode usar um jetpack dentro de um veículo.");
- SetPlayerSpecialAction(playerid, 2);
- PJetPack[playerid] = 1;
- return 1;
- }
- CMD:setprof(playerid,params[])
- {
- if(!IsAdmin[playerid] && TemJP[playerid] == 0) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new id, prof, like[128];
- if(sscanf(params, "ui", id, prof)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /setprof [id] [0-20]");
- Profissao[playerid] = prof;
- format(like, sizeof(like), "( AdminCMD ) Você alterou a profissão de %s para número : %d!", GetName(id), prof);
- SendClientMessage(playerid, Verde, like);
- format(like, sizeof(like), "( AdminCMD ) O Adminstrador %s alterou sua profissão para número %d!", GetName(playerid), prof);
- SendClientMessage(playerid, Verde, like);
- format(like, sizeof(like), PASTA_CONTAS, GetName(id));
- DOF2_SetInt(like, "Profissao", prof);
- SpawnPlayer(id);
- AtualizarCores(id);
- AtualizarCSpawn(id);
- AtualizarLabel(id);
- DOF2_SaveFile();
- return 1;
- }
- CMD:setadmin(playerid,params[])
- {
- new id, level, oi[100], string[150];
- if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /setadmin [id] [0/1]");
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Vermelho, "( Erro ) Jogador não conectado.");
- if(level > 2) return SendClientMessage(playerid, Vermelho, "( Erro ) Use '0' Para Retirar e '1' Para Colocar..");
- if(level == 1)
- {
- IsAdmin[id] = 1;
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Admin ) %s Setou Você como Membro da Adminstração..", GetName(playerid));
- SendClientMessage(id, -1 ,string);
- SendClientMessage(id, -1 , "( Info ) Bem Vindo a Adminstração do Servidor!");
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Info ) Você promoveu %s para de adminstrador...", GetName(id));
- format(oi, sizeof(oi), PASTA_CONTAS, GetName(id));
- DOF2_SetInt(oi, "NivelAdmin", 1);
- AtualizarLabel(id);
- }
- else if(level == 0)
- {
- IsAdmin[id] = 0;
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Info ) %s Retirou Você da Adminstração..", GetName(playerid));
- SendClientMessage(id, -1 ,string);
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Info ) Você retirou %s da adminstração...", GetName(id));
- SendClientMessage(playerid, Vermelho ,string);
- format(oi, sizeof(oi), PASTA_CONTAS, GetName(id));
- DOF2_SetInt(oi, "NivelAdmin", 0);
- AtualizarLabel(id);
- }
- return 1;
- }
- CMD:setvip(playerid,params[])
- {
- new id, level, oi[100], string[150];
- if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /setvip [id] [0/1]");
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Vermelho, "( Erro ) Jogador não conectado.");
- if(level > 2) return SendClientMessage(playerid, Vermelho, "( Erro ) Use '0' Para Retirar e '1' Para Colocar..");
- if(level == 1)
- {
- IsVip[id] = 1;
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ V.I.P ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Vip ) %s setou você como um membro Vip!!", GetName(playerid));
- SendClientMessage(id, -1 ,string);
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ V.I.P ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Info ) Você promoveu %s para de adminstrador...", GetName(id));
- format(oi, sizeof(oi), PASTA_CONTAS, GetName(id));
- DOF2_SetInt(oi, "Vip", 1);
- }
- else if(level == 0)
- {
- IsVip[id] = 0;
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ V.I.P ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Info ) %s retirou seu vip! Seu Prazo de Vip Acabou.", GetName(playerid));
- SendClientMessage(id, -1 ,string);
- SendClientMessage(id, Verde , "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ V.I.P ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- format(string, sizeof(string),"( Info ) Você retirou o VIP do Jogador: %s ...", GetName(id));
- SendClientMessage(playerid, Vermelho ,string);
- format(oi, sizeof(oi), PASTA_CONTAS, GetName(id));
- DOF2_SetInt(oi, "Vip", 0);
- }
- return 1;
- }
- CMD:test(playerid)
- {
- dLoop(i){AtualizarLabel(i);return true;}
- return 1;
- }
- CMD:trazerall(playerid)
- {
- new index = -1, Float:pos[3], sTr[100];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- while(++index < MAX_PLAYERS)
- {
- SetPlayerPos(index, pos[0], pos[1], pos[2]);
- format(sTr, sizeof(sTr), "( AdminCMD ) O Adminstrador %s puxou todos para a sua posição!", GetName(playerid));
- SendClientMessageToAll(coradmin, sTr);
- }
- return 1;
- }
- CMD:ejetar(playerid,params[])
- {
- new id, string[150];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params,"u", id)) return SendClientMessage(playerid,0xF6DF00AA,"( Erro ) Uso correto: /ejetar [ID do Jogador]");
- if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid,0xF60000AA,"( Erro ) Este jogador não esta em um veiculo.");
- format(string, sizeof(string),"( AdminCMD ) O administrador %s removeu você do veiculo.", GetName(playerid));
- SendClientMessage(id, coradmin ,string);
- format(string, sizeof(string),"( AdminCMD ) Você removeu o jogador %s do veiculo.", GetName(id));
- SendClientMessage(playerid, coradmin ,string);
- RemovePlayerFromVehicle(id);
- return 1;
- }
- CMD:injetar(playerid,params[])
- {
- new id, string[150];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params,"u", id)) return SendClientMessage(playerid,0xF6DF00AA,"( Erro ) Uso correto: /injetar [ID do Jogador]");
- format(string, sizeof(string),"( AdminCMD ) O administrador %s injetou você no veiculo.", GetName(playerid));
- SendClientMessage(id, coradmin ,string);
- format(string, sizeof(string),"( AdminCMD ) Você Injetou o jogador %s no veiculo.", GetName(id));
- SendClientMessage(playerid, coradmin ,string);
- PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1);
- return 1;
- }
- CMD:ecarona(playerid,params[])
- {
- new id, string[150];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params,"u", id)) return SendClientMessage(playerid,0xF6DF00AA,"( Erro ) Uso correto: /ecarona [ID do Jogador]");
- format(string, sizeof(string),"( AdminCMD ) Você Entrou no carro do jogador %s.", GetName(id));
- SendClientMessage(playerid, coradmin ,string);
- new vid;
- vid = GetPlayerVehicleID(id);
- PutPlayerInVehicle(playerid, vid, 1);
- return 1;
- }
- CMD:virar(playerid)
- {
- new Float:X, Float:Y, Float:Z;
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"( Erro ) Você não está em um veiculo!");
- SetCameraBehindPlayer(playerid);
- GetPlayerPos(playerid, X, Y, Z);
- SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
- return 1;
- }
- CMD:limparchat(playerid)
- {
- new string[70];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- for(new i=0; i < 0xF; i++){SendClientMessageToAll(0xFFFFFFFF, " ");}
- format(string, sizeof(string), "( AdminCMD ) O Admin %s limpou o chat!", GetName(playerid));
- SendClientMessageToAll(coradmin,string);
- return 1;
- }
- cmd(trazer, playerid, params[])
- {
- new ID , string[120];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "Use: /trazer (ID)");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "( Erro ) Id Invalido!");
- format(string, 120, "( AdminCMD ) Você trouxe '%s' (%d) até a sua posição.", GetName(ID), ID);
- SendClientMessage(playerid, coradmin, string);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(ID, x, y, z);
- SetPlayerInterior(ID, GetPlayerInterior(playerid));
- if(IsPlayerInAnyVehicle(playerid))
- {
- new VehicleID;
- VehicleID = GetPlayerVehicleID(playerid);
- SetVehiclePos(VehicleID, x + 1, y + 1, z);
- PutPlayerInVehicle(playerid, VehicleID, 0);
- }
- return 1;
- }
- cmd(ir, playerid, params[])
- {
- new ID , string[120];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "Use: /ir (ID)");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "( Erro ) Id Invalido!");
- format(string, 120, "( AdminCMD ) Você se teleportou até: '%s' (%d)", GetName(ID), ID);
- SendClientMessage(playerid, coradmin, string);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(ID, x, y, z);
- SetPlayerPos(playerid, x, y, z);
- SetPlayerInterior(playerid, GetPlayerInterior(ID));
- if(IsPlayerInAnyVehicle(playerid))
- {
- new VehicleID;
- VehicleID = GetPlayerVehicleID(playerid);
- SetVehiclePos(VehicleID, x + 1, y + 1, z);
- PutPlayerInVehicle(playerid, VehicleID, 0);
- }
- return 1;
- }
- cmd(congelar, playerid, params[])
- {
- new ID , string[120];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "Use: /congelar (id)");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "( Erro ) Id Invalido.");
- format(string, 120, "( AdmCMD ) Você congelou o jogador: '%s' (%d)", GetName(ID), ID);
- SendClientMessage(playerid, coradmin, string);
- format(string, 120, "( AdmCMD ) O Adminstrador %s (%d) Congelou Você.", GetName(playerid), playerid);
- SendClientMessage(ID, coradmin, string);
- TogglePlayerControllable(ID, 0);
- return 1;
- }
- cmd(descongelar, playerid, params[])
- {
- new ID , string[120];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "Use: /descongelar (id)");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "( Erro ) Id Invalido");
- format(string, 120, "( AdmCMD ) Você descongelou o jogador: '%s' (%d)", GetName(ID), ID);
- SendClientMessage(playerid, coradmin, string);
- format(string, 120, "( AdmCMD ) O Adminstrador %s (%d) Descongelou Você.", GetName(playerid), playerid);
- SendClientMessage(ID, coradmin, string);
- TogglePlayerControllable(ID, 1);
- return 1;
- }
- CMD:dararma(playerid, params[])
- {
- new pid, arma, string[120];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid, Vermelho, "( Erro ) ID invalido.");
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, Vermelho, "( Erro ) Usuario não conectado.");
- if(sscanf(params, "ui", pid, arma)) return SendClientMessage(playerid, Vermelho, "Use: /dararma [id] [quantia]");
- format(string, 120, "( AdmCMD ) O Adminstrador %s (%d) Deu para você a Arma: %s.", GetName(playerid), playerid, GetPlayerWeaponName(playerid));
- SendClientMessage(playerid, 0x00FF40AA, string);
- GivePlayerWeapon(pid, arma, 400);
- return 1;
- }
- CMD:av(playerid, params[])
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- new text[128], str[256];
- if(sscanf(params,"s", text))return SendClientMessage(playerid, Vermelho ,"Use: /av [Texto]");
- format(str ,sizeof(str),"[ Mensagem da Adminstração ] %s (%d) : %s", GetName(playerid), playerid , text);
- SendClientMessageToAll(Verde, str);
- return 1;
- }
- CMD:climas(playerid)
- {
- if(!IsAdmin[playerid] && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "Você não é um adminstrador");
- ShowPlayerDialog(playerid, CLIMA, DIALOG_STYLE_LIST, "Tempos", "Clima\nHora", "Selecionar", "Cancelar");
- return 1;
- }
- CMD:clima(playerid, params[])
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Info ) Você não tem permissão para usar este comando!");
- new Clima, Nome[MAX_PLAYER_NAME], String[100];
- if(sscanf(params, "d", Clima)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /clima [0 a 45]");
- if(Clima <= 0 && Clima >= 46) return SendClientMessage(playerid, 0xFF4500AA, "( Erro ) O clima precisa ser entre 1 a 45!");
- if(Clima <= 0) return SendClientMessage(playerid, 0xFF4500AA, "( Erro ) O clima precisa ser entre 1 a 45!");
- if(Clima >= 1 && Clima < 46)
- SetWeather(Clima);
- GetPlayerName(playerid, Nome, sizeof(Nome));
- format(String, sizeof(String), "( AdminCMD ) %s mudou o clima para (%d)", Nome,Clima);
- SendClientMessageToAll(coradmin, String);
- return true;
- }
- CMD:espiar(playerid, params[])
- {
- new specplayerid , Ele, string[150];
- if(sscanf(params, "u", Ele)) return SendClientMessage(playerid, 0x0000FFAA, "Use: /espiar (Id)");
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, specplayerid);
- SetPlayerInterior(playerid, GetPlayerInterior(specplayerid));
- gSpectateID[playerid] = specplayerid;
- gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
- format(string, sizeof(string), "( AdminCMD ) Você está espiando o Jogador: %s (%d)", GetName(Ele), Ele);
- SendClientMessage(Ele, corpc1, string);
- return 1;
- }
- CMD:pararespiar(playerid, params[])
- {
- new Ele, string[150];
- if(sscanf(params, "u", Ele)) return SendClientMessage(playerid, 0x0000FFAA, "Use: /paraespiar (Id)");
- TogglePlayerSpectating(playerid, 0);
- gSpectateID[playerid] = INVALID_PLAYER_ID;
- gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE;
- format(string, sizeof(string), "( AdminCMD ) Você parou de Espiar o Jogador: %s (%d)", GetName(Ele), Ele);
- SendClientMessage(Ele, corpc1, string);
- return 1;
- }
- CMD:ac(playerid, params[])
- {
- new text[128], str[256];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params,"s", text))return SendClientMessage(playerid, Vermelho ,"Use: /ac [Texto]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerAdmin(playerid) && IsAdmin[playerid] == 1)
- {
- format(str ,sizeof(str),"[ Chat da Adminstração ] %s (%d) : %s", GetName(playerid), i , text);
- SendClientMessage(i, Amarelo, str);
- }
- }
- return 1;
- }
- CMD:setskin(playerid, params[])
- {
- new skinid,pid,string[120];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(sscanf(params, "ui", pid, skinid)) return SendClientMessage(playerid, Vermelho, "Use: /setskin [id] [skin]");
- if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid, Vermelho, "( Erro ) ID invalido.");
- if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, Vermelho, "( Erro ) Usuario não conectado.");
- SetPlayerSkin(pid, skinid);
- format(string, 120, "( AdmCMD ) O Adminstrador %s (%d) Alterou sua Skin Para: %d.", GetName(playerid), playerid, skinid);
- SendClientMessage(playerid, 0x00FF40AA, string);
- return 1;
- }
- CMD:pintar(playerid, params[])
- {
- static c1, c2 , string[128];
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho,"( Erro ) Você não está em um carro!");
- if(sscanf(params,"ii", c1, c2)) return SendClientMessage(playerid , 0xF60000AA , "Use: /pintar [cor1] [cor2]!") ;
- ChangeVehicleColor(GetPlayerVehicleID (playerid), c1,c2) ;
- format(string, 128, "( AdminCMD ) Você mudou as cores do veículo para: %d - %d", c1, c2);
- SendClientMessage(playerid, coradmin, string);
- return 1;
- }
- CMD:acmd(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Comandos De Adminstrador", "/jetpack /setskin /ac /av /pararespiar /espiar /clima /climas (< em dialog) /dararma\n/congelar /descongelar /ir /trazer /limparchat /virar /ejetar /ban\n/rv /reparar /cv /dv /trazerall /pintar /setprof /dargrana /retirargrana\n/setvip /darcombustivel /setlevel /darlevel /injetar /ecarona", "Fechar", "");
- return 1;
- }
- /* Fim Comandos Dos Adminstradores */
- CMD:comandos(playerid)
- {
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Comandos Do Servidor", "/pm /creditos /transferir /admnis /apostarlot /relatorio\n/lsamp /jetpack /primeirapessoa /utilitarios /criarconta /entrarconta /banco /senhabanco /licencas /empregos /", "Fechar", "");
- return 1;
- }
- CMD:criarconta(playerid)
- {
- if(!PlayerToPoint(20.0, playerid, 1424.6754, -981.2695, 1639.7843)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não está no Banco Central!");
- new string[140+24];
- format(string, sizeof(string), DIRETORIOB , nome(playerid));
- if(DOF2_FileExists(string)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não pode criar duas contas no banco, para acessar a sua normalmente use: /entrarconta");
- format(string, sizeof(string), "Conta Bancária\n\nSeu Usuário: %s\nInsira uma Senha Bancária para Continuar:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID4, DIALOG_STYLE_INPUT, "Banco - 24/7", string, "Criar", "Cancelar");
- return 1;
- }
- CMD:entrarconta(playerid)
- {
- new string[140+24];
- if(LogadoB[playerid] == true) return SendClientMessage(playerid, Vermelho, "( Info ) Você já está logado em sua conta bancária.");
- format(string, sizeof(string), DIRETORIOB , nome(playerid));
- if(!DOF2_FileExists(string)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não tem uma conta no banco, Para criar uma: /criarconta");
- format(string, sizeof(string), "Conta Bancária\n\nSeu Usuário: %s\n\nInsira sua senha bancária:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_INPUT, "Banco - 24/7", string, "Entrar", "Cancelar");
- return 1;
- }
- CMD:banco(playerid)
- {
- if(!PlayerToPoint(20.0, playerid, 1417.7922, -981.4893, 1639.7843)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não está no Banco Central!");
- new string[140+24];
- if(!LogadoB[playerid]) return SendClientMessage(playerid, Vermelho, "( Info ) Você precisa logar em sua conta bancária.");
- format(string, sizeof(string), DIRETORIOB , nome(playerid));
- if(!DOF2_FileExists(string)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não tem conta bancária, para criar: /criarconta");
- format(string, sizeof(string), "Conta Bancária\nSeu Usuário: %s\n\nQual operação deseja fazer?", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID5, DIALOG_STYLE_MSGBOX, "Banco", string, "Saldo", "Transação");
- return 1;
- }
- CMD:senhabanco(playerid)
- {
- if(!PlayerToPoint(20.0, playerid, 1421.2357, -981.5718, 1639.7843)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não está no Banco Central!");
- new string[140+24];
- if(!LogadoB[playerid]) return SendClientMessage(playerid, Vermelho, "( Info ) Você precisa logar em sua conta bancária.");
- format(string, sizeof(string), "Conta Bancária\nSeu Usuário: %s\nInsira sua senha antiga para continuar:", nome(playerid));
- ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_INPUT, "Banco - 24/7", string, "Confirmar", "Cancelar");
- SenhaB[playerid] = true;
- return 1;
- }
- CMD:utilitarios(playerid)
- {
- if(!PlayerToPoint(20.0, playerid, -29.5713, -185.1213, 1003.5469)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não está na Loja de Utilitários");
- ShowPlayerDialog(playerid, dUtilitarios, DIALOG_STYLE_LIST, "Loja de Utilitários", "Jetpack [ 750.000 {00FF00}R$ {FFFAFA} ]\nLogo SA:MP [ 50.000 {00FF00}R$ {FFFAFA}]\nPrancha de Surf [ 75.000 {00FF00}R$ {FFFAFA}]", "Comprar", "Cancelar");
- return 1;
- }
- CMD:empregos(playerid)
- {
- if(!PlayerToPoint(20.0, playerid, 1490.4816, 1305.5992, 1093.2964)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não está na Central de Empregos");
- ShowPlayerDialog(playerid, dEmpregos, DIALOG_STYLE_LIST, "Empregos", "Profissões de Classe Alta\nProfissões de Classe Média\nProfissões de Classe Baixa\nProfissões do Crime\nFicar Desempregado", "Selecionar", "Cancelar");
- return 1;
- }
- CMD:licencas(playerid)
- {
- if(!PlayerToPoint(20.0, playerid, 822.8384, 3.1775, 1004.1797)) return SendClientMessage(playerid, Vermelho, "( Info ) Você não está no Centro de Licenças");
- ShowPlayerDialog(playerid, dLicencas, DIALOG_STYLE_LIST, "Licenças - Info", "Habilitação Terrestre [ 700 {00FF00}R$ {FFFAFA} ]\nHabilitação Náutica [ 1000 {00FF00}R$ {FFFAFA} ]\nHabilitação Aérea [ 1300 {00FF00}R$ {FFFAFA} ]\nPorte de Armas [ 2500 {00FF00}R$ {FFFAFA} ]", "Selecionar", "Cancelar");
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- new id, text[280];
- if(sscanf(params,"us", id, text))return SendClientMessage(playerid, Vermelho ,"Use: /pm [ID] [Text]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, Vermelho, "( Erro ) Jogador não conectado!");
- format(text, 120, "[ PM - Recebida ] %s (%d): %s", GetName(playerid), playerid, text);
- SendClientMessage(id, 0xFA00FFFF, text);
- format(text, 120, "[ PM - Enviada ] %s (%d): %s", GetName(id), id , text);
- SendClientMessage(playerid, 0xFA00FFFF, text);
- return 1;
- }
- CMD:creditos(playerid)
- {
- SendClientMessage(playerid, corpc1 ,"~~~~~~~~~~~~~~~~~~~~~~ Créditos ~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid, -1 ,"• GameMode Feito e Atualizado Por dPlaYer_");
- SendClientMessage(playerid, -1 ,"• Agracemos a Nossa Equipe e a Você Por Ajudar a Manter o Servidor Online.");
- SendClientMessage(playerid, corpc1 ,"~~~~~~~~~~~~~~~~~~~~~~ Créditos ~~~~~~~~~~~~~~~~~~~~~~");
- return 1;
- }
- CMD:ligarc(playerid, params[])
- {
- new id, dString[50];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /ligarc [id] [quantia]");
- format(dString, sizeof(dString), "( Info ) Você ligou pro jogador %s, aguarde ele atender a chamada! Para Encerrar a Chamada use: /desligarc", GetName(id));
- SendClientMessage(playerid, Verde, dString);
- //
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(id));
- SendClientMessage(playerid, Verde, dString);
- AceitLigacao[id] = 1;
- SetTimerEx("AceitarLigacao", 1000, true, "i", id);
- LigadorCel[playerid] = playerid;
- RecebedorCel[playerid] = id;
- return 1;
- }
- forward AceitarLigacao(playerid);
- public AceitarLigacao(playerid)
- {
- new dString[100];
- if(AceitLigacao[playerid] == 1)
- {
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(LigadorCel[playerid]));
- SendClientMessage(playerid, Verde, dString);
- AceitLigacao[playerid] = 2;
- }
- if(AceitLigacao[playerid] == 2)
- {
- AceitLigacao[playerid] = 3;
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(LigadorCel[playerid]));
- SendClientMessage(playerid, Verde, dString);
- }
- if(AceitLigacao[playerid] == 3)
- {
- AceitLigacao[playerid] = 4;
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(LigadorCel[playerid]));
- SendClientMessage(playerid, Verde, dString);
- }
- if(AceitLigacao[playerid] == 4)
- {
- AceitLigacao[playerid] = 5;
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(LigadorCel[playerid]));
- SendClientMessage(playerid, Verde, dString);
- }
- if(AceitLigacao[playerid] == 5)
- {
- AceitLigacao[playerid] = 0;
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(LigadorCel[playerid]));
- SendClientMessage(playerid, Verde, dString);
- }
- return true;
- }
- CMD:desligarc(playerid, params[])
- {
- new id, dString[50];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF4500AA, "Use: /ligarc [id] [quantia]");
- format(dString, sizeof(dString), "( Info ) Você ligou pro jogador %s, aguarde ele atender a chamada! Para Encerrar a Chamada use: /desligarc", GetName(id));
- SendClientMessage(playerid, Verde, dString);
- //
- format(dString, sizeof(dString), "( Info ) O Jogador %s está ligando pra você, Para Atender a Chamada use: /atenderc", GetName(id));
- SendClientMessage(playerid, Verde, dString);
- return 1;
- }
- CMD:transferir(playerid, params[])
- {
- new id, quant, string[150];
- if(sscanf(params, "ud", id, quant)) return SendClientMessage(playerid, Vermelho, "Use: /transferir [id] [quantidade]");
- GivePlayerGrana(playerid, -quant);
- GivePlayerGrana(id, quant);
- format(string, sizeof(string),"( Info ) Você enviou à %s [%i] %dR$", GetName(id), id, quant);
- SendClientMessage(playerid, Amarelo, string);
- format(string, sizeof(string),"( Info ) Você recebeu de %s [%i] %dR$", GetName(playerid), playerid, quant);
- SendClientMessage(id, Amarelo, string);
- return true;
- }
- CMD:pgrana(playerid)
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para isto!");
- GivePlayerGrana(playerid, 5000);
- return 1;
- }
- CMD:loteria(playerid,params[])
- {
- if(!IsAdmin[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para isto!");
- LoteriaPublic();
- return 1;
- }
- CMD:lsamp(playerid)
- {
- if(!LogoSAMP[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(PSamp == 0)
- {
- SetPlayerAttachedObject(playerid, 1, 18749, 1, 0.800000, 0.000000, 0.000000, 156.986312, 100.000000, 20.000000, 1.332795, 2.000000, 1.486337);
- SendClientMessage(playerid, 0xFFF000AA, "( Info ) Você acaba de usar o objeto: Logo SA:MP, para remove-lo digite: /lsamp");
- PSamp = 1;
- }
- else if(PSamp == 1)
- {
- SendClientMessage(playerid, 0xFFF000AA, "( Info ) Você acaba de remover o objeto: Logo SA:MP, para coloca-lo digite: /lsamp");
- RemovePlayerAttachedObject(playerid, 1);
- PSamp = 0;
- }
- return 1;
- }
- CMD:psurf(playerid)
- {
- if(!TemPSurf[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Você não tem permissão para usar este comando!");
- if(PSamp == 0)
- {
- SetPlayerAttachedObject(playerid, 2, 2404, 1, 0.051352, -0.140526, -0.077093, 0.000000, 121.550628, 0.000000, 1.000000, 1.000000, 1.000000 ); // CJ_SURF_BOARD - Prancha de surf nas costas
- SendClientMessage(playerid, 0xFFF000AA, "( Info ) Você acaba de usar o objeto: Prancha de Surf, para remove-lo digite: /psurf");
- PSamp = 1;
- }
- else if(PSamp == 1)
- {
- SendClientMessage(playerid, 0xFFF000AA, "( Info ) Você acaba de remover o objeto: Prancha de Surf, para coloca-lo digite: /psurf");
- RemovePlayerAttachedObject(playerid, 2);
- PSamp = 0;
- }
- return 1;
- }
- CMD:apostarlot(playerid,params[])
- {
- new string[128], NumeroToLoto;// , NumeroValido;
- if(sscanf(params, "s", NumeroToLoto)) return SendClientMessage(playerid, Vermelho, "Uso correto: /apostarlot [numero]");
- //if(1 < (NumeroToLoto) > 100) return SendClientMessage(playerid, Vermelho, "( Erro ) Número deve estar entre 0 e 100 - Custo do Bilhete: 400R$");
- if(NumeroToLoto > 100 && NumeroToLoto < 1) return SendClientMessage(playerid, Vermelho, "( Erro ) Número deve estar entre 0 e 100 - Custo do Bilhete: 400R$");
- else if(TaJogando[playerid] == 1)return SendClientMessage(playerid, Vermelho, "LOTERIA: Você já está jogando na Loteria!");
- else if(GetPlayerMoney(playerid) < 400) return SendClientMessage(playerid, Vermelho, "LOTERIA: Você não tem $400 para comprar o Número");
- if(NumeroToLoto == NumeroLoto[playerid]) return SendClientMessage(playerid, Vermelho, "( Erro ) Esse número já foi escolhido!");
- format(string, sizeof(string), "LOTERIA: Você jogou na loteria com o numero: %d", NumeroToLoto);
- SendClientMessage(playerid, Amarelo, string);
- GivePlayerGrana(playerid, -400);
- TaJogando[playerid] = 1;
- return 1;
- }
- stock SalvarDados(playerid)
- {
- new conta[256],conta2[60];
- format(conta, sizeof(conta), PASTA_CONTAS, GetName(playerid));
- format(conta2, sizeof(conta2), DIRETORIOB, GetName(playerid));
- if(PlayerInfo[playerid][Logado] == 1)
- {
- DOF2_SetInt(conta, "Profissao", Profissao[playerid]);
- DOF2_SetInt(conta2, "Saldo", DOF2_GetInt(conta, "Saldo"));
- DOF2_SetInt(conta, "Dinheiro", GetPlayerGrana(playerid));
- DOF2_SetInt(conta, "HTerrestre", DOF2_GetInt(conta, "HTerrestre"));
- DOF2_SetInt(conta, "HNautica", DOF2_GetInt(conta, "HNautica"));
- DOF2_SetInt(conta, "HAerea", DOF2_GetInt(conta, "HAerea"));
- DOF2_SetInt(conta, "PorteArmas", DOF2_GetInt(conta, "PorteArmas"));
- DOF2_SetInt(conta, "Preso", EstaPreso[playerid]);
- DOF2_SetInt(conta, "TempoPreso", TimerPreso[playerid]);
- DOF2_SetInt(conta, "Level", Level[playerid]);
- DOF2_SetInt(conta, "TempoLevel", TempoLevel[playerid]);
- DOF2_SetInt(conta, "Experiencia", Experiencia[playerid]);
- DOF2_SetInt(conta, "Gasolina", DOF2_GetInt(conta, "Gasolina"));
- DOF2_SetInt(conta, "TemJP", DOF2_GetInt(conta, "TemJP"));
- DOF2_SetInt(conta, "LogoSAMP", DOF2_GetInt(conta, "LogoSAMP"));
- DOF2_SetInt(conta, "TemPSurf", DOF2_GetInt(conta, "TemPSurf"));
- DOF2_SetInt(conta, "NivelAdmin", IsAdmin[playerid]);
- DOF2_SetInt(conta, "Vip", IsVip[playerid]);
- DOF2_SetInt(conta, "Skin", DOF2_GetInt(conta, "Skin"));
- DOF2_SetInt(conta, "EstiloLuta", GetPlayerFightingStyle(playerid));
- new ano, mes, dia2, stringd[30], stringh[30], Hour, Minute, Second;
- getdate(ano, mes, dia2);
- format(stringd, sizeof(stringd), " (%d/%d/%d)", dia2, mes, ano);
- gettime(Hour, Minute, Second);
- format(stringh, sizeof(stringh), " (%d:%d:%d)", Hour, Minute, Second);
- DOF2_SetString(conta, "Logou", stringd);
- DOF2_SetString(conta, "Horas", stringh);
- PlayerInfo[playerid][Logado] = 0;
- DOF2_SaveFile();
- }
- }
- public LoteriaPublic()
- {
- new stringcm[256];
- new numerosorteado = randomEx(0, 99);
- new rand = random(9000);
- rand += 5000;
- DinheiroAcumuladoLoto += rand;
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (TaJogando[i] == 1)
- {
- if (vernumerosorteado[i] == numerosorteado)
- {
- TGanhador = i;
- }
- TaJogando[i] = 0;
- NumeroLoto[i] = 0;
- }
- if (TGanhador != 0)
- {
- format(stringcm, sizeof(stringcm), "~g~[ ~w~Loteria & Salario ~g~] ~n~Premio Acumulado~w~ : %iR$~g~ R$~n~Numero Sorteado~w~ : %i~n~~g~Ganhador ~w~: %s", DinheiroAcumuladoLoto, numerosorteado, GetName(TGanhador));
- TextDrawSetString(TextLoteria, stringcm);
- TextDrawShowForPlayer(i, TextLoteria);
- TextDrawShowForPlayer(i, BoxLoto);
- //GivePlayerGrana(TGanhador, DinheiroAcumuladoLoto);
- //SendClientMessageToAll(Verde, stringcm);
- SetTimerEx("DestruirTDLoto", 5000, false, "d", i);
- TGanhador = -1;
- }
- format(stringcm, sizeof(stringcm), "~g~[ ~w~Loteria & Salario ~g~] ~n~Premio Acumulado~w~ : %iR$~g~ R$~n~Numero Sorteado~w~ : %i~n~~g~Ganhador ~w~: Niguem", DinheiroAcumuladoLoto, numerosorteado);
- TextDrawSetString(TextLoteria, stringcm);
- TextDrawShowForPlayer(i, TextLoteria);
- TextDrawShowForPlayer(i, BoxLoto);
- //GivePlayerGrana(TGanhador, DinheiroAcumuladoLoto);
- SetTimerEx("DestruirTDLoto", 5000, false, "d", i);
- }
- return 1;
- }
- forward DestruirTDLoto();
- public DestruirTDLoto()
- {
- for(new i; i < MAX_PLAYERS; i ++)
- {
- TextDrawHideForPlayer(i, BoxLoto);
- TextDrawHideForPlayer(i, TextLoteria);
- }
- return 1;
- }
- stock randomEx(minnum = cellmin,maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement