Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include a_samp
- #include zcmd
- #include sscanf
- #include dini//O POVO FALA Q É ULTRAPASSADA MAIS É A MAIS FACIL DE SE ENTENDER..
- #include anticheater // ANT CHEAT, hacks fdms..
- #define i playerid
- #define QUEROSER 1
- #define mochila 1
- #define msg 0x0080C0FF
- #define azul 0x004040AA
- #define d 999
- new arma[12];
- new municao[12];
- new money;
- new skin;
- new name[24];
- new Arquivo[44];
- new Grana[22];
- main()
- {
- print("\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- print(" Policia vs Bandido - FORUM SA-MP");
- print(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
- }
- stock ArmasPB(i)
- {
- GivePlayerWeapon(i, 24, d);
- GivePlayerWeapon(i, 31, d);
- GivePlayerWeapon(i, 29, d);
- GivePlayerWeapon(i, 25, d);
- GivePlayerWeapon(i, 44, d);
- SetPlayerArmour(playerid, 100.0);
- return 1;
- }
- public OnGameModeInit()
- {
- SetGameModeText("PB [v1.0]");
- AddPlayerClass(47,2175.1094,-992.5814,62.9751,178.7098,0,0,0,0,0,0);
- AddPlayerClass(284,1525.5659,-1677.7239,5.8906,271.7154,0,0,0,0,0,0);
- AddPlayerClass(29,1481.0448,-1770.7322,18.7958,357.2687,0,0,0,0,0,0);
- AddStaticVehicleEx(545,2196.5000000,-1007.5000000,62.2000000,74.0000000,-1,-1,15); //Hustler
- AddStaticVehicleEx(567,2178.1000000,-1010.7000000,62.7000000,80.0000000,-1,-1,15); //Savanna
- AddStaticVehicleEx(468,2162.7000000,-1000.9000000,62.6000000,0.0000000,-1,-1,15); //Sanchez
- AddStaticVehicleEx(468,2164.3000000,-1001.2000000,62.6000000,0.0000000,-1,-1,15); //Sanchez
- AddStaticVehicleEx(404,2172.1000000,-1002.6000000,62.6000000,82.0000000,-1,-1,15); //Perrenial
- AddStaticVehicleEx(523,1572.6000000,-1634.0000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
- AddStaticVehicleEx(523,1571.4000000,-1633.9000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
- AddStaticVehicleEx(523,1570.1000000,-1633.9000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
- AddStaticVehicleEx(523,1568.9000000,-1633.9000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
- AddStaticVehicleEx(497,1565.7000000,-1642.8000000,28.6000000,0.0000000,-1,-1,15); //Police Maverick
- AddStaticVehicleEx(597,1572.9000000,-1608.9000000,13.5000000,0.0000000,-1,-1,15); //Police Car (SFPD)
- AddStaticVehicleEx(597,1570.0000000,-1609.3000000,13.5000000,0.0000000,-1,-1,15); //Police Car (SFPD)
- AddStaticVehicleEx(598,1567.1000000,-1609.7000000,13.5000000,0.0000000,-1,-1,15); //Police Car (LVPD)
- AddStaticVehicleEx(599,1564.5000000,-1610.6000000,13.7000000,0.0000000,-1,-1,15); //Police Ranger
- AddStaticVehicleEx(599,1561.9000000,-1610.8000000,13.7000000,0.0000000,-1,-1,15); //Police Ranger
- AddStaticVehicleEx(427,1604.4000000,-1629.0000000,12.5000000,0.0000000,-1,-1,15); //Enforcer
- AddStaticVehicleEx(427,1601.1000000,-1628.9000000,12.5000000,0.0000000,-1,-1,15); //Enforcer
- AddStaticVehicleEx(596,1604.2000000,-1613.1000000,13.5000000,92.0000000,-1,-1,15); //Police Car (LSPD)
- AddStaticVehicleEx(596,1604.2000000,-1616.1000000,13.5000000,100.0000000,-1,-1,15); //Police Car (LSPD)
- CreateObject(1571,2186.2000000,-1015.6000000,63.1000000,0.0000000,0.0000000,196.0000000); //object(cj_noodle_1) (1)
- CreateObject(1238,2159.2000000,-1022.4000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (1)
- CreateObject(1238,2160.3000000,-1022.4000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (2)
- CreateObject(1238,2161.6000000,-1022.3000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (3)
- CreateObject(1238,2163.3000000,-1022.3000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (4)
- CreateObject(1238,2164.8000000,-1022.4000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (5)
- CreateObject(1238,2166.8000000,-1021.7000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (6)
- CreateObject(1238,2082.4000000,-986.3000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (7)
- CreateObject(1238,2082.9000000,-984.8000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (8)
- CreateObject(1238,2083.1000000,-982.9000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (9)
- CreateObject(1238,2083.4000000,-981.2000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (10)
- CreateObject(1238,2083.9000000,-979.0000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (11)
- CreateObject(10079,2157.3000000,-1021.3000000,64.3000000,0.0000000,0.0000000,0.0000000); //object(pyr_top_sfe) (1)
- CreateObject(12954,2204.7000000,-1008.9000000,61.3000000,0.0000000,0.0000000,0.0000000); //object(sw_furnipile01) (1)
- CreateObject(12954,2205.8000000,-1024.2000000,60.7000000,0.0000000,0.0000000,0.0000000); //object(sw_furnipile01) (2)
- CreateObject(3511,2209.3000000,-1002.2000000,62.7000000,0.0000000,0.0000000,0.0000000); //object(vgsn_nitree_b01) (1)
- CreateObject(3511,1541.5000000,-1638.2000000,13.0000000,0.0000000,0.0000000,0.0000000); //object(vgsn_nitree_b01) (2)
- UsePlayerPedAnims();
- return 1;
- }
- public OnPlayerSpawn(i)
- {
- SendClientMessage(i,msg,"Você foi equipado com sucesso.");
- SendClientMessage(i,msg,"\nLeia suas regras:");
- SendClientMessage(i,msg,"Policial:{FFFFFF} /regrasp");
- SendClientMessage(i,msg,"Bandido:{FFFFFF} /regrasb");
- ArmasPB(i);
- return 1;
- }
- public OnPlayerRequestClass(i, classid)
- {
- if((classid >= 0) && (classid <= 1))
- {
- GameTextForPlayer(playerid,"~h~~r~ Bandido",5000,5);
- }
- if((classid >= 1) && (classid <= 2))
- {
- GameTextForPlayer(playerid,"~h~~b~ Policial",5000,5);
- }
- if((classid >= 2) && (classid <= 3))
- {
- GameTextForPlayer(playerid,"~h~~b~ Playboy",5000,5);
- }
- SetPlayerPos(playerid,1157.7001,-2036.9989,69.0078);
- SetPlayerCameraPos(playerid,1163.6348,-2036.7839,69.0078);
- SetPlayerCameraLookAt(playerid,1161.7328,-2036.7570,69.0078);
- SetPlayerFacingAngle(playerid, 270.8216);
- return 1;
- }
- public OnPlayerConnect(i)
- {
- new tem;
- GetPlayerName(playerid,name,23);
- tem = dini_Int("%s",name);
- GivePlayerMoney(i,tem);
- GetPlayerName(playerid,name,22);
- new string[128];
- format(string,sizeof(string), "[PB]{FFFFFF} %s entrou no servidor.",name);
- SendClientMessageToAll(msg,string);
- SendClientMessage(i,msg,"Bem vindo ao {FFFFFF}Policia vs Bandido");
- SendClientMessage(i,msg,"Escolha se você quer se bandido ou policial:");
- return 1;
- }
- public OnPlayerDisconnect(i, reason)
- {
- GetPlayerName(playerid,name,24);
- format(Arquivo,44,"%s.ini",name);
- Grana[21] = GetPlayerMoney(i);
- dini_Set(Arquivo,"Grana",Grana);
- return 1;
- }
- CMD:disfarcar(i)
- {
- SetPlayerSkin(i, 20);
- return 1;
- }
- CMD:comandos(i)
- {
- ShowPlayerDialog(i,0,DIALOG_STYLE_MSGBOX,"{FFFFFF}[{31478B}P{9F2020}B{FFFFFF}] Comandos","/creditos, /mochila, /regrasp, /regrasb\n/baseado, /handsup, /disfarcar","Ok","Fechar");
- return 1;
- }
- CMD:creditos(i)
- {
- ShowPlayerDialog(i,0,DIALOG_STYLE_MSGBOX,"{FFFFFF}[{31478B}P{9F2020}B{FFFFFF}] Creditos","Scripter: Joao Victor\nMapper: Joao Victor\nAnt-Xiter: steak(forum.samp)\nAgradecimentos: Forum SA-MP\n","Ok","Fechar");
- return 1;
- }
- CMD:mochila(i)
- {
- ShowPlayerDialog(i, mochila, DIALOG_STYLE_LIST, "{FFFFFF}[{31478B}P{9F2020}B{FFFFFF}]Mochila", "Guardar Armas\nRetirar Armas\nGuardar Grana\nRetirar Grana\nGuardar roupa\nRetirar Roupa", "Ok", "Cancelar");
- return 1;
- }
- //ADMINISTRACAO
- CMD:kick(i, params[])
- {
- if(IsPlayerAdmin(playerid)) {
- new id;
- if(sscanf(params, "u", id))
- return SendClientMessage(playerid, msg, "Uso:{FFFFFF} /kick [playerid]");
- //NAO SEI SE ESTA FUNCIONADO, SE NAO ESTIVER ME CORRIJAM..
- Kick(id);
- }
- return 1;
- }
- CMD:ban(i, params[])
- {
- if(IsPlayerAdmin(playerid)) {
- new id;
- if(sscanf(params, "u", id))
- return SendClientMessage(playerid, msg, "Uso:{FFFFFF} /ban [playerid]");
- Ban(id);
- }
- return 1;
- }
- CMD:rc(i)
- {
- if(IsPlayerAdmin(playerid)) {
- for(new x = 0; x < MAX_VEHICLES ; x++)
- {
- SetVehicleToRespawn(x);
- }
- }
- return 1;
- }
- CMD:anrc(i)
- {
- if(IsPlayerAdmin(playerid)) {
- SendClientMessageToAll(msg,"Aviso: rc(respawn car) em segundos!!!");
- }
- return 1;
- }
- CMD:regrasp(i)
- {
- ShowPlayerDialog(i,0,DIALOG_STYLE_MSGBOX,"{FFFFFF}[{31478B}P{9F2020}B{FFFFFF}] Regras","1~ Sair atirando em suspeitos desarmardos,\n2~ Caso seja suspeito peça /handsup,\n3~ Prenda só se for traficante ou drogado,\n4~ Respeitar membros da equipe.","Ok","Fechar");
- return 1;
- }
- CMD:regrasb(i)
- {
- ShowPlayerDialog(i,0,DIALOG_STYLE_MSGBOX,"{FFFFFF}[{31478B}P{9F2020}B{FFFFFF}] Regras","1~ Sair atirando em policiais,pode da um problemão,\n2~ Se for um policial investigando mate-o,\n3~ Defenda sua base ate a morte, e sua cidade natal,\n4~ Respeitar membros da equipe.","Ok","Fechar");
- return 1;
- }
- CMD:baseado(i)
- {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
- GameTextForPlayer(playerid,"~w~Fumando Baseado~r~.~y~.~g~.", 3000,1);
- SendClientMessage(i,msg,"Baseado{FFFFFF} ativado.");
- SetPlayerDrunkLevel(playerid,30000);
- SetTimer("FicarNormal",60000,false);
- return 1;
- }
- CMD:handsup(i)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
- SendClientMessage(i,msg,"Handsup{FFFFFF} ativado.");
- return 1;
- }
- public OnDialogResponse(i, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == mochila)
- {
- if(listitem == 0)
- {
- GetPlayerWeaponData(i, 1, arma[1], municao[1]);
- GetPlayerWeaponData(i, 2, arma[2], municao[2]);
- GetPlayerWeaponData(i, 3, arma[3], municao[3]);
- GetPlayerWeaponData(i, 4, arma[4], municao[4]);
- GetPlayerWeaponData(i, 5, arma[5], municao[5]);
- GetPlayerWeaponData(i, 6, arma[6], municao[6]);
- GetPlayerWeaponData(i, 7, arma[7], municao[7]);
- GetPlayerWeaponData(i, 8, arma[8], municao[8]);
- GetPlayerWeaponData(i, 9, arma[9], municao[9]);
- GetPlayerWeaponData(i, 10, arma[10], municao[10]);
- GetPlayerWeaponData(i, 11, arma[11], municao[11]);
- ResetPlayerWeapons(i);
- SendClientMessage(i, msg,"[MSG]{FFFFFF} Você guardou suas armas com sucesso.");
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(i, arma[1], municao[1]);
- GivePlayerWeapon(i, arma[2], municao[2]);
- GivePlayerWeapon(i, arma[3], municao[3]);
- GivePlayerWeapon(i, arma[4], municao[4]);
- GivePlayerWeapon(i, arma[5], municao[5]);
- GivePlayerWeapon(i, arma[6], municao[6]);
- GivePlayerWeapon(i, arma[7], municao[7]);
- GivePlayerWeapon(i, arma[8], municao[8]);
- GivePlayerWeapon(i, arma[9], municao[9]);
- GivePlayerWeapon(i, arma[10], municao[10]);
- GivePlayerWeapon(i, arma[11], municao[11]);
- SendClientMessage(i, msg,"[MSG]{FFFFFF} Você retirou suas armas com sucesso.");
- }
- if(listitem == 2)
- {
- money = GetPlayerMoney(i);
- ResetPlayerMoney(i);
- SetPlayerAttachedObject(i, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
- SendClientMessage(i, msg,"[MSG]{FFFFFF} Você guardou sua grana.");
- }
- }
- if(listitem == 3)
- {
- GivePlayerMoney(i, money);
- SendClientMessage(i, msg,"[MSG]{FFFFFF} Você pegou sua grana.");
- RemovePlayerAttachedObject(i,3);
- }
- if(listitem == 4)
- {
- skin = GetPlayerSkin(i);
- SetPlayerSkin(i,97);
- SendClientMessage(i, msg,"[MSG]{FFFFFF} Você guardou sua roupa.");
- }
- if(listitem == 5)
- {
- SetPlayerSkin(i,skin);
- SendClientMessage(i, msg,"[MSG]{FFFFFF} Você pegou sua roupa.");
- }
- return 1;
- }
- public OnPlayerControllingCheat(playerid, cheatid) {
- switch(cheatid) {
- case PLAYER_ONTEXT_FLOOD: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi kickado por flood no chat!");
- Kick(playerid);
- }
- case PLAYER_ONCONNECT_FLOOD: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por boots!");
- BanEx(playerid, #boots);
- }
- case PLAYER_ONSTATE_HACK_1: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (Puxar varios veiculos)!");
- BanEx(playerid, #cleo4 Veh);
- }
- case PLAYER_ONSTATE_HACK_2: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (CarJackHack)!");
- BanEx(playerid, #cleo4 Veh CarJackHack);
- }
- case PLAYER_ONSTATE_HACK_3: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (Puxar varios veiculos)!");
- BanEx(playerid, #cleo4 Veh);
- }
- case PLAYER_ONDEATH_HACK: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (Fake-Kill)!");
- BanEx(playerid, #FakeKill);
- }
- case PLAYER_ONPING_HIGH: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi kickado por ping alto!");
- Kick(playerid);
- }
- case PLAYER_ONFLY_HACK: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por fly!");
- BanEx(playerid, #Fly);
- }
- case PLAYER_ONSPEED_HACK_1: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por speed hack!");
- BanEx(playerid, #SpeedHack);
- }
- case PLAYER_ONSPEED_HACK_2: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por speed hack!");
- BanEx(playerid, #SpeedHack);
- }
- case PLAYER_ONMONEY_HACK: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por money hack!");
- BanEx(playerid, #MoneyHack);
- }
- case PLAYER_ONSCORE_HACK: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por score hack!");
- BanEx(playerid, #ScoreHack);
- }
- case PLAYER_ONWEAP_HACK: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por weapon hack!");
- BanEx(playerid, #WeaponHack);
- }
- case PLAYER_ONAMMO_HACK: { //Desativado temporariamente
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por ammo hack!");
- BanEx(playerid, #AmmoHack);
- }
- case PLAYER_ONBREAKCAR_HACK_1: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por car tele hack!");
- BanEx(playerid, #CarTeleHack);
- }
- case PLAYER_ONBREAKCAR_HACK_2: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por car tele hack!");
- BanEx(playerid, #CarTeleHack);
- }
- case PLAYER_ONBREAKCAR_HACK_3: {
- SendClientMessage(playerid, msg, "PB: {FFFFFF}Você foi banido por car tele hack!");
- BanEx(playerid, #CarTeleHack);
- }
- case PLAYER_ONBREAKCAR_HACK_4: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por car tele hack!");
- BanEx(playerid, #CarTeleHack);
- }
- case PLAYER_ONBREAK_HACK_1: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
- BanEx(playerid, #AirbreakHack);
- }
- case PLAYER_ONBREAK_HACK_2: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
- BanEx(playerid, #AirbreakHack);
- }
- case PLAYER_ONBREAK_HACK_3: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
- BanEx(playerid, #AirbreakHack);
- }
- case PLAYER_ONBREAK_HACK_4: {
- SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
- BanEx(playerid, #AirbreakHack);
- }
- }
- return true;
- }
- forward FicarNormal(playerid);
- public FicarNormal(playerid)
- {
- SetPlayerDrunkLevel(playerid,0);
- }
Advertisement
Add Comment
Please, Sign In to add comment