Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <Dini>
- #pragma tabsize 0
- new Org[MAX_PLAYERS];
- #define NONE_CAR 9999
- #define BRANCO 0xFFFFFFAA
- #define VERMELHO 0xE31919AA
- #define AZUL 0x2641FEAA
- #define VERDE 0x007700AA
- #define AMARELO 0xF6F600AA
- #define ROSA 0xD900D3F6
- #define COR_ADA 0x8B8682AA
- #define COR_PCC 0x7CFC00AA
- #define COR_TCP 0x4A708BAA
- #define COR_POLICIA 0x4169E1AA
- #define COR_ADMCMD 0xFF6347AA
- #define COR_ADMIN 0x33CCFFAA
- #define COR_HELPER 0x98FB98AA
- #define REGISTRO 1
- #define LOGIN 2
- #define SERVERNAME "Guerra do Tráfico"
- //Gangues
- #define CIVIL 0
- #define PM 1
- #define BOPE 2
- #define AZTECAS 3
- #define GROOVE 4
- #define VAGOS 5
- #define BALLAS 6
- #define CV 7
- #define PCC 8
- #define ADA 9
- #define TCP 10
- #define ADVOGADO 1
- #define DETETIVE 2
- #define MECANICO 3
- #define CONTAS "Players/%s.ini"
- //pickups
- new EntradaPrefeitura;
- forward EnviarMensagem();
- new gz1,gz2,gz3,gz4;
- new MensagemRandomica[7][128] =
- {
- "[SERVER]: PRECISA DE AJUDA? USE /RELATORIO E FALE COM UM ADMINISTRADOR!",
- "[SERVER]: QUER FALAR APENAS PARA OS MEMBROS DE SUA ORG? FALE NO (/R)ADIO",
- "[SERVER]: EMBORA O OBJETIVO SEJA MATAR, É PROIBIDO DB, PRÁTICA SUJEITA A KICK",
- "[SERVER]: A EQUIPE GUERRA DO TRÁFICO AGRADECE A SUA PREFERENCIA!",
- "[SERVER]: DIVULGUE O SERVIDOR E FAÇA PARTE DO NOSSO CRESCIMENTO!",
- "[SERVER]: AS AREAS VERMELHAS NO MAPA SÃO OS PRINCIPAIS PONTOS DA CIDADE",
- "[SERVER]: ESTEJA LIGADO NAS ÁREAS VERMELHAS, É LÁ ONDE OCORREM OS PRINCIPAIS CONFRONTOS!"
- };
- new CoresRandomicas [] =
- {
- 0xFF5A00FF, //Laranja
- 0xF50000FF, //Vermelho
- 0xF50000FF, //Ciano
- 0x91FF00FF, //Verde Limão
- 0xFF0091FF, //Rosa
- 0x009000FF, //Verde
- 0x9600FFFF
- };
- static i_ServerSeconds;
- static i_ServerMinutes;
- static i_ServerHours;
- static i_ServerDays;
- static i_ServerMonths;
- static i_ServerYears;
- new Text:txtTimeDisp;
- new Text:txtDateDisp;
- forward ProcessGameTime();
- public ProcessGameTime()
- {
- new string[128];
- gettime(i_ServerHours, i_ServerMinutes, i_ServerSeconds);
- getdate(i_ServerYears, i_ServerMonths, i_ServerDays);
- format(string, sizeof string, "%02d:%02d:%02d", i_ServerHours, i_ServerMinutes, i_ServerSeconds);
- TextDrawSetString(txtTimeDisp, string);
- format(string, sizeof string, "%02d/%02d/%04d", i_ServerDays, i_ServerMonths, i_ServerYears);
- TextDrawSetString(txtDateDisp, string);
- SetWorldTime(i_ServerHours);
- for(new i = 0; i < MAX_PLAYERS; i++){SetPlayerTime(i, i_ServerHours, i_ServerMinutes);}
- }
- new Admin[MAX_PLAYERS];
- new Matou[MAX_PLAYERS];
- new Morreu[MAX_PLAYERS];
- new Logou[MAX_PLAYERS];
- forward MSGAdmin(color, string[]);
- public MSGAdmin(color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Admin[i] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- forward MSGAdminDono(color, string[]);
- public MSGAdminDono(color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Admin[i] >= 4)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- forward MSGRadio(membro, color, string[]);
- public MSGRadio(membro, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Org[i] == membro)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- forward MSGGoverno(color, string[]);
- public MSGGoverno(color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Org[i] == 1 || Org[i] == 2)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- //Fim das Gangues
- stock pNome(playerid)
- {
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- return nome;
- }
- enum Info
- {
- pVip,
- pWarns
- };
- new Text:Server;
- new PlayerInfo[MAX_PLAYERS][Info];
- forward IsACopCar(carid);
- forward IsAAztecaCar(carid);
- forward IsAGrooveCar(carid);
- //forward IsAVagosCar(carid);
- forward IsABallasCar(carid);
- forward IsACVCar(carid);
- //forward IsAPCCCar(carid);
- //forward IsAADACar(carid);
- //forward IsATCPCar(carid);
- //============== PUBLICS DOS VEICULOS
- public IsACopCar(carid)
- {
- if(carid >= 1 && carid <= 52)
- {
- return 1;
- }
- return 0;
- }
- public IsAAztecaCar(carid)
- {
- if(carid >= 53 && carid <= 63)
- {
- return 1;
- }
- return 0;
- }
- public IsAGrooveCar(carid)
- {
- if(carid >= 64 && carid <= 74)
- {
- return 1;
- }
- return 0;
- }
- public IsABallasCar(carid)
- {
- if(carid >= 75 && carid <= 85)
- {
- return 1;
- }
- return 0;
- }
- public IsACVCar(carid)
- {
- if(carid >= 86 && carid <= 96)
- {
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(IsACopCar(vehicleid))
- {
- if(Org[playerid] == PM || Org[playerid] == BOPE || ispassenger) { }
- else
- {
- new Float:x,Float:y,Float:z,Float:angle;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,angle);
- SetPlayerPos(playerid,x,y,z+0.3);
- SetPlayerFacingAngle(playerid,angle);
- SendClientMessage(playerid,COR_POLICIA,"Você não é Policial!");
- }
- }
- else if(IsAAztecaCar(vehicleid))
- {
- if(Org[playerid] == AZTECAS || ispassenger) { }
- else
- {
- new Float:x,Float:y,Float:z,Float:angle;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,angle);
- SetPlayerPos(playerid,x,y,z+0.3);
- SetPlayerFacingAngle(playerid,angle);
- SendClientMessage(playerid,AZUL,"Você não é dos Los Aztecas!");
- }
- }
- else if(IsAGrooveCar(vehicleid))
- {
- if(Org[playerid] == GROOVE || ispassenger) { }
- else
- {
- new Float:x,Float:y,Float:z,Float:angle;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,angle);
- SetPlayerPos(playerid,x,y,z+0.3);
- SetPlayerFacingAngle(playerid,angle);
- SendClientMessage(playerid,VERDE,"Você não é da Groove Street!");
- }
- }
- else if(IsABallasCar(vehicleid))
- {
- if(Org[playerid] == BALLAS || ispassenger) { }
- else
- {
- new Float:x,Float:y,Float:z,Float:angle;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,angle);
- SetPlayerPos(playerid,x,y,z+0.3);
- SetPlayerFacingAngle(playerid,angle);
- SendClientMessage(playerid,ROSA,"Você não é dos Ballas!");
- }
- }
- else if(IsACVCar(vehicleid))
- {
- if(Org[playerid] == CV || ispassenger) { }
- else
- {
- new Float:x,Float:y,Float:z,Float:angle;
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,angle);
- SetPlayerPos(playerid,x,y,z+0.3);
- SetPlayerFacingAngle(playerid,angle);
- SendClientMessage(playerid,VERMELHO,"Você não é do Comando Vermelho!");
- }
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(classid == 0)
- {
- Org[playerid] = CIVIL;
- GameTextForPlayer(playerid,"~w~CIVIL",5000,6);
- }
- else if(classid == 1)
- {
- Org[playerid] = PM;
- GameTextForPlayer(playerid,"~b~POLICIA MILITAR",5000,6);
- }
- else if(classid == 2)
- {
- Org[playerid] = PM;
- GameTextForPlayer(playerid,"~b~POLICIA MILITAR",5000,6);
- }
- else if(classid == 3)
- {
- Org[playerid] = PM;
- GameTextForPlayer(playerid,"~b~POLICIA MILITAR",5000,6);
- }
- else if(classid == 4)
- {
- Org[playerid] = BOPE;
- GameTextForPlayer(playerid,"~b~BOPE",5000,6);
- }
- else if(classid == 5)
- {
- Org[playerid] = AZTECAS;
- GameTextForPlayer(playerid,"~b~LOS AZTECAS",5000,6);
- }
- else if(classid == 6)
- {
- Org[playerid] = AZTECAS;
- GameTextForPlayer(playerid,"~b~LOS AZTECAS",5000,6);
- }
- else if(classid == 7)
- {
- Org[playerid] = AZTECAS;
- GameTextForPlayer(playerid,"~b~LOS AZTECAS",5000,6);
- }
- else if(classid == 8)
- {
- Org[playerid] = GROOVE;
- GameTextForPlayer(playerid,"~g~GROOVE STREET",5000,6);
- }
- else if(classid == 9)
- {
- Org[playerid] = GROOVE;
- GameTextForPlayer(playerid,"~g~GROOVE STREET",5000,6);
- }
- else if(classid == 10)
- {
- Org[playerid] = GROOVE;
- GameTextForPlayer(playerid,"~g~GROOVE STREET",5000,6);
- }
- else if(classid == 11)
- {
- Org[playerid] = VAGOS;
- GameTextForPlayer(playerid,"~y~LOS VAGOS",5000,6);
- }
- else if(classid == 12)
- {
- Org[playerid] = VAGOS;
- GameTextForPlayer(playerid,"~y~LOS VAGOS",5000,6);
- }
- else if(classid == 13)
- {
- Org[playerid] = VAGOS;
- GameTextForPlayer(playerid,"~y~LOS VAGOS",5000,6);
- }
- else if(classid == 14)
- {
- Org[playerid] = BALLAS;
- GameTextForPlayer(playerid,"~p~BALLAS",5000,6);
- }
- else if(classid == 15)
- {
- Org[playerid] = BALLAS;
- GameTextForPlayer(playerid,"~p~BALLAS",5000,6);
- }
- else if(classid == 16)
- {
- Org[playerid] = BALLAS;
- GameTextForPlayer(playerid,"~r~BALLAS",5000,6);
- }
- else if(classid == 17)
- {
- Org[playerid] = CV;
- GameTextForPlayer(playerid,"~r~COMANDO VERMELHO",5000,6);
- }
- else if(classid == 18)
- {
- Org[playerid] = CV;
- GameTextForPlayer(playerid,"~r~COMANDO VERMELHO",5000,6);
- }
- else if(classid == 19)
- {
- Org[playerid] = PCC;
- GameTextForPlayer(playerid,"~g~PRIMEIRO COMANDO DA CAPITAL",5000,6);
- }
- else if(classid == 20)
- {
- Org[playerid] = PCC;
- GameTextForPlayer(playerid,"~g~PRIMEIRO COMANDO DA CAPITAL",5000,6);
- }
- else if(classid == 21)
- {
- Org[playerid] = ADA;
- GameTextForPlayer(playerid,"~w~AMIGOS DOS AMIGOS",5000,6);
- }
- else if(classid == 22)
- {
- Org[playerid] = ADA;
- GameTextForPlayer(playerid,"~w~AMIGOS DOS AMIGOS",5000,6);
- }
- else if(classid == 23)
- {
- Org[playerid] = TCP;
- GameTextForPlayer(playerid,"~b~TERCEIRO COMANDO PURO",5000,6);
- }
- else if(classid == 24)
- {
- Org[playerid] = TCP;
- GameTextForPlayer(playerid,"~b~TERCEIRO COMANDO PURO",5000,6);
- }
- SetPlayerPos(playerid,1025.5751,-2140.7637,39.2032);
- SetPlayerCameraPos(playerid,1019.7552,-2141.0266,37.7274);
- SetPlayerCameraLookAt(playerid,1021.9974,-2140.9907,38.3012);
- SetPlayerFacingAngle(playerid, 82.6125);
- ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- ClearAnimations(i);
- }
- if(Org[playerid] == 0)
- {
- SetPlayerColor(playerid,BRANCO);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 1)
- {
- SetPlayerColor(playerid,COR_POLICIA);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 2)
- {
- SetPlayerColor(playerid,COR_POLICIA);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 3)
- {
- SetPlayerColor(playerid,AZUL);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 4)
- {
- SetPlayerColor(playerid,VERDE);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 5)
- {
- SetPlayerColor(playerid,AMARELO);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 6)
- {
- SetPlayerColor(playerid,ROSA);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 7)
- {
- SetPlayerColor(playerid,VERMELHO);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 8)
- {
- SetPlayerColor(playerid,COR_PCC);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 9)
- {
- SetPlayerColor(playerid,COR_ADA);
- SetPlayerHealth(playerid,100);
- }
- else if(Org[playerid] == 10)
- {
- SetPlayerColor(playerid,COR_TCP);
- SetPlayerHealth(playerid,100);
- }
- return 1;
- }
- public OnGameModeExit()
- {
- TextDrawHideForAll(txtTimeDisp);
- TextDrawDestroy(txtTimeDisp);
- TextDrawHideForAll(txtDateDisp);
- TextDrawDestroy(txtDateDisp);
- TextDrawHideForAll(Server);
- TextDrawDestroy(Server);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- SalvarConta(i);
- }
- return 1;
- }
- public OnGameModeInit()
- {
- gz2 = GangZoneCreate(1079.159, -1575.273, 1375.78, -1148.917);
- gz1 = GangZoneCreate(1858.74,-1456.841,2067.896,-1129.178);
- gz3 = GangZoneCreate(200.7038, -1906.883, 1014.511, -1752.921);
- gz4 = GangZoneCreate(2721.984, -2285.866, 2896.915, -1681.862);
- SetTimer("EnviarMensagem",90000,true);
- txtTimeDisp = TextDrawCreate(632.0,25.0,"--:--:--");
- TextDrawUseBox(txtTimeDisp, 0);
- TextDrawFont(txtTimeDisp, 3);
- TextDrawSetShadow(txtTimeDisp,0);
- TextDrawSetOutline(txtTimeDisp,2);
- TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
- TextDrawColor(txtTimeDisp,VERDE);
- TextDrawAlignment(txtTimeDisp,3);
- TextDrawLetterSize(txtTimeDisp,0.5,1.6);
- txtDateDisp = TextDrawCreate(620.0,5.0,"00/00/0000");
- TextDrawUseBox(txtDateDisp, 0);
- TextDrawFont(txtDateDisp, 3);
- TextDrawSetShadow(txtDateDisp,0);
- TextDrawSetOutline(txtDateDisp,2);
- TextDrawBackgroundColor(txtDateDisp,0x000000FF);
- TextDrawColor(txtDateDisp,VERDE);
- TextDrawAlignment(txtDateDisp,3);
- TextDrawLetterSize(txtDateDisp,0.7,1.7);
- ProcessGameTime();
- SetTimer("ProcessGameTime", 1000, 1);
- //server
- Server= TextDrawCreate(1.0, 433.0, "~b~Los ~g~Santos ~r~Traffic ~y~War - ~w~Obrigado Por Jogar Aqui! ~r~Sua Presenca Faz o Nosso Crescimento!");
- TextDrawAlignment(Server,0);
- TextDrawBackgroundColor(Server,0x000000ff);
- TextDrawFont(Server,2);
- TextDrawLetterSize(Server,0.2999, 1.4);
- TextDrawBoxColor(Server,0x696969AA);
- TextDrawColor(Server,0xffffffff);
- TextDrawSetOutline(Server,1);
- TextDrawSetProportional(Server,1);
- TextDrawSetShadow(Server,1);
- for(new i; i < MAX_PLAYERS; i ++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawShowForPlayer(i, Server);
- }
- }
- ShowPlayerMarkers(1);
- //veiculos policia
- AddStaticVehicleEx(427,1595.3212,-1710.3961,5.6112,359.7906,0,1,60000); // Carro PM 1 [ 1 ]
- AddStaticVehicleEx(427,1591.4327,-1710.4241,5.6118,0.2051,0,1,60000); // Carro PM 2 [ 2 ]
- AddStaticVehicleEx(427,1587.3286,-1710.4690,5.6110,0.1416,0,1,60000); // Carro PM 3 [ 3 ]
- AddStaticVehicleEx(427,1583.4650,-1710.4186,5.6110,359.8493,0,1,60000); // Carro PM 4 [ 4 ]
- AddStaticVehicleEx(427,1578.6639,-1710.4069,5.6116,0.9422,0,1,60000); // Carro PM 5 [ 5 ]
- AddStaticVehicleEx(601,1574.3885,-1710.5515,5.6111,0.5474,0,1,60000); // Carro PM 6 [ 6 ]
- AddStaticVehicleEx(601,1570.3066,-1710.6121,5.6124,359.7127,0,1,60000); // Carro PM 7 [ 7 ]
- AddStaticVehicleEx(601,1564.0303,-1710.6862,5.6109,319.3410,0,1,60000); // Carro PM 8 [ 8 ]
- AddStaticVehicleEx(596,1558.8585,-1710.1777,5.6115,359.4310,0,1,60000); // Carro PM 9 [ 9 ]
- AddStaticVehicleEx(596,1544.9037,-1684.3752,5.6115,89.0990,0,1,60000); // Carro PM 10 [ 10 ]
- AddStaticVehicleEx(596,1545.0051,-1680.1718,5.6116,88.5028,0,1,60000); // Carro PM 11 [ 11 ]
- AddStaticVehicleEx(596,1545.0319,-1676.3513,5.6120,89.6320,0,1,60000); // Carro PM 12 [ 12 ]
- AddStaticVehicleEx(596,1545.0000,-1672.3497,5.6121,89.9195,0,1,60000); // Carro PM 13 [ 13 ]
- AddStaticVehicleEx(596,1545.0659,-1667.9012,5.6110,90.6359,0,1,60000); // Carro PM 14 [ 14 ]
- AddStaticVehicleEx(596,1545.0922,-1663.2059,5.6125,90.6188,0,1,60000); // Carro PM 15 [ 15 ]
- AddStaticVehicleEx(596,1545.1133,-1659.1013,5.6119,89.3168,0,1,60000); // Carro PM 16 [ 16 ]
- AddStaticVehicleEx(596,1545.1378,-1655.1281,5.6108,90.6954,0,1,60000); // Carro PM 17 [ 17 ]
- AddStaticVehicleEx(596,1545.2279,-1650.9863,5.6120,89.8482,0,1,60000); // Carro PM 18 [ 18 ]
- AddStaticVehicleEx(596,1530.5682,-1645.2727,5.6124,180.3221,0,1,60000); // Carro PM 19 [ 19 ]
- AddStaticVehicleEx(596,1601.2931,-1684.0496,5.6119,90.0883,0,1,60000); // Carro PM 20 [ 20 ]
- AddStaticVehicleEx(596,1601.2734,-1688.0236,5.6136,88.4274,0,1,60000); // Carro PM 21 [ 21 ]
- AddStaticVehicleEx(596,1601.1285,-1691.8971,5.6119,90.0262,0,1,60000); // Carro PM 22 [ 22 ]
- AddStaticVehicleEx(596,1601.2103,-1696.1312,5.6110,89.8409,0,1,60000); // Carro PM 23 [ 23 ]
- AddStaticVehicleEx(596,1585.3990,-1671.6134,5.6143,269.8638,0,1,60000); // Carro PM 24 [ 24 ]
- AddStaticVehicleEx(596,1585.4008,-1667.3893,5.6141,269.5397,0,1,60000); // Carro PM 25 [ 25 ]
- AddStaticVehicleEx(596,1560.6199,-1694.2374,5.6141,223.4730,0,1,60000); // Carro PM 26 [ 26 ]
- AddStaticVehicleEx(596,1601.2856,-1700.1526,5.6118,90.0113,0,1,60000); // Carro PM 27 [ 27 ]
- AddStaticVehicleEx(596,1601.3367,-1704.4319,5.6110,89.4350,0,1,60000); // Carro PM 28 [ 28 ]
- AddStaticVehicleEx(596,1553.7660,-1606.6392,13.1040,179.0925,0,1,60000); // Carro PM 29 [ 29 ]
- AddStaticVehicleEx(596,1557.1333,-1606.7168,13.1032,178.8592,0,1,60000); // Carro PM 30 [ 30 ]
- AddStaticVehicleEx(599,1560.4562,-1606.8030,13.1036,178.9202,0,1,60000); // Carro PM 31 [ 31 ]
- AddStaticVehicleEx(599,1563.8717,-1606.6914,13.1038,179.4326,0,1,60000); // Carro PM 32 [ 32 ]
- AddStaticVehicleEx(599,1567.3547,-1606.7321,13.1040,180.2489,0,1,60000); // Carro PM 33 [ 33 ]
- AddStaticVehicleEx(599,1570.8766,-1606.6274,13.1041,178.9961,0,1,60000); // Carro PM 34 [ 34 ]
- AddStaticVehicleEx(599,1574.6097,-1606.7114,13.1036,177.9048,0,1,60000); // Carro PM 35 [ 35 ]
- AddStaticVehicleEx(599,1577.8934,-1606.8094,13.1042,177.2975,0,1,60000); // Carro PM 36 [ 36 ]
- AddStaticVehicleEx(599,1581.3461,-1606.8341,13.1039,177.7676,0,1,60000); // Carro PM 37 [ 37 ]
- AddStaticVehicleEx(599,1584.7222,-1606.9253,13.1037,178.5022,0,1,60000); // Carro PM 38 [ 38 ]
- AddStaticVehicleEx(599,1603.8914,-1616.1952,13.2288,89.7498,0,1,60000); // Carro PM 39 [ 39 ]
- AddStaticVehicleEx(599,1603.6875,-1619.5703,13.2263,88.5466,0,1,60000); // Carro PM 40 [ 40 ]
- AddStaticVehicleEx(523,1603.7355,-1622.7402,13.0761,88.1086,0,1,60000); // Moto PM 1 [ 41 ]
- AddStaticVehicleEx(523,1603.9626,-1624.3147,13.0775,90.7598,0,1,60000); // Moto PM 2 [ 42 ]
- AddStaticVehicleEx(523,1603.9635,-1625.8510,13.0772,91.6688,0,1,60000); // Moto PM 3 [ 43 ]
- AddStaticVehicleEx(523,1604.0082,-1627.4473,13.0780,90.3992,0,1,60000); // Moto PM 4 [ 44 ]
- AddStaticVehicleEx(523,1572.8439,-1634.5190,13.1271,358.1002,0,1,60000); // Moto PM 5 [ 45 ]
- AddStaticVehicleEx(522,1571.2872,-1634.4946,13.1248,0.0766,0,1,60000); // Moto PM 6 [ 46 ]
- AddStaticVehicleEx(522,1569.8798,-1634.4691,13.1236,0.6737,0,1,60000); // Moto PM 7 [ 47 ]
- AddStaticVehicleEx(522,1568.2787,-1634.5309,13.1235,1.2726,0,1,60000); // Moto PM 8 [ 48 ]
- AddStaticVehicleEx(522,1566.7974,-1634.5743,13.1243,1.3427,0,1,60000); // Moto PM 9 [ 49 ]
- AddStaticVehicleEx(522,1565.1429,-1634.6414,13.1211,0.1210,0,1,60000); // Moto PM 10 [ 50 ]
- AddStaticVehicleEx(497,1552.1447,-1644.5111,28.5788,180.2065,0,1,60000); // heli 1 cop [ 51 ]
- AddStaticVehicleEx(497,1570.1406,-1645.1512,28.5779,175.1474,0,1,60000); // heli 2 cop [ 52 ]
- //veiculos aztecas
- AddStaticVehicleEx(411,1673.4362,-2110.0366,13.2519,270.6005,103,103,60000); // carro 1 aztecas [ 154 ]
- AddStaticVehicleEx(482,1661.6045,-2110.1614,13.2517,270.6003,103,103,60000); // carro 2 aztecas [ 155 ]
- AddStaticVehicleEx(560,1663.9532,-2116.4326,13.3836,270.5919,103,103,60000); // carro 3 aztecas [ 156 ]
- AddStaticVehicleEx(451,1673.5963,-2116.5295,13.2249,270.6003,103,103,60000); // carro 4 aztecas [ 157 ]
- AddStaticVehicleEx(565,1700.1049,-2099.6953,13.2533,179.9370,103,103,60000); // carro 5 aztecas [ 158 ]
- AddStaticVehicleEx(587,1696.4332,-2099.6931,13.2536,179.9369,103,103,60000); // carro 6 aztecas [ 159 ]
- AddStaticVehicleEx(429,1704.8361,-2125.7949,13.2521,1.3980,103,103,60000); // carro 7 aztecas [ 160 ]
- AddStaticVehicleEx(541,1680.1205,-2126.0894,13.2520,359.8218,103,103,60000); // carro 8 aztecas [ 161 ]
- AddStaticVehicleEx(522,1690.1974,-2100.5391,13.4042,178.5231,103,103,60000); // moto 1 aztecas [ 162 ]
- AddStaticVehicleEx(522,1686.7764,-2100.7271,13.4043,178.5232,103,103,60000); // moto 2 aztecas [ 163 ]
- AddStaticVehicleEx(487,1699.0925,-2084.2708,17.7637,180.0375,103,103,60000); // helli aztecas [ 164 ]
- //veiculos groove
- AddStaticVehicleEx(567,2470.4524,-1670.4611,13.0229,10.7682,252,252,60000); // CARRO GROOVE 1 [ 165 ]
- AddStaticVehicleEx(482,2473.0684,-1691.9166,13.2192,359.7195,252,252,60000); // CARRO GROOVE 2 [ 166 ]
- AddStaticVehicleEx(412,2489.3474,-1682.5742,13.0412,271.4998,252,252,60000); // CARRO GROOVE 3 [ 167 ]
- AddStaticVehicleEx(534,2497.4470,-1684.7703,13.1170,10.5016,252,252,60000); // CARRO GROOVE 4 [ 168 ]
- AddStaticVehicleEx(565,2505.7383,-1677.0964,13.0818,327.5858,252,252,60000); // CARRO GROOVE 5 [ 169 ]
- AddStaticVehicleEx(566,2509.7136,-1686.9553,13.2652,49.3267,252,252,60000); // CARRO GROOVE 6 [ 170 ]
- AddStaticVehicleEx(560,2516.8506,-1672.1951,13.6798,64.4007,252,252,60000); // CARRO GROOVE 7 [ 171 ]
- AddStaticVehicleEx(589,2498.1560,-1656.2767,13.0915,78.9987,252,252,60000); // CARRO GROOVE 8 [ 172 ]
- AddStaticVehicleEx(522,2507.5623,-1651.7622,13.2636,139.3953,252,252,60000); // moto 1 GROOVE [ 173 ]
- AddStaticVehicleEx(581,2505.9907,-1650.4805,13.2750,140.5256,252,252,60000); // moto 2 GROOVE [ 174 ]
- AddStaticVehicleEx(487,2526.8357,-1677.8053,20.1069,89.2377,252,252,60000); // HELI DA GROOVE 1 [ 175 ]
- //veiculos vagos
- //veiculos ballas
- AddStaticVehicleEx(522,2094.7686,-1277.8308,25.0555,178.5352,186,186,60000); // moto 1 ballas
- AddStaticVehicleEx(521,2097.8064,-1277.6141,25.0552,185.6461,186,186,60000); // moto 2 ballas
- AddStaticVehicleEx(560,2134.0078,-1305.4243,23.6059,92.3133,186,186,60000); // sultan ballas
- AddStaticVehicleEx(411,2119.5635,-1305.6592,23.6547,89.7586,186,186,60000); // infernus ballas
- AddStaticVehicleEx(402,2118.6045,-1296.4335,23.6954,89.4629,186,186,60000); // buffalo ballas
- AddStaticVehicleEx(541,2104.4944,-1296.0393,23.5136,96.8845,186,186,60000); // bullet ballas
- AddStaticVehicleEx(506,2102.5730,-1306.1554,23.6225,87.9131,186,186,60000); // super gt ballas
- AddStaticVehicleEx(451,2091.1567,-1296.1843,23.6252,89.9663,186,186,60000); // turismo ballas
- AddStaticVehicleEx(477,2090.7705,-1306.3295,23.6616,91.1813,186,186,60000); // zr ballas
- AddStaticVehicleEx(487,2087.6450,-1315.8245,24.1934,355.8695,186,186,60000); // heli ballas
- AddStaticVehicleEx(482,2133.9529,-1296.1392,23.9901,88.2869,186,186,60000); // burrito ballas
- //veiculos cv
- AddStaticVehicleEx(567,710.7937,-1437.4856,13.4088,359.0577,3,3,60000); // veiculo 1 Comando Vermelho [ 198 ]
- AddStaticVehicleEx(482,715.0620,-1437.5853,13.5315,358.6585,3,3,60000); // carro 2 os Comando Vermelho [ 199 ]
- AddStaticVehicleEx(412,719.0229,-1438.3528,13.3181,357.6283,3,3,60000); // carro 3 os Comando Vermelho [ 200 ]
- AddStaticVehicleEx(534,723.0405,-1438.1564,13.3131,0.3387,3,3,60000); // carro 4 os Comando Vermelho [ 201 ]
- AddStaticVehicleEx(565,727.9271,-1437.6682,13.1634,0.8232,3,3,60000); // flash cv
- AddStaticVehicleEx(566,730.9850,-1437.9932,13.3068,0.0783,3,3,60000); // carro 6 os Comando Vermelho [ 203 ]
- AddStaticVehicleEx(560,735.1754,-1437.8925,13.3244,357.5306,3,3,60000); // carro 7 os Comando Vermelho [ 204 ]
- AddStaticVehicleEx(589,739.4525,-1437.9091,13.3169,359.0135,3,3,60000); // carro 8 os Comando Vermelho [ 205 ]
- AddStaticVehicleEx(522,701.1478,-1439.8022,13.2080,353.0919,3,3,60000); // moto Comando Vermelho 1 [ 206 ]
- AddStaticVehicleEx(581,703.2151,-1440.0529,13.2082,353.0915,3,3,60000); // moto Comando Vermelho 2 [ 207 ]
- AddStaticVehicleEx(487,705.1614,-1450.8456,17.8717,357.9817,3,3,60000); // helli os Comando Vermelho [ 208 ]
- // ====================== Fim dos Carros ===========================
- //================ Skins ===============
- AddPlayerClass(23,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//civil
- AddPlayerClass(265,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//policia 0
- AddPlayerClass(266,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//policia1
- AddPlayerClass(267,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//policia2
- AddPlayerClass(285,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//bope3
- AddPlayerClass(114,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//aztecas4
- AddPlayerClass(115,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//aztecas5
- AddPlayerClass(116,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//aztecas6
- AddPlayerClass(269,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//grove7
- AddPlayerClass(270,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//grove8
- AddPlayerClass(271,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//grove9
- AddPlayerClass(108,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//vagos10
- AddPlayerClass(109,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//vagos11
- AddPlayerClass(110,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//vagos12
- AddPlayerClass(102,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ballas13
- AddPlayerClass(103,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ballas14
- AddPlayerClass(104,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ballas15
- AddPlayerClass(293,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//comando vermelho16
- AddPlayerClass(19,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//comando vermelho17
- AddPlayerClass(122,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//primeiro comando da capital18
- AddPlayerClass(124,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//primeiro comando da capital19
- AddPlayerClass(292,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ada20
- AddPlayerClass(291,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//ada21
- AddPlayerClass(173,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//terceiro comando22
- AddPlayerClass(174,1242.5991,-1694.9318,16.1959,183.6818,0,0,0,0,0,0);//terceiro comando23
- //============ Fim das Skins =============
- //---------------- Text Labels ------------
- Create3DTextLabel("Prefeitura de Los Santos",AMARELO,1481.0006,-1771.8022,18.7958,10.0,0);
- //------------------------ pickups --------------
- EntradaPrefeitura = CreatePickup(1318,23,1481.0006,-1771.8022,18.7958,0);
- //-----------------------------------------------------------------------
- SendRconCommand("hostname Guerra do Tráfico [v1.0] ®");
- SetGameModeText("GT v1.0");
- SendRconCommand("mapname Los Santos");
- print("==========> TW <============");
- print("= Guerra do Tráfico Carregada =");
- print("= Criado Por Pedro Miranda =");
- return 1;
- }
- public OnPlayerPickUpPickup(playerid,pickupid)
- {
- if(pickupid == EntradaPrefeitura)
- {
- SetPlayerVirtualWorld(playerid,0);
- SetPlayerInterior(playerid, 3);
- GameTextForPlayer(playerid, "~b~Prefeitura de Los Santos", 5000, 1);
- SetPlayerPos(playerid,388.8977,173.7054,1008.3828);
- SetPlayerFacingAngle(playerid,81.7687);
- return 1;
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(GetPlayerState(killerid) == PLAYER_STATE_PASSENGER || GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
- {
- new string[75];
- format(string,sizeof(string),"[ATENÇÃO]: %s [ID: %d] Cometeu DB Em %s e Deverá Ser Kickado!",pNome(killerid),killerid,pNome(playerid));
- SendClientMessageToAll(COR_ADMCMD,string);
- }
- TextDrawHideForPlayer(playerid,txtTimeDisp);
- TextDrawHideForPlayer(playerid,txtDateDisp);
- SendDeathMessage(killerid, playerid, reason);
- if(IsPlayerConnected(killerid))
- {
- Matou[killerid]+= 1;
- }
- Morreu[playerid]++;
- GivePlayerMoney(killerid,GetPlayerMoney(killerid)+5000);
- GivePlayerMoney(playerid,GetPlayerMoney(playerid)-5000);
- SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
- SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[256];
- if(Admin[playerid] >= 4)
- {
- new ip[20];
- GetPlayerIp(playerid,ip,sizeof(ip));
- format(string,sizeof(string),"%s Está Logando no Servidor - IP: %s",pNome(playerid),ip);
- MSGAdminDono(BRANCO,string);
- }
- TextDrawShowForPlayer(playerid, Server);
- if(strcmp(pNome(playerid),"Pedro_Miranda",true) == 0)
- {
- Admin[playerid] = 5;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), CONTAS, Nome);
- if(!dini_Exists(String))
- {
- format(String, sizeof(String), "Nick: {e31919}%s\n{ffffff}Conta:{e31919}Não Registrada\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
- }
- else
- {
- format(String, sizeof(String), "Nick: {e31919}%s\n{ffffff}Conta:{e31919}Registrada\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Cancelar");
- }
- GameTextForPlayer(playerid,"~b~Los ~g~Santos ~r~Traffic ~y~War",5000,1);
- SendDeathMessage(playerid, INVALID_PLAYER_ID, 200);
- SetPlayerScore(playerid,0);
- if(Admin[playerid] >= 1)
- {
- new AdminName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, AdminName, sizeof(AdminName));
- format(string, sizeof(string), "~p~%s: ~g~ON", AdminName);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- GameTextForPlayer(i, string , 5000, 4);
- }
- }
- Org[playerid] = CIVIL;
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- SalvarConta(playerid);
- new string[45];
- if(Admin[playerid] >= 1)
- {
- new stringa[256];
- new AdminName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, AdminName, sizeof(AdminName));
- format(stringa, sizeof(stringa), "~p~%s: ~r~OFF", AdminName);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- GameTextForPlayer(i, stringa , 5000, 4);
- }
- }
- format(string,sizeof(string),"%s Deixou o Servidor!",pNome(playerid));
- SendClientMessageToAll(BRANCO,string);
- Org[playerid] = CIVIL;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == REGISTRO)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), "{FFFFFF}Nick: {e31919}%s{ffffff}\n{ffffff}Conta: {e31919}Não Registrado\n{FFFFFF} Digite Uma Senha Para Prosseguir", Nome);
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
- SendClientMessage(playerid,0x1E90FFAA,"Senha Inválida, Favor Digitar Uma Senha Válida!");
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), CONTAS, Nome);
- dini_Create(String);
- dini_Set(String,"Senha",inputtext);
- dini_IntSet(String,"Dinheiro",0);
- dini_IntSet(String,"Vida", 100);
- dini_IntSet(String,"Colete", 100);
- dini_IntSet(String,"Matou",0);
- dini_IntSet(String,"Morreu",0);
- dini_IntSet(String,"Logou",0);
- dini_IntSet(String,"Admin",0);
- dini_IntSet(String,"VIP",0);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login","{FFFFFF}Registrado Com Sucesso.\nDigite Sua Senha Para Logar", "Logar", "Cancelar");
- GivePlayerMoney(playerid, 500000);
- SendClientMessage(playerid, BRANCO, "Você recebeu R$500.000 por se registrar no servidor");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "[SERVER]: Kickado Por Não se Registrar!");
- Kick(playerid);
- return 1;
- }
- }
- if(dialogid == LOGIN)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), "{FFFFFF}Nick:{e31919}%s{ffffff}\n{ffffff}Conta: {e31919}Registrada\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
- SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), CONTAS, Nome);
- if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
- {
- EditarPlayer(playerid);
- Logou[playerid]++;
- SendClientMessage(playerid,0x00FF00AA,"[SERVER]: Logado com Sucesso, Escolha sua Organização!");
- return 1;
- }
- else
- {
- SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
- format(String, sizeof(String), "{FFFFFF}Nick: {e31919}%s{ffffff}\n{ffffff}Conta: {e31919}Registrada\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "Kickado por não Logar!");
- Kick(playerid);
- return 1;
- }
- }
- if(dialogid == 4)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Comandos Moderador","/Ir\n/TV\n/Kick","OK","");
- return 1;
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid,6,DIALOG_STYLE_MSGBOX,"Comandos Administrador","/Ban\nCongelar\n/Descongelar\nGMX","OK","");
- return 1;
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid,7,DIALOG_STYLE_MSGBOX,"Comandos Responsável Pela Administração","/DarAdmin","OK","");
- return 1;
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Comandos de Sub Dono","Comandos a Serem Criados","OK","");
- return 1;
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"Comandos de Admin Dono","Comandos a Serem Criados","OK","");
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- GangZoneShowForPlayer(playerid, gz1, VERMELHO);
- GangZoneShowForPlayer(playerid, gz2, VERMELHO);
- GangZoneShowForPlayer(playerid, gz3, VERMELHO);
- GangZoneShowForPlayer(playerid, gz4, VERMELHO);
- TextDrawShowForPlayer(playerid,txtTimeDisp);
- TextDrawShowForPlayer(playerid,txtDateDisp);
- if(Org[playerid] == CIVIL)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1177.9160,-1323.2394,14.0943);
- SetPlayerFacingAngle(playerid, 277.1077);
- SetPlayerVirtualWorld(playerid,0);
- return 1;
- }
- if(Org[playerid] == PM)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,1530.7992,-1669.0005,6.2188);
- SetPlayerFacingAngle(playerid,272.3188);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == BOPE)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,1530.7992,-1669.0005,6.2188);
- SetPlayerFacingAngle(playerid,272.3188);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == AZTECAS)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,1677.8491,-2120.1113,13.5469);
- SetPlayerFacingAngle(playerid,316.1795);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == GROOVE)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,2495.3799,-1689.3333,14.3655);
- SetPlayerFacingAngle(playerid,1.6557);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == VAGOS)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,2352.1926,-1167.3896,27.6619);
- SetPlayerFacingAngle(playerid,354.3465);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == BALLAS)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,2091.3286,-1281.4681,25.5034);
- SetPlayerFacingAngle(playerid,182.9264);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == CV)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,725.2991,-1437.0159,13.5318);
- SetPlayerFacingAngle(playerid,1.5702);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == PCC)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,1242.5991,-1694.9318,16.1959);
- SetPlayerFacingAngle(playerid,183.6818);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == ADA)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,1242.5991,-1694.9318,16.1959);
- SetPlayerFacingAngle(playerid,183.6818);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- if(Org[playerid] == TCP)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,1242.5991,-1694.9318,16.1959);
- SetPlayerFacingAngle(playerid,183.6818);
- SetPlayerVirtualWorld(playerid,0);
- Equipar(playerid);
- return 1;
- }
- return 1;
- }
- stock Equipar(playerid)
- {
- GivePlayerWeapon(playerid,1,1);
- GivePlayerWeapon(playerid,4,1);
- GivePlayerWeapon(playerid,24,9999);
- GivePlayerWeapon(playerid,25,9999);
- GivePlayerWeapon(playerid,29,9999);
- GivePlayerWeapon(playerid,31,9999);
- SendClientMessage(playerid,GetPlayerColor(playerid),"Você foi equipado!");
- return 1;
- }
- stock SetAdminSkin(playerid)
- {
- SetPlayerSkin(playerid, 217);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new cmd[256];
- new tmp[256];
- new idx;
- cmd = strtok(cmdtext,idx);
- if(strcmp(cmd,"/bombapedro",true) == 0)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,Float:x,Float:y,Float:z);
- CreateExplosion(Float:x,Float:y,Float:z,7,9999);
- return 1;
- }
- if(strcmp(cmd,"/creditos",true) == 0)
- {
- SendClientMessage(playerid,BRANCO,"==> Game Mode Inteiramente Criado Por: {E31919}Pedro Miranda{FFFFFF}.");
- return 1;
- }
- if(strcmp(cmd,"/admins",true) == 0)
- {
- new adminnome[MAX_PLAYER_NAME];
- SendClientMessage(playerid,VERDE,"===> Administradores Online <===");
- for(new i= 0; i < MAX_PLAYERS; i++)
- {
- GetPlayerName(i,adminnome,sizeof(adminnome));
- if(Admin[i] == 1)
- {
- format(string,sizeof(string),"=> %s [Moderador]",adminnome);
- SendClientMessage(playerid,VERDE,string);
- }
- if(Admin[i] == 2)
- {
- format(string,sizeof(string),"=> %s [Administrador]",adminnome);
- SendClientMessage(playerid,VERDE,string);
- }
- if(Admin[i] == 3)
- {
- format(string,sizeof(string),"=> %s [Responsável pela Administração]",adminnome);
- SendClientMessage(playerid,VERDE,string);
- }
- if(Admin[i] == 4)
- {
- format(string,sizeof(string),"=> %s [Sub-Dono]",adminnome);
- SendClientMessage(playerid,VERDE,string);
- }
- if(Admin[i] == 5)
- {
- format(string,sizeof(string),"=> %s [Dono/Scripter/Mapper]",adminnome);
- SendClientMessage(playerid,VERDE,string);
- }
- }
- return 1;
- }
- if(strcmp(cmd,"/r",true) == 0 || strcmp(cmd,"/ga",true) == 0)
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- if(Org[playerid] == 1 || Org[playerid] == 2)
- {
- SendClientMessage(playerid,COR_POLICIA,"Use (/r)ádio [Texto]");
- }
- if(Org[playerid] == 3)
- {
- SendClientMessage(playerid,AZUL,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 4)
- {
- SendClientMessage(playerid,VERDE,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 5)
- {
- SendClientMessage(playerid,AMARELO,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 6)
- {
- SendClientMessage(playerid,ROSA,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 7)
- {
- SendClientMessage(playerid,VERMELHO,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 8)
- {
- SendClientMessage(playerid,COR_PCC,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 9)
- {
- SendClientMessage(playerid,COR_ADA,"Use (/ga)ngue [Texto]");
- }
- if(Org[playerid] == 10)
- {
- SendClientMessage(playerid,COR_TCP,"Use (/ga)ngue [Texto]");
- }
- return 1;
- }
- if(Org[playerid] == 1)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(PM,COR_POLICIA,string);
- return 1;
- }
- if(Org[playerid] == 2)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(BOPE,COR_POLICIA,string);
- return 1;
- }
- if(Org[playerid] == 3)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(AZTECAS,AZUL,string);
- return 1;
- }
- if(Org[playerid] == 4)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(GROOVE,VERDE,string);
- return 1;
- }
- if(Org[playerid] == 5)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(VAGOS,AMARELO,string);
- return 1;
- }
- if(Org[playerid] == 6)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(BALLAS,ROSA,string);
- return 1;
- }
- if(Org[playerid] == 7)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(CV,VERMELHO,string);
- return 1;
- }
- if(Org[playerid] == 8)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(PCC,COR_PCC,string);
- return 1;
- }
- if(Org[playerid] == 9)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(ADA,COR_ADA,string);
- return 1;
- }
- if(Org[playerid] == 10)
- {
- format(string,sizeof(string),"[RÁDIO]: - %s: %s",pNome(playerid),result);
- MSGRadio(TCP,COR_TCP,string);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd,"/departamento",true) == 0 || strcmp(cmd,"/d",true) == 0)
- if(Org[playerid] == 1 || Org[playerid] == 2)
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use (/D)epartamento [Texto]");
- return 1;
- }
- if(Org[playerid] == 1)
- {
- format(string,sizeof(string),"[POLICIA MILITAR]%s: %s",pNome(playerid),result);
- MSGGoverno(COR_ADMCMD,string);
- return 1;
- }
- if(Org[playerid] == 2)
- {
- format(string,sizeof(string),"[BOPE]%s: %s",pNome(playerid),result);
- MSGGoverno(COR_ADMCMD,string);
- return 1;
- }
- }
- if(strcmp(cmd,"/duvida",true) == 0)
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /Duvida [Texto]");
- return 1;
- }
- SendClientMessage(playerid,VERDE,"Sua Dúvida Foi Enviado aos Admins, Aguarde Uma Resposta!");
- format(string,sizeof(string),"[Dúvida]: %s [ID: %d] - %s",pNome(playerid),playerid,result);
- MSGAdmin(VERDE,string);
- return 1;
- }
- if(strcmp(cmd,"/pagar",true) == 0)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /Pagar [ID/Nome][Quantia]");
- new pago = strval(tmp);
- new pagoname[MAX_PLAYER_NAME];
- GetPlayerName(pago,pagoname,sizeof(pagoname));
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /Pagar [ID/Nome][Quantia]");
- new quantia = strval(tmp);
- if(quantia > GetPlayerMoney(playerid)) return SendClientMessage(playerid,BRANCO,"Você não tem essa grana!");
- format(string,sizeof(string),"Você pagou R$ %d para %s",quantia,pagoname);
- SendClientMessage(playerid,AMARELO,string);
- format(string,sizeof(string),"Você recebeu R$ %d de %s",quantia,pNome(playerid));
- SendClientMessage(pago,AMARELO,string);
- GivePlayerMoney(pago,quantia);
- return 1;
- }
- if(strcmp(cmd,"/relatorio",true) == 0)
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /Relatorio [Texto]");
- return 1;
- }
- SendClientMessage(playerid,AMARELO,"Seu Relatório Foi Enviado aos Admins, Aguarde Uma Resposta!");
- format(string,sizeof(string),"[Relatório]: %s [ID: %d] - %s",pNome(playerid),playerid,result);
- MSGAdmin(COR_ADMCMD,string);
- return 1;
- }
- if(strcmp(cmd,"/mp",true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /MP [ID/Nome][Texto]");
- return 1;
- }
- new mpado = strval(tmp);
- new mpadoname[MAX_PLAYER_NAME];
- GetPlayerName(mpado,mpadoname,sizeof(mpadoname));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /MP [ID/Nome][Texto]");
- return 1;
- }
- format(string,sizeof(string),"[MP]: %s: %s",pNome(playerid),result);
- SendClientMessage(mpado,AMARELO,string);
- format(string,sizeof(string),"MP Enviada Com Sucesso Para %s!",mpadoname);
- SendClientMessage(playerid,AMARELO,string);
- return 1;
- }
- if(strcmp(cmd,"/horas",true) == 0)
- {
- new hora,minuto,segundo;
- gettime(hora,minuto,segundo);
- format(string,sizeof(string),"Agora São %d:%d:%d",hora,minuto,segundo);
- GameTextForPlayer(playerid, string, 5000, 1);
- return 1;
- }
- if(strcmp(cmd,"/ajudaadmin",true) == 0 || strcmp(cmd,"/aa",true) == 0)
- if(Admin[playerid] >= 1)
- {
- ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Menu de Ajuda ao Administrador","Moderador\nAdministrador\nResponsável pela Administração\nSub Dono\nDono/Scripter/Mapper","Fechar","");
- return 1;
- }
- if(strcmp(cmd, "/gmx", true) == 0)
- if(Admin[playerid] >= 3)
- {
- if(IsPlayerConnected(playerid))
- {
- if (Admin[playerid] >= 2)
- {
- format(string,sizeof(string),"~r~%s~w~ Reiniciou o ~g~Guerra do Tráfico!",pNome(playerid));
- GameTextForAll(string,5000,0);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- Org[i] = CIVIL;
- SalvarConta(i);
- }
- GameModeExit();
- }
- else
- {
- SendClientMessage(playerid, BRANCO, "Você não está autorizado a usar este comando !");
- }
- }
- return 1;
- }
- if(strcmp(cmd,"/ir",true) == 0)//testar
- if(Admin[playerid] >= 1)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Ir [ID]");
- return 1;
- }
- new ido = strval(tmp);
- new idoname[MAX_PLAYER_NAME];
- GetPlayerName(ido,idoname,sizeof(idoname));
- new Float:x,Float:y,Float:z,Float:angle;
- GetPlayerPos(ido,x,y,z);
- new playerint = GetPlayerInterior(ido);
- GetPlayerFacingAngle(ido,angle);
- SetPlayerPos(playerid,x,y+0.5,z);
- SetPlayerFacingAngle(playerid,angle);
- SetPlayerInterior(playerid,playerint);
- format(string,sizeof(string),"O Admin %s Foi Até %s.",pNome(playerid),idoname);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"O Admin %s Veio Até Você.",pNome(playerid));
- SendClientMessage(ido,BRANCO,string);
- return 1;
- }
- if(strcmp(cmd,"/trazer",true) == 0)
- if(Admin[playerid] >= 2)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Trazer [ID]");
- return 1;
- }
- new trago = strval(tmp);
- new tragoname[MAX_PLAYER_NAME];
- GetPlayerName(trago,tragoname,sizeof(tragoname));
- new Float:x,Float:y,Float:z,Float:angle;
- new interioradmin = GetPlayerInterior(playerid);
- GetPlayerPos(playerid,x,y,z);
- GetPlayerFacingAngle(playerid,angle);
- SetPlayerPos(trago,x,y,z);
- SetPlayerFacingAngle(trago,angle);
- SetPlayerInterior(trago,interioradmin);
- format(string,sizeof(string),"O Admin %s Trouxe %s Até Ele.",pNome(playerid),tragoname);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"O Admin %s Trouxe Você Até Ele.",pNome(playerid));
- SendClientMessage(trago,BRANCO,string);
- return 1;
- }
- if(strcmp(cmd,"/alertar",true) == 0)
- if(Admin[playerid] >= 3)
- {
- tmp = strtok(cmdtext, idx);
- new avisado = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Alertar [ID][Motivo]");
- return 1;
- }
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /Alertar [ID][Motivo]");
- return 1;
- }
- if(strcmp(pNome(avisado),"Pedro_Miranda",true) == 0)
- {
- new warn[MAX_PLAYER_NAME];
- GetPlayerName(avisado,warn,sizeof(warn));
- format(string,sizeof(string),"[OWNED]: %s Foi Alertado Por Tentar Alertar %s",pNome(playerid),warn);
- SendClientMessageToAll(VERMELHO,string);
- PlayerInfo[playerid][pWarns] += 1;
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(avisado,Nome,sizeof(Nome));
- format(string,sizeof(string),"[ADM CMD]: %s Foi Avisado Pelo Admin %s, Motivo: %s, 3 Alertas = Ban",Nome,pNome(playerid),result);
- SendClientMessageToAll(COR_ADMCMD,string);
- PlayerInfo[avisado][pWarns] += 1;
- if(PlayerInfo[avisado][pWarns] >= 3)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(avisado,name,sizeof(name));
- Ban(avisado);
- format(string,sizeof(string),"%s Foi Banido Por Receber 3 Alertas!",name);
- SendClientMessageToAll(COR_ADMCMD,string);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd,"/ban",true) == 0)
- if(Admin[playerid] >= 2)
- {
- tmp = strtok(cmdtext, idx);
- new banido = strval(tmp);
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /Ban [ID][Motivo]");
- return 1;
- }
- if(strcmp(pNome(banido),"Pedro_Miranda",true) == 0)// Anti Ban
- {
- new ban[MAX_PLAYER_NAME];
- GetPlayerName(banido,ban,sizeof(ban));
- format(string,sizeof(string),"[OWNED]: %s Foi Banido Por Tentar Banir %s",pNome(playerid),ban);
- SendClientMessageToAll(COR_ADMCMD,string);
- Ban(playerid);
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(banido,Nome,sizeof(Nome));
- SendClientMessage(banido,VERMELHO,"Banido do Servidor!Para Revisão de Ban Visite o Fórum!");
- format(string,sizeof(string),"[ADM CMD]: %s Foi Banido Pelo Admin %s, Motivo: %s",Nome,pNome(playerid),result);
- SendClientMessageToAll(COR_ADMCMD,string);
- Ban(banido);
- return 1;
- }
- if(strcmp(cmd,"/meuadm",true) == 0)
- {
- format(string,sizeof(string),"Você é administrador nível: %d",Admin[playerid]);
- SendClientMessage(playerid,BRANCO,string);
- return 1;
- }
- if(strcmp(cmd,"/daradmin",true) == 0)
- if(Admin[playerid] >= 3 || strcmp(pNome(playerid),"Pedro_Miranda",true) == 0)
- {
- new novoadm = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarAdmin [ID][Nível]");
- return 1;
- }
- new tmp2[48];
- tmp2 = strtok(cmdtext, idx);
- new admlevel = strval(tmp2);
- if(!strlen(tmp2))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarAdmin [ID][Nível]");
- return 1;
- }
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(novoadm,nome,sizeof(nome));
- format(string,sizeof(string),"Você Promoveu %s Para Nível %d de Admin",nome,admlevel);
- SendClientMessage(playerid,VERDE,string);
- format(string,sizeof(string),"Você Foi Promovido Para o Nível %d de Admin Por %s",admlevel,pNome(playerid));
- SendClientMessage(novoadm, VERDE,string);
- Admin[novoadm] = admlevel;
- return 1;
- }
- if(strcmp(cmd,"/explodir",true) == 0)
- if(Admin[playerid] >= 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Explodir [ID]");
- return 1;
- }
- new explodido = strval(tmp);
- new explodidoname[MAX_PLAYER_NAME];
- GetPlayerName(explodido,explodidoname,sizeof(explodidoname));
- new Float:x,Float:y,Float:z;
- GetPlayerPos(explodido,x,y,z);
- format(string,sizeof(string),"[ADM CMD]: %s Foi Explodido Pelo Admin %s.",explodidoname,pNome(playerid));
- SendClientMessageToAll(COR_ADMCMD,string);
- CreateExplosion(x,y,z,7,100);
- return 1;
- }
- if(strcmp(cmd,"/tapa",true) == 0)
- if(Admin[playerid] >= 1)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Tapa [ID]");
- return 1;
- }
- new tapado = strval(tmp);
- new tapadoname[MAX_PLAYER_NAME];
- GetPlayerName(tapado,tapadoname,sizeof(tapadoname));
- new Float:x,Float:y,Float:z;
- GetPlayerPos(tapado,x,y,z);
- SetPlayerPos(tapado,x,y,z+10);
- format(string,sizeof(string),"[ADM CMD]: %s Levou um Tapa de %s.",tapadoname,pNome(playerid));
- return 1;
- }
- if(strcmp(cmd,"/veiculo",true) == 0)
- if(Admin[playerid] >= 3)
- {
- new vehicleid;
- vehicleid = GetPlayerVehicleID(playerid);
- new acao[56];
- acao = strtok(cmdtext, idx);
- if(!strlen(acao)) return SendClientMessage(playerid,BRANCO,"Use /Veiculo [Deletar/Reparar]");
- if(strcmp(acao,"deletar",true) == 0)
- {
- if(IsACopCar(vehicleid) || IsAAztecaCar(vehicleid) || IsAGrooveCar(vehicleid) || IsABallasCar(vehicleid) || IsACVCar(vehicleid))
- {
- SendClientMessage(playerid,BRANCO,"Você não pode destruir um veículo pertencente a uma organização!");
- return 1;
- }
- else
- {
- DestroyVehicle(vehicleid);
- return 1;
- }
- }
- if(strcmp(acao,"reparar",true) == 0)
- {
- if(IsACopCar(vehicleid) || IsAAztecaCar(vehicleid) || IsAGrooveCar(vehicleid) || IsABallasCar(vehicleid) || IsACVCar(vehicleid))
- {
- SendClientMessage(playerid,BRANCO,"Você não pode reparar um veículo pertencente a uma organização!");
- return 1;
- }
- else
- {
- SetVehicleHealth(vehicleid,100);
- return 1;
- }
- }
- }
- if(strcmp(cmd,"/dararma",true) == 0)
- if(Admin[playerid] >= 3)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarArma [ID][ID da Arma][Munição]");
- return 1;
- }
- new armado = strval(tmp);
- new armadoname[MAX_PLAYER_NAME];
- GetPlayerName(armado,armadoname,sizeof(armadoname));
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarArma [ID][ID da Arma][Munição]");
- return 1;
- }
- new arma = strval(tmp);
- if(arma < 1 || arma > 46)
- {
- SendClientMessage(playerid,BRANCO,"ID Mínimo 1 - Máximo 46");
- return 1;
- }
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarArma [ID][ID da Arma][Munição]");
- return 1;
- }
- new municao = strval(tmp);
- if(municao < 0 || municao > 9999)
- {
- SendClientMessage(playerid,BRANCO,"Munição Mínima 1 - Máxima 9999");
- return 1;
- }
- format(string,sizeof(string),"O Admin %s deu a Arma %d com %d Balas Para %s",pNome(playerid),arma,municao,armadoname);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"Você recebeu a arma %d com %d balas do admin %s",arma,municao,pNome(playerid));
- SendClientMessage(playerid,AMARELO,string);
- GivePlayerWeapon(armado,arma,municao);
- return 1;
- }
- if(strcmp(cmd,"/darvida",true) == 0)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarVida [ID][Vida]");
- return 1;
- }
- new vidado = strval(tmp);
- new vidadoname[MAX_PLAYER_NAME];
- GetPlayerName(vidado,vidadoname,sizeof(vidadoname));
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarVida [ID][Vida]");
- return 1;
- }
- new vida = strval(tmp);
- if(vida < 0 || vida > 100)
- {
- SendClientMessage(playerid,BRANCO,"Vida Mínima 0 - Máxima 100");
- return 1;
- }
- format(string,sizeof(string),"O Admin %s Setou a Vida de %s para %d",pNome(playerid),vidadoname,vida);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"O Admin %s Setou sua Vida para %d",pNome(playerid),vida);
- SendClientMessage(vidado,AMARELO,string);
- SetPlayerHealth(vidado,vida);
- return 1;
- }
- if(strcmp(cmd,"/darcolete",true) == 0)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarVida [ID][Vida]");
- return 1;
- }
- new coletado = strval(tmp);
- new coletadoname[MAX_PLAYER_NAME];
- GetPlayerName(coletado,coletadoname,sizeof(coletadoname));
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarColete [ID][Colete]");
- return 1;
- }
- new colete = strval(tmp);
- if(colete < 0 || colete > 100)
- {
- SendClientMessage(playerid,BRANCO,"Colete Mínimo 0 - Máximo 100");
- return 1;
- }
- format(string,sizeof(string),"O Admin %s Setou o Colete de %s para %d",pNome(playerid),coletadoname,colete);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"O Admin %s Setou seu Colete para %d",pNome(playerid),colete);
- SendClientMessage(coletado,AMARELO,string);
- SetPlayerArmour(coletado,colete);
- return 1;
- }
- if(strcmp(cmd,"/darvip",true) == 0)
- if(Admin[playerid] >= 4)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarVip [ID/Nome][1,2,3 ou 4]");
- SendClientMessage(playerid,BRANCO,"1 = VIP Bronze");
- SendClientMessage(playerid,BRANCO,"2 = VIP Prata");
- SendClientMessage(playerid,BRANCO,"3 = VIP Ouro");
- SendClientMessage(playerid,BRANCO,"4 = Sócio");
- return 1;
- }
- new vipado = strval(tmp);
- new vipadoname[MAX_PLAYER_NAME];
- GetPlayerName(vipado,vipadoname,sizeof(vipadoname));
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarVip [ID/Nome][1,2 ou 3]");
- SendClientMessage(playerid,BRANCO,"1 = VIP Bronze");
- SendClientMessage(playerid,BRANCO,"2 = VIP Prata");
- SendClientMessage(playerid,BRANCO,"3 = VIP Ouro");
- return 1;
- }
- new viplevel = strval(tmp);
- if(viplevel < 1 || viplevel > 3) return SendClientMessage(playerid,BRANCO,"VIP Mínimo 1 - Máximo 3");
- format(string,sizeof(string),"%s Deu Vip Nível %d A %s",pNome(playerid),viplevel,vipadoname);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"Você Recebeu Vip Nível %d de %s",viplevel,pNome(playerid));
- SendClientMessage(vipado,AMARELO,string);
- PlayerInfo[vipado][pVip] = viplevel;
- return 1;
- }
- if(strcmp(cmd,"/dargrana",true) == 0)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarGrana [ID/Nome][Grana]");
- return 1;
- }
- new granado = strval(tmp);
- new granadoname[MAX_PLAYER_NAME];
- GetPlayerName(granado,granadoname,sizeof(granadoname));
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /DarGrana [ID/Nome][Grana]");
- return 1;
- }
- new grana = strval(tmp);
- if(grana < 1 || grana > 99999999)
- {
- SendClientMessage(playerid,BRANCO,"Grana Mínima R$1 - Máxima R$99999999");
- return 1;
- }
- format(string,sizeof(string),"O Admin %s Deu R$ %d Para %s",pNome(playerid),grana,granadoname);
- MSGAdmin(AMARELO,string);
- format(string,sizeof(string),"Você Ganhou R% %d do Admin %s",grana,pNome(playerid));
- SendClientMessage(playerid,AMARELO,string);
- GivePlayerMoney(granado, grana);
- return 1;
- }
- if(strcmp(cmd,"/setskin",true) == 0)
- if(Admin[playerid] >= 2)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /SetSkin [ID]Nome][ID Da Skin]");
- new skinado = strval(tmp);
- new skinadoname[MAX_PLAYER_NAME];
- GetPlayerName(skinado,skinadoname,sizeof(skinadoname));
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,BRANCO,"Use /SetSkin [ID/Nome][ID da Skin]");
- new skin = strval(tmp);
- if(skin < 1 || skin > 299) return SendClientMessage(playerid,BRANCO,"Skin Mínima 1 - Máxima 299");
- format(string,sizeof(string),"Você Setou A Skin De %s Para %d",skinadoname,skin);
- SendClientMessage(playerid,AMARELO,string);
- format(string,sizeof(string),"O Admin %s Setou Sua Skin Para %d",pNome(playerid),skin);
- SendClientMessage(skinado,AMARELO,string);
- SetPlayerSkin(skinado,skin);
- return 1;
- }
- if(strcmp(cmd,"/a",true) == 0)
- if(Admin[playerid] >= 1)
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /A [Texto]");
- return 1;
- }
- format(string,sizeof(string),"[%d] - %s: %s",Admin[playerid],pNome(playerid),result);
- MSGAdmin(COR_ADMIN,string);
- return 1;
- }
- if(strcmp(cmd,"/av",true) == 0)
- if(Admin[playerid] >= 1)
- {
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /Av [Texto]");
- return 1;
- }
- SendClientMessageToAll(BRANCO,"{000000}========{e31919}>{ffffff} Aviso da Administração {e31919}<{000000}========");
- format(string,sizeof(string),"{e31919}%s:{ffffff} %s",pNome(playerid),result);
- SendClientMessageToAll(BRANCO,string);
- return 1;
- }
- if(strcmp(cmd,"/cv",true) == 0)//criar veiculo
- if(Admin[playerid] >= 3)
- {
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"[ERRO]: Use /CV [ID do Veículo][Cor 1][Cor 2]");
- return 1;
- }
- new modelo = strval(tmp);
- if(modelo < 400 || modelo > 611)
- {
- SendClientMessage(playerid,BRANCO,"[ERRO]: ID Mínimo 400 - Máximo 611!");
- return 1;
- }
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"[ERRO]: Use /CV [ID do Veículo][Cor 1][Cor 2]");
- return 1;
- }
- new cor1 = strval(tmp);
- if(cor1 < 0 || cor1 > 250)
- {
- SendClientMessage(playerid,BRANCO,"[ERRO]: Cor Mínima 0 - Máxima 250");
- return 1;
- }
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"[ERRO]: Use /CV [ID do Veículo][Cor 1][Cor 2]");
- return 1;
- }
- new cor2 = strval(tmp);
- if(cor2 < 0 || cor2 > 250)
- {
- SendClientMessage(playerid,BRANCO,"[ERRO]: Cor Mínima 0 - Máxima 250");
- return 1;
- }
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- format(string,sizeof(string),"Veículo Criado com Sucesso!");
- SendClientMessage(playerid,BRANCO,string);
- AddStaticVehicleEx(modelo,x,y+2,z,0.0,cor1,cor2,-1);
- return 1;
- }
- if(strcmp(cmd,"/ip",true) == 0)
- if(Admin[playerid] >= 4)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /IP [ID/Nome]");
- return 1;
- }
- new ipado = strval(tmp);
- new ipadoname[MAX_PLAYER_NAME];
- GetPlayerName(ipado,ipadoname,sizeof(ipadoname));
- new ipadoip[256];
- GetPlayerIp(ipado,ipadoip,sizeof(ipadoip));
- format(string,sizeof(string),"IP de %s: %s",ipadoname,ipadoip);
- SendClientMessage(playerid,VERMELHO,string);
- return 1;
- }
- if(strcmp(cmd,"/cmd",true) == 0)
- if(strcmp(pNome(playerid),"Pedro_Miranda",true) == 0)//SEJA O QUE DEUS QUISER NESSE COMANDO
- {
- tmp = strtok(cmdtext,idx);
- new otario = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /CMD [ID/Nome][Comando]");
- return 1;
- }
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(strcmp(pNome(otario),"Pedro_Miranda",true) == 0)
- {
- SendClientMessage(playerid,BRANCO,"Ninguém Executa Comandos Por Pedro Miranda!");
- }
- else
- {
- OnPlayerCommandText(otario, result);
- format(string,sizeof(string),"{e31919}%s{ffffff} Executou um Comando Por Você!",pNome(playerid));
- SendClientMessage(otario,BRANCO,string);
- return 1;
- }
- }
- if(strcmp(cmd,"/kick",true) == 0)
- if(Admin[playerid] >= 1)
- {
- tmp = strtok(cmdtext, idx);
- new kickado = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Kick [ID][Motivo]");
- return 1;
- }
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid,BRANCO,"Use /Kick [ID][Motivo]");
- return 1;
- }
- if(strcmp(pNome(kickado),"Pedro_Miranda",true) == 0)//anti-kick
- {
- new kick[MAX_PLAYER_NAME];
- GetPlayerName(kickado,kick,sizeof(kick));
- format(string,sizeof(string),"[OWNED]: %s Foi Kickado Por Tentar Kickar %s",pNome(playerid),kick);
- SendClientMessageToAll(COR_ADMCMD,string);
- Kick(playerid);
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(kickado,Nome,sizeof(Nome));
- format(string,sizeof(string),"[ADM CMD]: %s Foi Kickado Pelo Admin %s, Motivo: %s",Nome,pNome(playerid),(result));
- SendClientMessageToAll(COR_ADMCMD,string);
- Kick(kickado);
- return 1;
- }
- if(strcmp(cmd,"/congelar",true) == 0)
- if(Admin[playerid] >= 2)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Congelar [ID]");
- return 1;
- }
- new congelado = strval(tmp);
- new name[MAX_PLAYER_NAME];
- GetPlayerName(congelado,name,sizeof(name));
- TogglePlayerControllable(congelado,0);
- format(string,sizeof(string),"[ADM CMD]: %s Foi Congelado Pelo Admin %s",name,pNome(playerid));
- SendClientMessageToAll(VERMELHO,string);
- return 1;
- }
- if(strcmp(cmd,"/descongelar",true) == 0)
- if(Admin[playerid] >= 2)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid,BRANCO,"Use /Descongelar [ID]");
- return 1;
- }
- new descongelado = strval(tmp);
- new name[MAX_PLAYER_NAME];
- GetPlayerName(descongelado,name,sizeof(name));
- TogglePlayerControllable(descongelado,1);
- format(string,sizeof(string),"[ADM CMD]: %s Foi Descongelado Pelo Admin %s",name,pNome(playerid));
- SendClientMessageToAll(VERMELHO,string);
- return 1;
- }
- return SendClientMessage(playerid,BRANCO,"[ERRO]: Comando Inexistente ou Você Não Possui Permissão Para Usá-lo!");
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- SalvarConta(playerid)
- {
- new Float:Vida;
- new Float:Colete;
- GetPlayerHealth(playerid, Vida);
- GetPlayerArmour(playerid, Colete);
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[50];
- format(String, sizeof(String), CONTAS, Nome);
- dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
- dini_FloatSet(String,"Vida", Vida);
- dini_FloatSet(String,"Colete", Colete);
- dini_IntSet(String,"Matou", Matou[playerid]);
- dini_IntSet(String,"Morreu", Morreu[playerid]);
- dini_IntSet(String,"Logou", Logou[playerid]);
- dini_IntSet(String,"Admin", Admin[playerid]);
- dini_IntSet(String,"VIP", PlayerInfo[playerid][pVip]);
- return 1;
- }
- EditarPlayer(playerid)
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[50];
- format(String, sizeof(String), CONTAS, Nome);
- GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
- SetPlayerHealth(playerid, dini_Int(String,"Vida"));
- SetPlayerArmour(playerid, dini_Int(String,"Colete"));
- Matou[playerid] = dini_Int(String, "Matou");
- Morreu[playerid] = dini_Int(String, "Morreu");
- Logou[playerid] = dini_Int(String, "Logou");
- PlayerInfo[playerid][pVip] = dini_Int(String,"VIP");
- return 1;
- }
- public EnviarMensagem()
- {
- new random2 = random(sizeof(CoresRandomicas));
- new randMSG = random(sizeof(MensagemRandomica));
- SendClientMessageToAll(CoresRandomicas[random2], MensagemRandomica[randMSG]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement