Guest User

[GM] BASE SAMP

a guest
Mar 7th, 2014
1,199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 15.92 KB | None | 0 0
  1. #include a_samp
  2. #include zcmd
  3. #include sscanf
  4. #include dini//O POVO FALA Q É ULTRAPASSADA MAIS É A MAIS FACIL DE SE ENTENDER..
  5. #include anticheater // ANT CHEAT, hacks fdms..
  6.  
  7. #define i             playerid
  8. #define QUEROSER      1
  9. #define mochila       1
  10. #define msg           0x0080C0FF
  11. #define azul          0x004040AA
  12. #define d             999
  13.  
  14. new arma[12];
  15. new municao[12];
  16. new money;
  17. new skin;
  18. new name[24];
  19. new Arquivo[44];
  20. new Grana[22];
  21.  
  22.  
  23. main()
  24. {
  25.     print("\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  26.     print(" Policia vs Bandido - FORUM SA-MP");
  27.     print(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
  28. }
  29.  
  30. stock ArmasPB(i)
  31. {
  32.     GivePlayerWeapon(i, 24, d);
  33.     GivePlayerWeapon(i, 31, d);
  34.     GivePlayerWeapon(i, 29, d);
  35.     GivePlayerWeapon(i, 25, d);
  36.     GivePlayerWeapon(i, 44, d);
  37.     SetPlayerArmour(playerid, 100.0);
  38.     return 1;
  39. }
  40.  
  41. public OnGameModeInit()
  42. {
  43.     SetGameModeText("PB [v1.0]");
  44.     AddPlayerClass(47,2175.1094,-992.5814,62.9751,178.7098,0,0,0,0,0,0);
  45.     AddPlayerClass(284,1525.5659,-1677.7239,5.8906,271.7154,0,0,0,0,0,0);
  46.     AddPlayerClass(29,1481.0448,-1770.7322,18.7958,357.2687,0,0,0,0,0,0);
  47.     AddStaticVehicleEx(545,2196.5000000,-1007.5000000,62.2000000,74.0000000,-1,-1,15); //Hustler
  48.     AddStaticVehicleEx(567,2178.1000000,-1010.7000000,62.7000000,80.0000000,-1,-1,15); //Savanna
  49.     AddStaticVehicleEx(468,2162.7000000,-1000.9000000,62.6000000,0.0000000,-1,-1,15); //Sanchez
  50.     AddStaticVehicleEx(468,2164.3000000,-1001.2000000,62.6000000,0.0000000,-1,-1,15); //Sanchez
  51.     AddStaticVehicleEx(404,2172.1000000,-1002.6000000,62.6000000,82.0000000,-1,-1,15); //Perrenial
  52.     AddStaticVehicleEx(523,1572.6000000,-1634.0000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
  53.     AddStaticVehicleEx(523,1571.4000000,-1633.9000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
  54.     AddStaticVehicleEx(523,1570.1000000,-1633.9000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
  55.     AddStaticVehicleEx(523,1568.9000000,-1633.9000000,13.3000000,0.0000000,-1,-1,15); //HPV1000
  56.     AddStaticVehicleEx(497,1565.7000000,-1642.8000000,28.6000000,0.0000000,-1,-1,15); //Police Maverick
  57.     AddStaticVehicleEx(597,1572.9000000,-1608.9000000,13.5000000,0.0000000,-1,-1,15); //Police Car (SFPD)
  58.     AddStaticVehicleEx(597,1570.0000000,-1609.3000000,13.5000000,0.0000000,-1,-1,15); //Police Car (SFPD)
  59.     AddStaticVehicleEx(598,1567.1000000,-1609.7000000,13.5000000,0.0000000,-1,-1,15); //Police Car (LVPD)
  60.     AddStaticVehicleEx(599,1564.5000000,-1610.6000000,13.7000000,0.0000000,-1,-1,15); //Police Ranger
  61.     AddStaticVehicleEx(599,1561.9000000,-1610.8000000,13.7000000,0.0000000,-1,-1,15); //Police Ranger
  62.     AddStaticVehicleEx(427,1604.4000000,-1629.0000000,12.5000000,0.0000000,-1,-1,15); //Enforcer
  63.     AddStaticVehicleEx(427,1601.1000000,-1628.9000000,12.5000000,0.0000000,-1,-1,15); //Enforcer
  64.     AddStaticVehicleEx(596,1604.2000000,-1613.1000000,13.5000000,92.0000000,-1,-1,15); //Police Car (LSPD)
  65.     AddStaticVehicleEx(596,1604.2000000,-1616.1000000,13.5000000,100.0000000,-1,-1,15); //Police Car (LSPD)
  66.     CreateObject(1571,2186.2000000,-1015.6000000,63.1000000,0.0000000,0.0000000,196.0000000); //object(cj_noodle_1) (1)
  67.     CreateObject(1238,2159.2000000,-1022.4000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (1)
  68.     CreateObject(1238,2160.3000000,-1022.4000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (2)
  69.     CreateObject(1238,2161.6000000,-1022.3000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (3)
  70.     CreateObject(1238,2163.3000000,-1022.3000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (4)
  71.     CreateObject(1238,2164.8000000,-1022.4000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (5)
  72.     CreateObject(1238,2166.8000000,-1021.7000000,61.8000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (6)
  73.     CreateObject(1238,2082.4000000,-986.3000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (7)
  74.     CreateObject(1238,2082.9000000,-984.8000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (8)
  75.     CreateObject(1238,2083.1000000,-982.9000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (9)
  76.     CreateObject(1238,2083.4000000,-981.2000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (10)
  77.     CreateObject(1238,2083.9000000,-979.0000000,50.1000000,0.0000000,0.0000000,0.0000000); //object(trafficcone) (11)
  78.     CreateObject(10079,2157.3000000,-1021.3000000,64.3000000,0.0000000,0.0000000,0.0000000); //object(pyr_top_sfe) (1)
  79.     CreateObject(12954,2204.7000000,-1008.9000000,61.3000000,0.0000000,0.0000000,0.0000000); //object(sw_furnipile01) (1)
  80.     CreateObject(12954,2205.8000000,-1024.2000000,60.7000000,0.0000000,0.0000000,0.0000000); //object(sw_furnipile01) (2)
  81.     CreateObject(3511,2209.3000000,-1002.2000000,62.7000000,0.0000000,0.0000000,0.0000000); //object(vgsn_nitree_b01) (1)
  82.     CreateObject(3511,1541.5000000,-1638.2000000,13.0000000,0.0000000,0.0000000,0.0000000); //object(vgsn_nitree_b01) (2)
  83.     UsePlayerPedAnims();
  84.     return 1;
  85. }
  86.  
  87. public OnPlayerSpawn(i)
  88. {
  89.     SendClientMessage(i,msg,"Você foi equipado com sucesso.");
  90.     SendClientMessage(i,msg,"\nLeia suas regras:");
  91.     SendClientMessage(i,msg,"Policial:{FFFFFF} /regrasp");
  92.     SendClientMessage(i,msg,"Bandido:{FFFFFF} /regrasb");
  93.     ArmasPB(i);
  94.     return 1;
  95. }
  96.  
  97. public OnPlayerRequestClass(i, classid)
  98. {
  99.     if((classid >= 0) && (classid <= 1))
  100.     {
  101.         GameTextForPlayer(playerid,"~h~~r~ Bandido",5000,5);
  102.     }
  103.     if((classid >= 1) && (classid <= 2))
  104.     {
  105.         GameTextForPlayer(playerid,"~h~~b~ Policial",5000,5);
  106.     }
  107.     if((classid >= 2) && (classid <= 3))
  108.     {
  109.         GameTextForPlayer(playerid,"~h~~b~ Playboy",5000,5);
  110.     }
  111.     SetPlayerPos(playerid,1157.7001,-2036.9989,69.0078);
  112.     SetPlayerCameraPos(playerid,1163.6348,-2036.7839,69.0078);
  113.     SetPlayerCameraLookAt(playerid,1161.7328,-2036.7570,69.0078);
  114.     SetPlayerFacingAngle(playerid, 270.8216);
  115.  
  116.     return 1;
  117. }
  118.  
  119. public OnPlayerConnect(i)
  120. {
  121.     new tem;
  122.     GetPlayerName(playerid,name,23);
  123.     tem = dini_Int("%s",name);
  124.     GivePlayerMoney(i,tem);
  125.     GetPlayerName(playerid,name,22);
  126.     new string[128];
  127.     format(string,sizeof(string), "[PB]{FFFFFF} %s entrou no servidor.",name);
  128.     SendClientMessageToAll(msg,string);
  129.     SendClientMessage(i,msg,"Bem vindo ao {FFFFFF}Policia vs Bandido");
  130.     SendClientMessage(i,msg,"Escolha se você quer se bandido ou policial:");
  131.     return 1;
  132. }
  133.  
  134. public OnPlayerDisconnect(i, reason)
  135. {
  136.     GetPlayerName(playerid,name,24);
  137.     format(Arquivo,44,"%s.ini",name);
  138.     Grana[21] = GetPlayerMoney(i);
  139.     dini_Set(Arquivo,"Grana",Grana);
  140.     return 1;
  141. }
  142.  
  143. CMD:disfarcar(i)
  144. {
  145.     SetPlayerSkin(i, 20);
  146.     return 1;
  147. }
  148.  
  149. CMD:comandos(i)
  150. {
  151.     ShowPlayerDialog(i,0,DIALOG_STYLE_MSGBOX,"{FFFFFF}[{31478B}P{9F2020}B{FFFFFF}] Comandos","/creditos, /mochila, /regrasp, /regrasb\n/baseado, /handsup, /disfarcar","Ok","Fechar");
  152.     return 1;
  153. }
  154.  
  155. CMD:creditos(i)
  156. {
  157.     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");
  158.     return 1;
  159. }
  160.  
  161. CMD:mochila(i)
  162. {
  163.     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");
  164.     return 1;
  165. }
  166.  
  167. //ADMINISTRACAO
  168.  
  169. CMD:kick(i, params[])
  170. {
  171.     if(IsPlayerAdmin(playerid)) {
  172.     new id;
  173.     if(sscanf(params, "u", id))
  174.     return SendClientMessage(playerid, msg, "Uso:{FFFFFF} /kick [playerid]");
  175.     //NAO SEI SE ESTA FUNCIONADO, SE NAO ESTIVER ME CORRIJAM..
  176.     Kick(id);
  177.     }
  178.  
  179.     return 1;
  180. }
  181.  
  182. CMD:ban(i, params[])
  183. {
  184.     if(IsPlayerAdmin(playerid)) {
  185.     new id;
  186.     if(sscanf(params, "u", id))
  187.     return SendClientMessage(playerid, msg, "Uso:{FFFFFF} /ban [playerid]");
  188.     Ban(id);
  189.  
  190.     }
  191.     return 1;
  192. }
  193.  
  194. CMD:rc(i)
  195. {
  196.     if(IsPlayerAdmin(playerid)) {
  197.     for(new x = 0; x < MAX_VEHICLES ; x++)
  198.     {
  199.         SetVehicleToRespawn(x);
  200.     }
  201.     }
  202.     return 1;
  203. }
  204.  
  205. CMD:anrc(i)
  206. {
  207.     if(IsPlayerAdmin(playerid)) {
  208.     SendClientMessageToAll(msg,"Aviso: rc(respawn car) em segundos!!!");
  209.     }
  210.     return 1;
  211. }
  212.  
  213. CMD:regrasp(i)
  214. {
  215.     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");
  216.     return 1;
  217. }
  218.  
  219. CMD:regrasb(i)
  220. {
  221.     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");
  222.     return 1;
  223. }
  224.  
  225. CMD:baseado(i)
  226. {
  227.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
  228.     GameTextForPlayer(playerid,"~w~Fumando Baseado~r~.~y~.~g~.", 3000,1);
  229.     SendClientMessage(i,msg,"Baseado{FFFFFF} ativado.");
  230.     SetPlayerDrunkLevel(playerid,30000);
  231.     SetTimer("FicarNormal",60000,false);
  232.     return 1;
  233. }
  234.  
  235. CMD:handsup(i)
  236. {
  237.     SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
  238.     SendClientMessage(i,msg,"Handsup{FFFFFF} ativado.");
  239.     return 1;
  240. }
  241.  
  242. public OnDialogResponse(i, dialogid, response, listitem, inputtext[])
  243. {
  244.     if(dialogid == mochila)
  245.     {
  246.  
  247.      if(listitem == 0)
  248.      {
  249.  
  250.      GetPlayerWeaponData(i, 1, arma[1], municao[1]);
  251.      GetPlayerWeaponData(i, 2, arma[2], municao[2]);
  252.      GetPlayerWeaponData(i, 3, arma[3], municao[3]);
  253.      GetPlayerWeaponData(i, 4, arma[4], municao[4]);
  254.      GetPlayerWeaponData(i, 5, arma[5], municao[5]);
  255.      GetPlayerWeaponData(i, 6, arma[6], municao[6]);
  256.      GetPlayerWeaponData(i, 7, arma[7], municao[7]);
  257.      GetPlayerWeaponData(i, 8, arma[8], municao[8]);
  258.      GetPlayerWeaponData(i, 9, arma[9], municao[9]);
  259.      GetPlayerWeaponData(i, 10, arma[10], municao[10]);
  260.      GetPlayerWeaponData(i, 11, arma[11], municao[11]);
  261.      ResetPlayerWeapons(i);
  262.      SendClientMessage(i, msg,"[MSG]{FFFFFF} Você guardou suas armas com sucesso.");
  263.  
  264.      }
  265.      if(listitem == 1)
  266.      {
  267.      GivePlayerWeapon(i, arma[1], municao[1]);
  268.      GivePlayerWeapon(i, arma[2], municao[2]);
  269.      GivePlayerWeapon(i, arma[3], municao[3]);
  270.      GivePlayerWeapon(i, arma[4], municao[4]);
  271.      GivePlayerWeapon(i, arma[5], municao[5]);
  272.      GivePlayerWeapon(i, arma[6], municao[6]);
  273.      GivePlayerWeapon(i, arma[7], municao[7]);
  274.      GivePlayerWeapon(i, arma[8], municao[8]);
  275.      GivePlayerWeapon(i, arma[9], municao[9]);
  276.      GivePlayerWeapon(i, arma[10], municao[10]);
  277.      GivePlayerWeapon(i, arma[11], municao[11]);
  278.      SendClientMessage(i, msg,"[MSG]{FFFFFF} Você retirou suas armas com sucesso.");
  279.  
  280.      }
  281.      if(listitem == 2)
  282.     {
  283.     money = GetPlayerMoney(i);
  284.     ResetPlayerMoney(i);
  285.     SetPlayerAttachedObject(i, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
  286.     SendClientMessage(i, msg,"[MSG]{FFFFFF} Você guardou sua grana.");
  287.     }
  288.     }
  289.     if(listitem == 3)
  290.     {
  291.     GivePlayerMoney(i, money);
  292.     SendClientMessage(i, msg,"[MSG]{FFFFFF} Você pegou  sua grana.");
  293.     RemovePlayerAttachedObject(i,3);
  294.     }
  295.     if(listitem == 4)
  296.     {
  297.     skin = GetPlayerSkin(i);
  298.     SetPlayerSkin(i,97);
  299.     SendClientMessage(i, msg,"[MSG]{FFFFFF} Você guardou sua roupa.");
  300.     }
  301.     if(listitem == 5)
  302.     {
  303.     SetPlayerSkin(i,skin);
  304.     SendClientMessage(i, msg,"[MSG]{FFFFFF} Você pegou sua roupa.");
  305.     }
  306.     return 1;
  307.     }
  308.  
  309.     public OnPlayerControllingCheat(playerid, cheatid) {
  310.     switch(cheatid) {
  311.         case PLAYER_ONTEXT_FLOOD: {
  312.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi kickado por flood no chat!");
  313.             Kick(playerid);
  314.         }
  315.         case PLAYER_ONCONNECT_FLOOD: {
  316.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por boots!");
  317.             BanEx(playerid, #boots);
  318.         }
  319.         case PLAYER_ONSTATE_HACK_1: {
  320.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (Puxar varios veiculos)!");
  321.             BanEx(playerid, #cleo4 Veh);
  322.         }
  323.         case PLAYER_ONSTATE_HACK_2: {
  324.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (CarJackHack)!");
  325.             BanEx(playerid, #cleo4 Veh CarJackHack);
  326.         }
  327.         case PLAYER_ONSTATE_HACK_3: {
  328.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (Puxar varios veiculos)!");
  329.             BanEx(playerid, #cleo4 Veh);
  330.         }
  331.         case PLAYER_ONDEATH_HACK: {
  332.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por cleo4 (Fake-Kill)!");
  333.             BanEx(playerid, #FakeKill);
  334.         }
  335.         case PLAYER_ONPING_HIGH: {
  336.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi kickado por ping alto!");
  337.             Kick(playerid);
  338.         }
  339.         case PLAYER_ONFLY_HACK: {
  340.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por fly!");
  341.             BanEx(playerid, #Fly);
  342.         }
  343.         case PLAYER_ONSPEED_HACK_1: {
  344.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por speed hack!");
  345.             BanEx(playerid, #SpeedHack);
  346.         }
  347.         case PLAYER_ONSPEED_HACK_2: {
  348.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por speed hack!");
  349.             BanEx(playerid, #SpeedHack);
  350.         }
  351.         case PLAYER_ONMONEY_HACK: {
  352.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por money hack!");
  353.             BanEx(playerid, #MoneyHack);
  354.         }
  355.         case PLAYER_ONSCORE_HACK: {
  356.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por score hack!");
  357.             BanEx(playerid, #ScoreHack);
  358.         }
  359.         case PLAYER_ONWEAP_HACK: {
  360.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por weapon hack!");
  361.             BanEx(playerid, #WeaponHack);
  362.         }
  363.         case PLAYER_ONAMMO_HACK: { //Desativado temporariamente
  364.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por ammo hack!");
  365.             BanEx(playerid, #AmmoHack);
  366.         }
  367.         case PLAYER_ONBREAKCAR_HACK_1: {
  368.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por car tele hack!");
  369.             BanEx(playerid, #CarTeleHack);
  370.         }
  371.         case PLAYER_ONBREAKCAR_HACK_2: {
  372.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por car tele hack!");
  373.             BanEx(playerid, #CarTeleHack);
  374.         }
  375.         case PLAYER_ONBREAKCAR_HACK_3: {
  376.             SendClientMessage(playerid, msg, "PB: {FFFFFF}Você foi banido por car tele hack!");
  377.             BanEx(playerid, #CarTeleHack);
  378.         }
  379.         case PLAYER_ONBREAKCAR_HACK_4: {
  380.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por car tele hack!");
  381.             BanEx(playerid, #CarTeleHack);
  382.         }
  383.         case PLAYER_ONBREAK_HACK_1: {
  384.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
  385.             BanEx(playerid, #AirbreakHack);
  386.         }
  387.         case PLAYER_ONBREAK_HACK_2: {
  388.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
  389.             BanEx(playerid, #AirbreakHack);
  390.         }
  391.         case PLAYER_ONBREAK_HACK_3: {
  392.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
  393.             BanEx(playerid, #AirbreakHack);
  394.         }
  395.         case PLAYER_ONBREAK_HACK_4: {
  396.             SendClientMessage(playerid, msg, "PB:{FFFFFF} Você foi banido por airbreak hack!");
  397.             BanEx(playerid, #AirbreakHack);
  398.         }
  399.     }
  400.     return true;
  401. }
  402.  
  403. forward FicarNormal(playerid);
  404. public FicarNormal(playerid)
  405. {
  406. SetPlayerDrunkLevel(playerid,0);
  407. }
Advertisement
Add Comment
Please, Sign In to add comment