Advertisement
Chip7

[GM] GameMode MIB TDM

Nov 5th, 2012
5,233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 137.15 KB | None | 0 0
  1. /*VISITE NOSSO SITE: http://www.sampknd.com/
  2.   VISITE NOSSO FACEBOOK: http://www.facebook.com/SampKnd
  3.   SAMP KND MELHOR BLOG DE SAMP DO BRASIL
  4. */  
  5.  
  6. #include <a_samp>
  7. #include <DOF2>
  8. #include <zcmd>
  9. #include <sscanf2>
  10. #include <dudb>
  11. #include <streamer>
  12. new bool:ServerOn;
  13. #include <Yiakin>
  14. //================================DEFINES/NEWS=======================================================
  15. #define DIALOG_REGISTRO 2
  16. #define DIALOG_LOGIN 1
  17. #define DIALOG_PM 3
  18. #define DIALOG_REGRA 4
  19. #define NomeServer "MIB TDM V1.0"
  20. #define COR_COP         0x0F04DEFF
  21. #define COR_EXE         0x089103FF
  22. #define COR_BOZ         0x820068FF
  23. #define COR_FRA         0xF7FF03FF
  24. #define COR_RIF         0x00D3D6FF
  25. #define COR_NAN         0xFC0303FF
  26. #define COR_TRI         0x636363FF
  27. #define COR_MOT         0x800000FF
  28. #define COR_PLA         0xFFFFFFFF
  29. #define COR_MEN         0x9E5C00FF
  30.  
  31. #define COR_COP1        0x0F04DE98
  32. #define COR_EXE1        0x08910398
  33. #define COR_BOZ1        0x82006898
  34. #define COR_FRA1        0xF7FF0398
  35. #define COR_RIF1        0x00D3D698
  36. #define COR_NAN1        0xFC030398
  37. #define COR_TRI1        0x63636398
  38. #define COR_MOT1        0x80000098
  39. #define COR_PLA1        0xFFFFFF98
  40. #define COR_MEN1        0x9E5C0098
  41.  
  42. #define WEAPON_RESPAWN_TIME 30
  43. #define MONEY_BAG_MONEY      0              
  44. #define MONEY_BAG_MODE       0              
  45. #define MAX_DISTANCE_UNIT   200.0  
  46. //**BODY PARTS**//
  47. #define BODY_PART_HEAD  1
  48. #define BODY_PART_TORSO 2
  49. #define BODY_PART_LEGS  3
  50. #define IsValidSkin(%0) \
  51.                          (300 > (%0) > -1)
  52. #define HOLDING(%0) \
  53.     ((newkeys & (%0)) == (%0))
  54. new ii;
  55. new id;
  56. new Tx1;
  57. new Ftexto[MAX_PLAYERS][128];
  58. new bool:Logou[MAX_PLAYERS];
  59. new Text:ImagemEntrada;
  60. new bool:GanhouDim[MAX_PLAYERS];
  61. new bool:ComprouColete[MAX_PLAYERS];
  62. new Errou[MAX_PLAYERS];
  63. new anflood[MAX_PLAYERS];
  64. new avisou[MAX_PLAYERS];
  65. new Timerr[MAX_PLAYERS];
  66. new xx1;
  67. new ForbiddenWeapons[]= { 38, 44, 45 };
  68. new WeaponDrop[MAX_PLAYERS][14];
  69. new WeaponData[MAX_PLAYERS][14][2];
  70. new WeaponTimer[MAX_PLAYERS];
  71. new BagMoney = MONEY_BAG_MONEY;
  72. new BagMode = MONEY_BAG_MODE;
  73. new Text:Ranking[2];
  74. new bool:FoiX1[MAX_PLAYERS];
  75. enum pInfo{
  76.     pDolar,
  77.     pMatou,
  78.     pMorreu,
  79.     pAdmin,
  80.     pTime,
  81.     pCP,
  82.     pPreso,
  83.     pCalado,
  84.     pMatouX1,
  85.     pMorreuX1,
  86. };
  87. new PI[MAX_PLAYERS][pInfo];
  88. new Float:SpawnArena[4][4] = {
  89.     {-1624.6821,-1746.8542,1201.5657,274.6148},
  90.     {-1574.3131,-1720.3934,1201.5657,178.1073},
  91.     {-1532.7137,-1750.7882,1201.5657,85.3596},
  92.     {-1568.3573,-1790.0406,1201.5657,358.2522}
  93. };
  94. new gArmas[] = {
  95.     35,
  96.     36,
  97.     37,
  98.     38,
  99.     39,
  100.     40,
  101.     44,
  102.     45
  103. };
  104. new MsgMIB[4][128] = {
  105.     "[MIB INFORMA] Afim de jogar um server RPG? Use /mibgames e veja o que guardamos pra você.",
  106.     "[MIB INFORMA] Fique por dentro das novidades do Made In Brazil. Acesse: forum.mib-samp.com.",
  107.     "[MIB INFORMA] Entrem em nosso Team Speak 3 e fale com seus amigos. IP: 69.195.128.54",
  108.     "[MIB INFORMA] Esta perdido? Não conhece os comandos? Use /ajuda e resolva seu problema."
  109. };
  110. new CoresMsg[]={
  111.     0x9400D3FF,
  112.     0x00CED1FF,
  113.     0xFFD700FF,
  114.     0xFF1493FF,
  115.     0xFF0000FF,
  116.     0xFF4500FF,
  117.     0x0000FFFF,
  118.     0x00FF7FFF,
  119.     0x00FF00FF,
  120.     0xFFFAFAFF
  121. };
  122. new Text:Textodraw[MAX_PLAYERS][3];
  123. new Text:NomeServerTxt[2];
  124. new ContandoX1;
  125. new Dono[10];
  126. new GZ[10];
  127. new bool:Dominando[10];
  128. new Contando[10],Timer[10];
  129. new Matou[MAX_PLAYERS];
  130. new bool:Cagou[MAX_PLAYERS],bool:Comecou[MAX_PLAYERS],EnviarPM[MAX_PLAYERS];
  131. //====================================================================================================
  132.  
  133.  
  134. main()
  135. {
  136.     printf("Contectando ao servidor %s",NomeServer);
  137. }
  138. public OnGameModeInit()
  139. {
  140.     if(ServerOn == true) ServerOn = false;
  141.     StatusServer();
  142.     if(ServerOn == false){
  143.         return GameModeExit();
  144.     }
  145.     OnWeaponDropInit();
  146.     AllowInteriorWeapons(1);
  147.     UsePlayerPedAnims();
  148.     EnableStuntBonusForAll(0);
  149.     SetGameModeText("Made In Brazil Team Death Match");
  150.     SetTimer("AntiCheat", 100, true);
  151.     SetTimer("ChecarGz",1000,true);
  152.     SetTimer("MensagensMIB",1000*60*5,true);
  153.     AddPlayerClass(285,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//BOPE
  154.     AddPlayerClass(287,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//EXERCITO
  155.     AddPlayerClass(264,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//BOZO
  156.     AddPlayerClass(167,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//FRANGO
  157.     AddPlayerClass(173,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//RIFAS
  158.     AddPlayerClass(174,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//RIFAS
  159.     AddPlayerClass(175,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//RIFAS
  160.     AddPlayerClass(121,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//NANG
  161.     AddPlayerClass(122,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//NANG
  162.     AddPlayerClass(123,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//NANG
  163.     AddPlayerClass(117,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//TRIADS
  164.     AddPlayerClass(118,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//TRIADS
  165.     AddPlayerClass(120,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//TRIADS
  166.     AddPlayerClass(169,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//TRIADS
  167.     AddPlayerClass(247,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MOTOQUEIRO
  168.     AddPlayerClass(248,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MOTOQUEIRO
  169.     AddPlayerClass(100,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MOTOQUEIRO
  170.     AddPlayerClass(12,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//PLAYBOY
  171.     AddPlayerClass(91,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//PLAYBOY
  172.     AddPlayerClass(124,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//PLAYBOY
  173.     AddPlayerClass(98,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//PLAYBOY
  174.     AddPlayerClass(134,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MENDIGOS
  175.     AddPlayerClass(136,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MENDIGOS
  176.     AddPlayerClass(137,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MENDIGOS
  177.     AddPlayerClass(200,1958.3783, 1343.1572, 15.3746,99.99,0,0,0,0,0,0);//MENDIGOS
  178.     for(new i = 0;i < GetMaxPlayers();i++)
  179.     {
  180.         CarregarTextos(i);
  181.     }
  182.  
  183.     Ranking[0] = TextDrawCreate(215.000000, 156.000000, "~r~~h~~h~Rank ~g~~h~~h~Made In Brazil ~r~~h~~h~TDM~n~");
  184.     TextDrawBackgroundColor(Ranking[0], 255);
  185.     TextDrawFont(Ranking[0], 1);
  186.     TextDrawLetterSize(Ranking[0], 0.500000, 1.000000);
  187.     TextDrawColor(Ranking[0], -1);
  188.     TextDrawSetOutline(Ranking[0], 0);
  189.     TextDrawSetProportional(Ranking[0], 1);
  190.     TextDrawSetShadow(Ranking[0], 1);
  191.     TextDrawUseBox(Ranking[0], 1);
  192.     TextDrawBoxColor(Ranking[0], 120);
  193.     TextDrawTextSize(Ranking[0], 427.000000, 0.000000);
  194.  
  195.     Ranking[1] = TextDrawCreate(215.000000, 175.000000, "_");
  196.     TextDrawBackgroundColor(Ranking[1], 255);
  197.     TextDrawFont(Ranking[1], 1);
  198.     TextDrawLetterSize(Ranking[1], 0.230000, 0.899999);
  199.     TextDrawColor(Ranking[1], -1);
  200.     TextDrawSetOutline(Ranking[1], 0);
  201.     TextDrawSetProportional(Ranking[1], 1);
  202.     TextDrawSetShadow(Ranking[1], 0);
  203.     TextDrawUseBox(Ranking[1], 1);
  204.     TextDrawBoxColor(Ranking[1], 100);
  205.     TextDrawTextSize(Ranking[1], 427.000000, 33.000000);
  206.     new aa = random(13)+1;
  207.     new str[56];
  208.     format(str,sizeof str,"loadsc%d:loadsc%d",aa,aa);
  209.     ImagemEntrada = TextDrawCreate(1.000000, -1.000000, str);
  210.     TextDrawBackgroundColor(ImagemEntrada, 255);
  211.     TextDrawFont(ImagemEntrada, 4);
  212.     TextDrawLetterSize(ImagemEntrada, 0.500000, 1.000000);
  213.     TextDrawColor(ImagemEntrada, -1);
  214.     TextDrawSetOutline(ImagemEntrada, 0);
  215.     TextDrawSetProportional(ImagemEntrada, 1);
  216.     TextDrawSetShadow(ImagemEntrada, 1);
  217.     TextDrawUseBox(ImagemEntrada, 1);
  218.     TextDrawBoxColor(ImagemEntrada, 255);
  219.     TextDrawTextSize(ImagemEntrada, 645.000000, 450.000000);
  220.  
  221.     if(!DOF2_FileExists("MortesFix.ini")){
  222.         DOF2_CreateFile("MortesFix.ini");
  223.         new n[11];
  224.         new s[11];
  225.         for(new i = 1;i < 11;i++){
  226.             format(n,sizeof n,"Rank%d",i);
  227.             format(s,sizeof s,"Nome%d",i);
  228.             DOF2_SetInt("MortesFix.ini",n,0);
  229.             DOF2_SetString("MortesFix.ini",s,"Nenhum");
  230.             DOF2_SaveFile();
  231.         }
  232.     }
  233.  
  234.     CreateVehicle(449,-1676.80004883,1262.90002441,8.50000000,46.00000000,-1,-1,6000); //Tram
  235.     CreateVehicle(402,-1655.80004883,1314.59997559,7.00000000,135.99987793,17,1,6000); //Buffalo
  236.     CreateVehicle(429,-1652.40002441,1311.09997559,6.80000019,133.99987793,17,1,6000); //Banshee
  237.     CreateVehicle(560,-1648.80004883,1307.40002441,6.80000019,133.99987793,17,1,6000); //Sultan
  238.     CreateVehicle(562,-1645.30004883,1304.09997559,6.80000019,133.99987793,17,1,6000); //Elegy
  239.     CreateVehicle(550,-1641.59997559,1300.30004883,7.00000000,133.99987793,17,1,6000); //Sunrise
  240.     CreateVehicle(579,-1638.40002441,1296.19995117,7.09999990,135.99987793,17,1,6000); //Huntley
  241.     CreateVehicle(451,-1634.40002441,1293.50000000,6.80000019,135.99987793,17,1,6000); //Turismo
  242.     CreateVehicle(559,-1630.80004883,1289.90002441,6.80000019,135.99987793,17,1,6000); //Jester
  243.     CreateVehicle(522,-1640.80004883,1279.80004883,6.69999981,314.00000000,17,17,6000); //NRG-500
  244.     CreateVehicle(522,-1642.19995117,1281.30004883,6.69999981,313.99475098,17,17,6000); //NRG-500
  245.     CreateVehicle(522,-1643.40002441,1282.90002441,6.69999981,313.99475098,17,17,6000); //NRG-500
  246.     CreateVehicle(463,-1644.90002441,1284.40002441,6.69999981,308.00000000,17,17,6000); //Freeway
  247.     CreateVehicle(469,-1682.50000000,1339.09997559,17.39999962,135.99987793,-1,-1,6000); //Sparrow
  248.     CreateVehicle(446,-1720.69995117,1435.19995117,0.00000000,0.00000000,-1,-1,6000); //Squalo
  249.     CreateVehicle(473,-1721.40002441,1450.00000000,0.00000000,0.00000000,-1,-1,6000); //Dinghy
  250.     CreateVehicle(433,-1243.59997559,452.39999390,7.80000019,89.99993896,-1,-1,6000); //Barracks
  251.     CreateVehicle(433,-1243.90002441,462.70001221,7.80000019,89.99450684,-1,-1,6000); //Barracks
  252.     CreateVehicle(468,-1241.80004883,458.89999390,6.90000010,86.00000000,65,65,6000); //Sanchez
  253.     CreateVehicle(468,-1241.80004883,457.39999390,6.90000010,85.99548340,65,65,6000); //Sanchez
  254.     CreateVehicle(468,-1241.90002441,455.70001221,6.90000010,85.99548340,65,65,6000); //Sanchez
  255.     CreateVehicle(470,-1258.50000000,441.70001221,7.30000019,0.00000000,-1,-1,6000); //Patriot
  256.     CreateVehicle(470,-1264.00000000,441.60000610,7.30000019,0.00000000,-1,-1,6000); //Patriot
  257.     CreateVehicle(470,-1269.59997559,441.39999390,7.30000019,0.00000000,-1,-1,6000); //Patriot
  258.     CreateVehicle(433,-1276.09997559,443.00000000,7.80000019,2.00000000,-1,-1,6000); //Barracks
  259.     CreateVehicle(548,-1287.19995117,497.10000610,20.10000038,270.00000000,-1,-1,6000); //Cargobob
  260.     CreateVehicle(548,-1261.09997559,497.50000000,20.10000038,269.99548340,-1,-1,6000); //Cargobob
  261.     CreateVehicle(560,-1282.19995117,441.10000610,7.00000000,0.00000000,47,1,6000); //Sultan
  262.     CreateVehicle(560,-1287.69995117,440.89999390,7.00000000,0.00000000,47,1,6000); //Sultan
  263.     CreateVehicle(497,-1681.50000000,705.20001221,30.89999962,0.00000000,-1,1,6000); //Police Maverick
  264.     CreateVehicle(597,-1587.59997559,652.00000000,7.09999990,0.00000000,-1,-1,6000); //Police Car (SFPD)
  265.     CreateVehicle(597,-1593.50000000,652.20001221,7.09999990,0.00000000,-1,-1,6000); //Police Car (SFPD)
  266.     CreateVehicle(597,-1599.30004883,652.09997559,7.09999990,0.00000000,-1,-1,6000); //Police Car (SFPD)
  267.     CreateVehicle(597,-1605.30004883,652.00000000,7.09999990,0.00000000,-1,-1,6000); //Police Car (SFPD)
  268.     CreateVehicle(599,-1610.59997559,652.29998779,7.59999990,0.00000000,-1,1,6000); //Police Ranger
  269.     CreateVehicle(599,-1616.90002441,652.00000000,7.59999990,0.00000000,-1,1,6000); //Police Ranger
  270.     CreateVehicle(528,-1588.30004883,673.90002441,7.40000010,181.99993896,-1,-1,6000); //FBI Truck
  271.     CreateVehicle(528,-1594.00000000,673.79998779,7.40000010,181.99951172,-1,-1,6000); //FBI Truck
  272.     CreateVehicle(427,-1599.90002441,672.90002441,7.40000010,179.99993896,-1,1,6000); //Enforcer
  273.     CreateVehicle(523,-1622.59997559,651.90002441,6.80000019,0.00000000,-1,-1,6000); //HPV1000
  274.     CreateVehicle(523,-1627.69995117,651.59997559,6.80000019,0.00000000,-1,-1,6000); //HPV1000
  275.     CreateVehicle(522,-1606.40002441,673.59997559,6.80000019,181.99993896,-1,1,6000); //NRG-500
  276.     CreateVehicle(522,-1611.69995117,673.20001221,6.80000019,181.99951172,-1,1,6000); //NRG-500
  277.     CreateVehicle(463,-2538.50000000,1229.40002441,37.00000000,211.99993896,62,62,6000); //Freeway
  278.     CreateVehicle(463,-2534.80004883,1230.00000000,37.00000000,211.99993896,62,62,6000); //Freeway
  279.     CreateVehicle(463,-2530.50000000,1229.69995117,37.00000000,211.99768066,62,62,6000); //Freeway
  280.     CreateVehicle(463,-2526.50000000,1229.80004883,37.00000000,211.99768066,62,62,6000); //Freeway
  281.     CreateVehicle(463,-2521.89990234,1229.69995117,37.00000000,211.99768066,62,62,6000); //Freeway
  282.     CreateVehicle(463,-2517.50000000,1229.80004883,37.00000000,211.99768066,62,62,6000); //Freeway
  283.     CreateVehicle(463,-2513.19995117,1209.90002441,37.00000000,271.99768066,62,62,6000); //Freeway
  284.     CreateVehicle(463,-2513.39990234,1205.80004883,37.00000000,271.99401855,62,62,6000); //Freeway
  285.     CreateVehicle(522,-2173.60009766,655.79998779,49.09999847,141.99993896,0,0,6000); //NRG-500
  286.     CreateVehicle(522,-2173.30004883,654.00000000,49.09999847,149.99829102,0,0,6000); //NRG-500
  287.     CreateVehicle(522,-2173.00000000,652.00000000,49.09999847,149.99633789,0,0,6000); //NRG-500
  288.     CreateVehicle(522,-2172.89990234,649.79998779,49.09999847,149.99633789,0,0,6000); //NRG-500
  289.     CreateVehicle(451,-2175.30004883,636.70001221,49.20000076,90.00000000,0,0,6000); //Turismo
  290.     CreateVehicle(541,-2175.10009766,640.20001221,49.09999847,90.00000000,0,0,6000); //Bullet
  291.     CreateVehicle(402,-2175.19995117,643.59997559,49.40000153,90.00000000,0,0,6000); //Buffalo
  292.     CreateVehicle(411,-2200.10009766,645.90002441,49.20000076,92.00000000,0,0,6000); //Infernus
  293.     CreateVehicle(560,-2191.89990234,645.79998779,49.20000076,90.00000000,0,0,6000); //Sultan
  294.     CreateVehicle(491,-2206.89990234,649.70001221,49.29999924,177.99993896,0,0,6000); //Virgo
  295.     CreateVehicle(469,-2216.30004883,656.70001221,63.90000153,181.99993896,0,0,6000); //Sparrow
  296.     CreateVehicle(402,-2131.00000000,173.50000000,35.20000076,272.00000000,2,1,6000); //Buffalo
  297.     CreateVehicle(562,-2131.60009766,178.19999695,35.00000000,272.00000000,2,1,6000); //Elegy
  298.     CreateVehicle(560,-2131.69995117,182.39999390,35.00000000,270.00000000,2,1,6000); //Sultan
  299.     CreateVehicle(468,-2123.10009766,196.19999695,34.90000153,185.99993896,2,1,6000); //Sanchez
  300.     CreateVehicle(468,-2124.50000000,196.10000610,34.90000153,185.99853516,2,1,6000); //Sanchez
  301.     CreateVehicle(522,-2125.69995117,195.80000305,34.90000153,184.00000000,2,1,6000); //NRG-500
  302.     CreateVehicle(522,-2127.00000000,195.69999695,34.90000153,184.00000000,2,1,6000); //NRG-500
  303.     CreateVehicle(558,-2112.10009766,220.30000305,34.59999847,268.00000000,2,1,6000); //Uranus
  304.     CreateVehicle(567,-2112.80004883,224.80000305,34.79999924,268.00000000,2,1,6000); //Savanna
  305.     CreateVehicle(567,-2112.89990234,229.69999695,34.79999924,267.99499512,2,1,6000); //Savanna
  306.     CreateVehicle(487,-2107.89990234,247.00000000,36.20000076,266.00000000,2,2,6000); //Maverick
  307.     CreateVehicle(568,-2265.30004883,216.39999390,35.09999847,90.00000000,22,1,6000); //Bandito
  308.     CreateVehicle(568,-2265.30004883,212.60000610,35.09999847,90.00000000,22,1,6000); //Bandito
  309.     CreateVehicle(568,-2265.30004883,208.60000610,35.09999847,90.00000000,22,1,6000); //Bandito
  310.     CreateVehicle(568,-2265.30004883,204.60000610,35.09999847,90.00000000,22,1,6000); //Bandito
  311.     CreateVehicle(568,-2265.30004883,200.80000305,35.09999847,90.00000000,22,1,6000); //Bandito
  312.     CreateVehicle(434,-2265.69995117,196.39999390,35.29999924,90.00000000,-1,-1,6000); //Hotknife
  313.     CreateVehicle(434,-2265.69995117,192.39999390,35.29999924,90.00000000,-1,-1,6000); //Hotknife
  314.     CreateVehicle(434,-2265.69995117,188.89999390,35.29999924,90.00000000,-1,-1,6000); //Hotknife
  315.     CreateVehicle(434,-2265.69995117,185.10000610,35.29999924,90.00000000,-1,-1,6000); //Hotknife
  316.     CreateVehicle(522,-2266.00000000,148.89999390,34.79999924,88.00000000,22,22,6000); //NRG-500
  317.     CreateVehicle(522,-2265.89990234,144.69999695,34.79999924,87.99499512,22,22,6000); //NRG-500
  318.     CreateVehicle(521,-2265.69995117,141.10000610,34.79999924,86.00000000,22,22,6000); //FCR-900
  319.     CreateVehicle(521,-2265.60009766,137.60000610,34.79999924,85.99548340,22,22,6000); //FCR-900
  320.     CreateVehicle(469,-2275.80004883,125.40000153,35.29999924,0.00000000,-1,-1,6000); //Sparrow
  321.     CreateVehicle(481,-2099.39990234,-200.30000305,34.90000153,92.00000000,123,110,6000); //BMX
  322.     CreateVehicle(481,-2099.39990234,-201.60000610,34.90000153,91.99951172,123,110,6000); //BMX
  323.     CreateVehicle(481,-2099.60009766,-202.89999390,34.90000153,91.99951172,123,110,6000); //BMX
  324.     CreateVehicle(481,-2099.60009766,-204.39999390,34.90000153,91.99951172,123,110,6000); //BMX
  325.     CreateVehicle(481,-2099.60009766,-205.89999390,34.90000153,91.99951172,123,110,6000); //BMX
  326.     CreateVehicle(462,-2099.69995117,-208.00000000,35.00000000,84.00000000,123,110,6000); //Faggio
  327.     CreateVehicle(462,-2099.69995117,-209.50000000,35.00000000,83.99597168,123,110,6000); //Faggio
  328.     CreateVehicle(549,-2101.30004883,-214.00000000,35.20000076,90.00000000,123,110,6000); //Tampa
  329.     CreateVehicle(549,-2101.00000000,-218.30000305,35.20000076,90.00000000,123,110,6000); //Tampa
  330.     CreateVehicle(549,-2100.69995117,-223.10000610,35.20000076,90.00000000,123,110,6000); //Tampa
  331.     CreateVehicle(549,-2100.69995117,-227.89999390,35.20000076,90.00000000,123,110,6000); //Tampa
  332.     CreateVehicle(542,-2100.69995117,-232.69999695,35.20000076,88.00000000,123,110,6000); //Sunrise
  333.     CreateVehicle(542,-2100.89990234,-236.89999390,35.20000076,87.99499512,123,110,6000); //Sunrise
  334.     CreateVehicle(478,-2101.10009766,-241.39999390,35.20000076,87.99499512,123,110,6000); //Sunrise
  335.     CreateVehicle(542,-2102.19995117,-246.00000000,35.29999924,88.00000000,123,110,6000); //Phoenix
  336.     CreateVehicle(603,-2102.19995117,-250.00000000,35.29999924,87.99499512,123,110,6000); //Phoenix
  337.     CreateVehicle(451,-2663.19995117,-286.10000610,7.19999981,316.00000000,1,1,6000); //Turismo
  338.     CreateVehicle(451,-2659.80004883,-289.89999390,7.19999981,315.99975586,1,1,6000); //Turismo
  339.     CreateVehicle(411,-2656.19995117,-293.60000610,7.19999981,316.00000000,1,1,6000); //Infernus
  340.     CreateVehicle(411,-2652.69995117,-297.10000610,7.19999981,316.00000000,1,1,6000); //Infernus
  341.     CreateVehicle(541,-2655.30004883,-278.89999390,7.19999981,136.00000000,1,-1,6000); //Bullet
  342.     CreateVehicle(560,-2652.10009766,-281.50000000,7.30000019,134.00000000,1,1,6000); //Sultan
  343.     CreateVehicle(560,-2648.19995117,-285.00000000,7.30000019,133.99475098,1,1,6000); //Sultan
  344.     CreateVehicle(560,-2644.80004883,-288.39999390,7.30000019,133.99475098,1,1,6000); //Sultan
  345.     CreateVehicle(522,-2666.89990234,-282.79998779,7.09999990,322.00000000,1,1,6000); //NRG-500
  346.     CreateVehicle(522,-2668.10009766,-281.50000000,7.09999990,321.99829102,1,1,6000); //NRG-500
  347.     CreateVehicle(521,-2669.50000000,-280.10000610,6.90000010,322.00000000,1,1,6000); //FCR-900
  348.     CreateVehicle(521,-2670.80004883,-278.70001221,6.90000010,321.99829102,1,1,6000); //FCR-900
  349.     CreateVehicle(487,-2702.80004883,-246.60000610,7.30000019,42.00000000,1,1,6000); //Maverick
  350.     CreateVehicle(487,-2691.30004883,-235.30000305,7.30000019,47.99523926,1,1,6000); //Maverick
  351.     CreateVehicle(448,-2695.30004883,261.00000000,4.00000000,0.00000000,6,1,6000); //Pizzaboy
  352.     CreateVehicle(448,-2693.50000000,260.79998779,4.00000000,0.00000000,6,1,6000); //Pizzaboy
  353.     CreateVehicle(448,-2691.39990234,260.70001221,4.00000000,0.00000000,6,1,6000); //Pizzaboy
  354.     CreateVehicle(521,-2688.80004883,261.29998779,4.30000019,0.00000000,6,1,6000); //FCR-900
  355.     CreateVehicle(521,-2686.80004883,261.50000000,4.30000019,0.00000000,6,1,6000); //FCR-900
  356.     CreateVehicle(588,-2694.89990234,268.10000610,4.19999981,0.00000000,6,1,6000); //Hotdog
  357.     CreateVehicle(588,-2690.50000000,268.10000610,4.19999981,0.00000000,6,1,6000); //Hotdog
  358.     CreateVehicle(588,-2685.80004883,268.20001221,4.19999981,0.00000000,6,1,6000); //Hotdog
  359.     CreateVehicle(560,-2681.60009766,267.70001221,4.09999990,0.00000000,6,1,6000); //Sultan
  360.     CreateVehicle(560,-2678.39990234,268.00000000,4.09999990,0.00000000,6,1,6000); //Sultan
  361.     CreateVehicle(560,-2674.89990234,268.00000000,4.09999990,0.00000000,6,1,6000); //Sultan
  362.     CreateVehicle(535,-2671.60009766,268.10000610,4.19999981,0.00000000,6,1,6000); //Slamvan
  363.     CreateVehicle(535,-2668.10009766,268.10000610,4.19999981,0.00000000,6,1,6000); //Slamvan
  364.     CreateVehicle(587,-2664.89990234,268.39999390,4.09999990,0.00000000,6,1,6000); //Euros
  365.     CreateVehicle(565,-2586.60009766,304.00000000,4.50000000,92.00000000,-1,-1,6000); //Flash
  366.     CreateVehicle(565,-2586.69995117,307.79998779,4.50000000,91.99951172,-1,-1,6000); //Flash
  367.     CreateVehicle(518,-2586.69995117,311.29998779,4.69999981,90.00000000,-1,-1,6000); //Buccaneer
  368.     CreateVehicle(518,-2586.39990234,314.50000000,4.69999981,90.00000000,-1,-1,6000); //Buccaneer
  369.     CreateVehicle(438,-2587.30004883,318.29998779,5.09999990,90.00000000,-1,-1,6000); //Cabbie
  370.     CreateVehicle(438,-2587.10009766,321.50000000,5.09999990,90.00000000,-1,-1,6000); //Cabbie
  371.     CreateVehicle(553,-1665.69995117,-172.30000305,16.39999962,314.00000000,-1,-1,6000); //Nevada
  372.     CreateVehicle(519,-1617.09997559,-256.50000000,20.29999924,0.00000000,-1,-1,6000); //Shamal
  373.     CreateVehicle(519,-1637.69995117,-266.00000000,20.29999924,0.00000000,-1,-1,6000); //Shamal
  374.     CreateVehicle(511,-1329.30004883,-277.29998779,16.20000076,0.00000000,-1,-1,6000); //Beagle
  375.     CreateVehicle(511,-1305.59997559,-268.10000610,15.69999981,0.00000000,-1,-1,6000); //Beagle
  376.     CreateVehicle(593,-1282.69995117,-258.79998779,14.69999981,0.00000000,-1,-1,6000); //Dodo
  377.     CreateVehicle(512,-1382.90002441,-214.50000000,14.80000019,262.00000000,-1,-1,6000); //Cropdust
  378.     CreateVehicle(512,-1380.59997559,-200.19999695,14.80000019,261.99645996,-1,-1,6000); //Cropdust
  379.     CreateVehicle(513,-1378.80004883,-185.89999390,14.89999962,264.00000000,-1,-1,6000); //Stunt
  380.     CreateVehicle(417,-1344.80004883,-252.00000000,13.10000038,314.00000000,-1,-1,6000); //Leviathan
  381.     CreateVehicle(487,-1355.40002441,-240.00000000,14.39999962,316.00000000,-1,-1,6000); //Maverick
  382.     CreateVehicle(487,-1365.50000000,-230.00000000,14.39999962,315.99975586,-1,-1,6000); //Maverick
  383.     CreateVehicle(499,-1857.19995117,114.40000153,15.19999981,0.00000000,-1,-1,6000); //Benson
  384.     CreateVehicle(609,-1849.09997559,114.19999695,15.30000019,0.00000000,-1,-1,6000); //Boxville
  385.     CreateVehicle(414,-1841.90002441,114.90000153,15.30000019,0.00000000,-1,-1,6000); //Mule
  386.     CreateVehicle(456,-1834.30004883,115.59999847,15.39999962,0.00000000,-1,-1,6000); //Yankee
  387.     CreateVehicle(403,-1856.19995117,131.19999695,15.80000019,266.00000000,-1,-1,6000); //Linerunner
  388.     CreateVehicle(403,-1856.09997559,136.50000000,15.80000019,265.99548340,-1,-1,6000); //Linerunner
  389.     CreateVehicle(443,-1827.69995117,112.80000305,15.89999962,0.00000000,-1,-1,6000); //Packer
  390.     CreateVehicle(515,-1854.59997559,143.19999695,16.29999924,264.00000000,-1,-1,6000); //Roadtrain
  391.     CreateVehicle(515,-1853.59997559,150.10000610,16.29999924,263.99597168,-1,-1,6000); //Roadtrain
  392.     CreateVehicle(406,-1852.69995117,160.80000305,15.89999962,268.00000000,-1,-1,6000); //Dumper
  393.     CreateVehicle(402,-1926.09997559,585.29998779,35.09999847,178.00000000,-1,-1,6000); //Buffalo
  394.     CreateVehicle(411,-1931.80004883,585.59997559,34.90000153,178.00000000,-1,-1,6000); //Infernus
  395.     CreateVehicle(415,-1937.59997559,585.50000000,35.00000000,178.00000000,-1,-1,6000); //Cheetah
  396.     CreateVehicle(480,-1943.59997559,585.59997559,35.00000000,176.00000000,-1,-1,6000); //Comet
  397.     CreateVehicle(555,-1949.80004883,585.70001221,34.90000153,179.99993896,-1,-1,6000); //Windsor
  398.     CreateVehicle(426,-1955.80004883,585.79998779,34.90000153,178.00000000,-1,-1,6000); //Premier
  399.     CreateVehicle(448,-1805.30004883,951.79998779,24.60000038,266.00000000,3,1,6000); //Pizzaboy
  400.     CreateVehicle(448,-1805.19995117,953.50000000,24.60000038,265.99548340,3,1,6000); //Pizzaboy
  401.     CreateVehicle(448,-1805.09997559,955.20001221,24.60000038,265.99548340,3,1,6000); //Pizzaboy
  402.     CreateVehicle(448,-1805.19995117,957.00000000,24.60000038,265.99548340,3,1,6000); //Pizzaboy
  403.    
  404.     CreateVehicle(451,280.89999390,1800.40002441,1053.90002441+6,44.00000000,-1,-1,1); //Turismo
  405.     CreateVehicle(451,283.00000000,1802.80004883,1053.90002441+6,43.99475098,-1,-1,1); //Turismo
  406.     CreateVehicle(451,285.29998779,1804.80004883,1053.90002441+6,43.99475098,-1,-1,1); //Turismo
  407.     CreateVehicle(541,287.70001221,1807.00000000,1053.80004883+6,48.00000000,-1,-1,1); //Bullet
  408.     CreateVehicle(541,289.89999390,1809.40002441,1053.80004883+6,47.99926758,-1,-1,1); //Bullet
  409.     CreateVehicle(541,292.10000610,1811.59997559,1053.80004883+6,47.99926758,-1,-1,1); //Bullet
  410.     CreateVehicle(411,294.20001221,1814.09997559,1053.90002441+6,44.00000000,-1,-1,1); //Infernus
  411.     CreateVehicle(411,296.39999390,1816.50000000,1053.90002441+6,44.00000000,-1,-1,1); //Infernus
  412.     CreateVehicle(411,298.79998779,1818.69995117,1053.90002441+6,43.99475098,-1,-1,1); //Infernus
  413.     CreateVehicle(562,300.79998779,1821.00000000,1053.90002441+6,46.00000000,-1,-1,1); //Elegy
  414.     CreateVehicle(562,303.39999390,1823.30004883,1053.90002441+6,45.99975586,-1,-1,1); //Elegy
  415.     CreateVehicle(560,305.70001221,1825.30004883,1053.90002441+6,46.00000000,-1,-1,1); //Sultan
  416.     CreateVehicle(560,308.00000000,1827.59997559,1053.90002441+6,45.99975586,-1,-1,1); //Sultan
  417.     CreateVehicle(560,310.10000610,1829.80004883,1053.90002441+6,45.99975586,-1,-1,1); //Sultan
  418.     CreateVehicle(545,312.39999390,1832.09997559,1054.09997559+6,44.00000000,-1,-1,1); //Hustler
  419.     CreateVehicle(522,314.29998779,1834.59997559,1053.80004883+6,46.00000000,-1,-1,1); //NRG-500
  420.     CreateVehicle(522,316.50000000,1837.40002441,1053.80004883+6,45.99975586,-1,-1,1); //NRG-500
  421.     CreateVehicle(522,318.70001221,1839.50000000,1053.80004883+6,45.99975586,-1,-1,1); //NRG-500
  422.     CreateVehicle(522,320.60000610,1841.50000000,1053.80004883+6,45.99975586,-1,-1,1); //NRG-500
  423.     CreateVehicle(522,323.10000610,1844.00000000,1053.80004883+6,45.99975586,-1,-1,1); //NRG-500
  424.     CreateVehicle(522,324.89999390,1846.40002441,1053.80004883+6,45.99975586,-1,-1,1); //NRG-500
  425.     CreateVehicle(522,327.79998779,1848.90002441,1053.80004883+6,45.99975586,-1,-1,1); //NRG-500
  426.     CreateVehicle(557,323.70001221,1852.00000000,1054.40002441+6,138.00000000,-1,-1,1); //Monster B
  427.     CreateVehicle(557,307.79998779,1867.00000000,1054.40002441+6,137.99926758,-1,-1,1); //Monster B
  428.     CreateVehicle(539,301.20001221,1864.59997559,1053.80004883+6,228.00000000,-1,-1,1); //Vortex
  429.     CreateVehicle(531,299.60000610,1862.59997559,1054.09997559+6,225.99993896,-1,-1,1); //Tractor
  430.     CreateVehicle(494,297.79998779,1859.80004883,1054.09997559+6,225.99993896,-1,-1,1); //Hotring
  431.     CreateVehicle(494,295.79998779,1857.50000000,1054.09997559+6,225.99975586,-1,-1,1); //Hotring
  432.     CreateVehicle(437,261.20001221,1817.00000000,1054.40002441+6,316.00000000,-1,-1,1); //Coach
  433.     CreateVehicle(437,258.50000000,1820.69995117,1054.40002441+6,136.00000000,-1,-1,1); //Coach
  434.     CreateVehicle(424,293.10000610,1855.30004883,1054.00000000+6,230.00000000,-1,-1,1); //BF Injection
  435.     CreateVehicle(495,290.70001221,1853.19995117,1054.69995117+6,229.99993896,-1,-1,1); //Sandking
  436.     CreateVehicle(495,288.29998779,1851.00000000,1054.69995117+6,229.99877930,-1,-1,1); //Sandking
  437.     CreateVehicle(495,285.89999390,1848.69995117,1054.69995117+6,229.99877930,-1,-1,1); //Sandking
  438.     CreateVehicle(409,269.20001221,1829.80004883,1054.09997559+6,225.99993896,-1,-1,1); //Stretch
  439.     CreateVehicle(409,271.60000610,1831.80004883,1054.09997559+6,225.99975586,-1,-1,20); //Stretch
  440.     CreateVehicle(573,310.10000610,1864.00000000,1054.80004883+6,136.00000000,-1,-1,20); //Duneride
  441.     CreateVehicle(524,319.70001221,1854.69995117,1055.00000000+6,136.00000000,-1,-1,20); //Cement Truck
  442.     CreateVehicle(406,312.70001221,1857.40002441,1055.59997559+6,134.00000000,-1,-1,20); //Dumper
  443.     CreateVehicle(530,273.39999390,1834.30004883,1053.90002441+6,224.00000000,-1,-1,20); //Forklift
  444.     CreateVehicle(530,275.39999390,1836.59997559,1053.90002441+6,223.99475098,-1,-1,20); //Forklift
  445.     CreateVehicle(489,284.10000610,1845.59997559,1054.50000000+6,224.00000000,-1,-1,20); //Rancher
  446.     CreateVehicle(489,281.79998779,1843.00000000,1054.50000000+6,223.99475098,-1,-1,20); //Rancher
  447.     CreateVehicle(471,277.29998779,1839.00000000,1053.69995117+6,224.00000000,-1,-1,20); //Quad
  448.     CreateVehicle(471,279.39999390,1841.50000000,1053.69995117+6,223.99475098,-1,-1,20); //Quad
  449.     CreateVehicle(451,-1183.9768,-486.2108,13.8553,45.8030,-1,-1,20); // a
  450.     CreateVehicle(451,-1186.9561,-489.4417,13.8549,44.8927,-1,-1,20); // a
  451.     CreateVehicle(451,-1190.3053,-492.7248,13.8552,44.1997,-1,-1,20); // a
  452.     CreateVehicle(411,-1193.1714,-495.9659,13.8755,44.3840,-1,-1,20); // a
  453.     CreateVehicle(411,-1196.0480,-498.9617,13.8755,44.7374,-1,-1,20); // a
  454.     CreateVehicle(411,-1198.8105,-501.6311,13.8755,42.6785,-1,-1,20); // a
  455.     CreateVehicle(560,-1201.7108,-504.6472,13.8538,45.0195,-1,-1,20);// a
  456.     CreateVehicle(560,-1204.2449,-507.1839,13.8535,44.0512,-1,-1,20); // a
  457.     CreateVehicle(562,-1206.9146,-509.9257,13.8081,43.1511,-1,-1,20); // a
  458.     CreateVehicle(562,-1209.3405,-512.3433,13.8082,43.0017,-1,-1,20); // a
  459.     CreateVehicle(541,-1211.8167,-514.8370,13.7733,45.2592,-1,-1,20); // a
  460.     CreateVehicle(541,-1214.2749,-517.1995,13.7733,44.9883,-1,-1,20); // a
  461.     CreateVehicle(557,-1220.9336,-522.8406,14.5234,46.1124,-1,-1,20); // a
  462.     CreateVehicle(556,-1223.9945,-527.0887,14.5230,55.3126,-1,-1,20); // A
  463.    
  464.     CreateVehicle(522,-2237.9082,-1710.9894,480.4368,96.0005,-1,-1,20); //
  465.     CreateVehicle(522,-2237.3833,-1712.2794,480.4471,96.6538,-1,-1,20); //
  466.     CreateVehicle(522,-2237.3308,-1713.1232,480.4463,99.0342,-1,-1,20); //
  467.     CreateVehicle(522,-2237.0911,-1714.6444,480.4474,100.3504,-1,-1,20); //
  468.     CreateVehicle(522,-2199.3972,-1677.9700,375.3003,276.1049,-1,-1,20); //
  469.     CreateVehicle(522,-2236.9839,-1716.0105,480.4464,100.1810,-1,-1,20); //
  470.     CreateVehicle(522,-2236.7202,-1717.4774,480.4474,100.1810,-1,-1,20); //
  471.     CreateVehicle(522,-2236.5088,-1718.6554,480.4483,100.1810,-1,-1,20); //
  472.     CreateVehicle(522,-2236.2629,-1720.0248,480.4494,100.1810,-1,-1,20); //
  473.     CreateVehicle(522,-2235.9348,-1721.8513,480.4507,100.1810,-1,-1,20); //
  474.     CreateVehicle(522,-2235.9275,-1723.6858,480.4416,100.1810,-1,-1,20); //
  475.     CreateVehicle(522,-2235.3923,-1726.6650,480.4439,100.1810,-1,-1,20); //
  476.     CreateVehicle(522,-2235.0830,-1728.9392,480.4424,100.1810,-1,-1,20); //
  477.     CreateVehicle(522,-2235.0535,-1730.3480,480.4362,100.1810,-1,-1,20); //
  478.  
  479.     CreateDynamicObject(1829, 1934.70, 996.60, 991.90,   0.00, 0.00, 0.00);
  480.     CreateDynamicObject(1634, -1675.40, 1311.30, 7.50,   0.00, 0.00, 26.00);
  481.     CreateDynamicObject(3256, -1537.20, 384.20, 6.20,   0.00, 0.00, 0.00);
  482.     CreateDynamicObject(3279, -1636.00, 651.90, 6.20,   0.00, 0.00, 0.00);
  483.     CreateDynamicObject(3279, -1578.00, 650.00, 6.20,   0.00, 0.00, 182.00);
  484.     CreateDynamicObject(3279, -1576.60, 673.00, 6.20,   0.00, 0.00, 272.00);
  485.     CreateDynamicObject(3279, -1540.00, 478.50, 6.20,   0.00, 0.00, 0.00);
  486.     CreateDynamicObject(12912, -1476.90, 457.00, 17.70,   0.00, 0.00, 88.00);
  487.     CreateDynamicObject(3268, -1244.10, 457.30, 6.30,   0.00, 0.00, 0.00);
  488.     CreateDynamicObject(980, -1334.30, 480.80, 7.90,   308.00, 0.00, 0.00);
  489.     CreateDynamicObject(980, -1334.30, 482.60, 9.40,   310.00, 0.00, 0.00);
  490.     CreateDynamicObject(1655, -1522.90, 500.90, 7.50,   0.00, 0.00, 268.00);
  491.     CreateDynamicObject(1634, -1517.80, 502.60, 9.90,   12.00, 0.00, 268.00);
  492.     CreateDynamicObject(1634, -1518.10, 498.50, 9.90,   12.00, 0.00, 267.99);
  493.     CreateDynamicObject(6865, -2516.20, 1204.70, 44.30,   0.00, 0.00, 134.00);
  494.     CreateDynamicObject(3524, -2485.70, 1203.80, 38.30,   0.00, 0.00, 0.00);
  495.     CreateDynamicObject(3524, -2493.50, 1200.20, 38.30,   0.00, 2.00, 32.00);
  496.     CreateDynamicObject(16778, -2481.30, 1209.90, 37.80,   0.00, 0.00, 0.00);
  497.     CreateDynamicObject(9482, -2245.40, 644.00, 55.10,   0.00, 0.00, 0.00);
  498.     CreateDynamicObject(9482, -2210.70, 576.70, 40.60,   0.00, 0.00, 268.00);
  499.     CreateDynamicObject(2987, -2212.60, 645.50, 49.60,   0.00, 0.00, 0.00);
  500.     CreateDynamicObject(2098, -2212.60, 645.50, 50.40,   0.00, 0.00, 0.00);
  501.     CreateDynamicObject(2098, -2225.00, 651.40, 64.50,   0.00, 0.00, 90.00);
  502.     CreateDynamicObject(2987, -2225.00, 651.40, 63.60,   0.00, 0.00, 90.00);
  503.     CreateDynamicObject(3269, -2122.40, 296.50, 33.80,   0.00, 0.00, 256.00);
  504.     CreateDynamicObject(1655, -1992.90, 182.00, 27.60,   0.00, 0.00, 220.00);
  505.     CreateDynamicObject(1655, -1988.60, 176.80, 30.90,   8.00, 0.00, 222.00);
  506.     CreateDynamicObject(1634, -1986.50, 171.20, 34.80,   18.00, 0.00, 222.00);
  507.     CreateDynamicObject(1634, -1983.40, 173.90, 34.80,   18.00, 0.00, 221.99);
  508.     CreateDynamicObject(850, -2135.60, -263.80, 34.40,   0.00, 0.00, 0.00);
  509.     CreateDynamicObject(850, -2131.90, -263.50, 34.40,   0.00, 0.00, 0.00);
  510.     CreateDynamicObject(850, -2128.20, -263.20, 34.40,   0.00, 0.00, 0.00);
  511.     CreateDynamicObject(850, -2130.20, -263.30, 34.40,   0.00, 0.00, 0.00);
  512.     CreateDynamicObject(849, -2133.30, -262.80, 34.60,   0.00, 0.00, 0.00);
  513.     CreateDynamicObject(5291, -2129.10, -239.60, 43.80,   0.00, 0.00, 0.00);
  514.     CreateDynamicObject(3270, -1506.20, 697.40, 6.20,   0.00, 0.00, 104.00);
  515.     CreateDynamicObject(12956, -1521.90, 948.60, 10.00,   0.00, 0.00, 274.00);
  516.     CreateDynamicObject(1655, -1508.10, 776.30, 7.50,   0.00, 0.00, 180.00);
  517.     CreateDynamicObject(1655, -1508.10, 769.20, 11.90,   18.00, 0.00, 179.99);
  518.     CreateDynamicObject(1655, -1508.10, 763.50, 17.90,   30.00, 0.00, 179.99);
  519.     CreateDynamicObject(1634, -1505.80, 759.80, 23.60,   40.00, 0.00, 180.00);
  520.     CreateDynamicObject(1634, -1510.10, 759.80, 23.60,   40.00, 0.00, 179.99);
  521.     CreateDynamicObject(1225, -1503.90, 747.30, 38.60,   0.00, 0.00, 0.00);
  522.     CreateDynamicObject(1225, -1505.10, 747.40, 38.60,   0.00, 0.00, 0.00);
  523.     CreateDynamicObject(1225, -1506.30, 747.50, 38.60,   0.00, 0.00, 0.00);
  524.     CreateDynamicObject(1225, -1507.80, 747.60, 38.60,   0.00, 0.00, 0.00);
  525.     CreateDynamicObject(1225, -1509.00, 747.70, 38.70,   0.00, 0.00, 0.00);
  526.     CreateDynamicObject(1225, -1508.40, 748.40, 38.70,   0.00, 0.00, 0.00);
  527.     CreateDynamicObject(1225, -1506.90, 748.30, 38.60,   0.00, 0.00, 0.00);
  528.     CreateDynamicObject(1225, -1505.70, 747.90, 38.60,   0.00, 0.00, 0.00);
  529.     CreateDynamicObject(1225, -1504.40, 747.80, 38.60,   0.00, 0.00, 0.00);
  530.     CreateDynamicObject(1225, -1509.60, 748.40, 38.70,   0.00, 0.00, 0.00);
  531.     CreateDynamicObject(1225, -1510.40, 747.70, 38.70,   0.00, 0.00, 0.00);
  532.     CreateDynamicObject(1225, -1511.40, 747.70, 38.70,   0.00, 0.00, 0.00);
  533.     CreateDynamicObject(1225, -1512.40, 747.70, 38.70,   0.00, 0.00, 0.00);
  534.     CreateDynamicObject(1225, -1511.90, 748.40, 38.70,   0.00, 0.00, 0.00);
  535.     CreateDynamicObject(1225, -1510.90, 748.40, 38.70,   0.00, 0.00, 0.00);
  536.     CreateDynamicObject(13650, -1575.80, -1750.30, 1207.70,   0.00, 0.00, 0.00);
  537.     CreateDynamicObject(13657, -1607.40, -1773.30, 1203.80,   0.00, 0.00, 0.00);
  538.     CreateDynamicObject(7617, -1645.40, -1707.50, 1211.70,   0.00, 0.00, 270.00);
  539.     CreateDynamicObject(3037, -1614.30, -1801.50, 1202.80,   0.00, 0.00, 270.00);
  540.     CreateDynamicObject(3057, -1619.50, -1753.40, 1201.20,   0.00, 0.00, 0.00);
  541.     CreateDynamicObject(3057, -1616.50, -1754.60, 1201.20,   0.00, 0.00, 0.00);
  542.     CreateDynamicObject(3057, -1617.80, -1758.10, 1201.20,   0.00, 0.00, 0.00);
  543.     CreateDynamicObject(3057, -1615.60, -1761.40, 1201.20,   52.84, 27.15, 337.77);
  544.     CreateDynamicObject(3057, -1615.40, -1761.90, 1201.20,   52.83, 27.15, 337.77);
  545.     CreateDynamicObject(1225, -1610.30, -1781.00, 1201.20,   0.00, 0.00, 0.00);
  546.     CreateDynamicObject(1225, -1580.00, -1796.00, 1201.20,   0.00, 0.00, 0.00);
  547.     CreateDynamicObject(1225, -1577.90, -1761.80, 1201.20,   0.00, 0.00, 0.00);
  548.     CreateDynamicObject(1225, -1571.90, -1708.50, 1201.20,   0.00, 0.00, 0.00);
  549.     CreateDynamicObject(1225, -1609.40, -1713.70, 1201.20,   0.00, 0.00, 0.00);
  550.     CreateDynamicObject(1225, -1519.30, -1779.70, 1201.20,   0.00, 0.00, 0.00);
  551.     CreateDynamicObject(1225, -1518.00, -1747.10, 1201.20,   0.00, 0.00, 0.00);
  552.     CreateDynamicObject(1225, -1516.50, -1709.40, 1201.20,   0.00, 0.00, 0.00);
  553.     CreateDynamicObject(16337, -1512.70, -1766.90, 1200.60,   0.00, 0.00, 0.00);
  554.     CreateDynamicObject(16337, -1512.70, -1769.60, 1200.60,   0.00, 0.00, 0.00);
  555.     CreateDynamicObject(16337, -1629.60, -1738.70, 1200.60,   0.00, 0.00, 0.00);
  556.     CreateDynamicObject(16337, -1629.60, -1736.00, 1200.60,   0.00, 0.00, 0.00);
  557.     CreateDynamicObject(18759, -1364.56, -490.37, 31.01,   0.00, 0.00, 297.84);
  558.     CreateDynamicObject(18800, -1119.64, -438.01, 24.20,   0.00, 0.00, 11.70);
  559.     CreateDynamicObject(18801, -1147.50, -457.08, 59.50,   0.00, 0.00, 197.82);
  560.     CreateDynamicObject(18809, -1234.16, 3101.20, -498.00,   0.00, 0.00, 0.00);
  561.     CreateDynamicObject(18809, -1223.76, -462.28, 39.01,   90.00, 0.00, 281.26);
  562.     CreateDynamicObject(18809, -1174.65, -452.38, 39.03,   90.00, 0.00, 281.26);
  563.     CreateDynamicObject(18826, -1261.52, -453.64, 38.72,   -91.00, -16.00, 355.67);
  564.     CreateDynamicObject(18827, -1203.00, 6337.00, -434.00,   -4.00, 0.00, 0.00);
  565.     CreateDynamicObject(18825, -1245.49, -432.44, 54.30,   0.00, 0.00, 200.70);
  566.     CreateDynamicObject(18827, -1300.36, -455.46, 71.87,   -2.00, 0.00, 293.18);
  567.     CreateDynamicObject(18780, -1377.02, -489.58, 80.39,   0.00, 0.00, 204.64);
  568.     CreateDynamicObject(16357, -939.20, 558.50, 96.90,   0.00, 326.00, 46.00);
  569.     CreateDynamicObject(16357, -847.60, 653.40, 185.90,   0.00, 325.99, 46.00);
  570.     CreateDynamicObject(16357, -757.40, 746.80, 273.50,   0.00, 326.00, 46.00);
  571.     CreateDynamicObject(16357, -663.30, 844.30, 358.20,   0.00, 330.00, 46.00);
  572.     CreateDynamicObject(16357, -567.40, 943.60, 437.90,   0.00, 330.00, 46.00);
  573.     CreateDynamicObject(16357, -471.50, 1042.90, 517.60,   0.00, 330.00, 46.00);
  574.     CreateDynamicObject(16357, -375.50, 1142.30, 597.40,   0.00, 330.00, 46.00);
  575.     CreateDynamicObject(16357, -275.00, 1246.40, 661.80,   0.00, 342.00, 46.00);
  576.     CreateDynamicObject(16357, -170.10, 1355.00, 710.90,   0.00, 341.99, 46.00);
  577.     CreateDynamicObject(16357, -64.70, 1464.20, 760.20,   0.00, 341.99, 46.00);
  578.     CreateDynamicObject(16357, 34.10, 1566.50, 829.60,   0.00, 325.99, 46.00);
  579.     CreateDynamicObject(16357, 126.00, 1661.70, 918.90,   0.00, 325.99, 46.00);
  580.     CreateDynamicObject(16357, 217.80, 1756.80, 1008.10,   0.00, 325.99, 46.00);
  581.     CreateDynamicObject(1655, -976.70, 513.90, 59.80,   330.00, 0.00, 134.00);
  582.     CreateDynamicObject(1655, -982.10, 519.50, 59.80,   330.00, 0.00, 133.99);
  583.     CreateDynamicObject(1634, -981.30, 506.40, 61.10,   0.00, 0.00, 134.00);
  584.     CreateDynamicObject(1634, -984.00, 509.20, 61.10,   0.00, 0.00, 133.99);
  585.     CreateDynamicObject(1634, -986.70, 512.10, 61.10,   0.00, 0.00, 133.99);
  586.     CreateDynamicObject(1634, -989.60, 515.10, 61.10,   0.00, 0.00, 133.99);
  587.     CreateDynamicObject(1634, -986.80, 501.20, 65.80,   14.00, 0.00, 133.99);
  588.     CreateDynamicObject(1634, -989.60, 504.20, 65.80,   14.00, 0.00, 133.99);
  589.     CreateDynamicObject(1634, -992.10, 506.90, 65.80,   14.00, 0.00, 133.99);
  590.     CreateDynamicObject(1634, -995.00, 509.90, 65.80,   14.00, 0.00, 133.99);
  591.     CreateDynamicObject(1225, -804.10, 708.50, 234.10,   0.00, 318.00, 46.00);
  592.     CreateDynamicObject(1225, -794.60, 699.30, 234.40,   0.00, 318.00, 46.00);
  593.     CreateDynamicObject(1225, -333.60, 1193.90, 635.90,   292.00, 90.00, 320.00);
  594.     CreateDynamicObject(1225, -334.60, 1194.70, 635.90,   291.99, 90.00, 320.00);
  595.     CreateDynamicObject(1225, -332.50, 1193.00, 635.90,   291.99, 90.00, 320.00);
  596.     CreateDynamicObject(1225, -331.50, 1192.20, 635.90,   291.99, 90.00, 320.00);
  597.     CreateDynamicObject(1225, -330.50, 1191.40, 636.00,   291.99, 90.00, 320.00);
  598.     CreateDynamicObject(1225, -329.30, 1190.50, 636.10,   291.99, 90.00, 320.00);
  599.     CreateDynamicObject(1225, -328.30, 1189.70, 636.10,   291.99, 90.00, 320.00);
  600.     CreateDynamicObject(1225, -326.90, 1188.60, 636.40,   291.99, 90.00, 320.00);
  601.     CreateDynamicObject(1225, -325.90, 1187.80, 636.40,   291.99, 90.00, 320.00);
  602.     CreateDynamicObject(1225, -324.70, 1186.90, 636.40,   291.99, 90.00, 320.00);
  603.     CreateDynamicObject(8040, 291.70, 1832.70, 1053.90,   0.00, 0.00, 226.00);
  604.     CreateDynamicObject(4641, 259.20, 1811.20, 1054.80,   0.00, 0.00, 228.00);
  605.     CreateDynamicObject(4641, 271.10, 1799.90, 1054.80,   0.00, 0.00, 224.00);
  606.     CreateDynamicObject(10281, 318.90, 1859.90, 1056.00,   0.00, 0.00, 316.00);
  607.     CreateDynamicObject(14467, 271.10, 1800.20, 1059.20,   0.00, 0.00, 136.00);
  608.     CreateDynamicObject(2714, 312.80, 1866.80, 1057.50,   0.00, 0.00, 314.00);
  609.     CreateDynamicObject(18813, -1472.18, -531.48, 70.57,   0.00, 0.00, 3.45);
  610.     CreateDynamicObject(18824, 7201.13, 6278.16, -827.99,   0.00, 0.00, 0.00);
  611.     CreateDynamicObject(18804, -1607.83, -550.07, 63.88,   0.00, 0.00, 0.00);
  612.     CreateDynamicObject(18794, -1701.85, -550.11, 60.11,   0.00, 6.00, 0.00);
  613.     CreateDynamicObject(18807, -1758.43, -548.09, 71.43,   0.00, 0.00, 357.26);
  614.     CreateDynamicObject(18794, -1518.69, -550.28, 49.95,   0.00, -28.00, 179.00);
  615.     CreateDynamicObject(18832, -1477.41, -536.50, 42.47,   -4.00, 263.00, 40.00);
  616.     CreateDynamicObject(18831, -1490.48, -542.82, 57.33,   0.00, 55.00, 190.00);
  617.     CreateDynamicObject(18801, -1793.66, -536.60, 104.43,   0.00, 7.00, 0.00);
  618.     CreateDynamicObject(18852, -1847.11, -522.73, 73.17,   16.00, -104.00, 1.00);
  619.     CreateDynamicObject(18830, -11500.93, -3829.89, -42.30,   0.00, 0.00, 0.00);
  620.     CreateDynamicObject(18830, -1909.63, -520.06, 61.63,   -1.00, 207.00, -1.00);
  621.  
  622.     CreateDynamicObject(13640, -2242, -1694.0999755859, 480.60000610352, 0, 0, 44);
  623.     CreateDynamicObject(13640, -2238, -1690.4000244141, 480.5, 0, 0, 44);
  624.     CreateDynamicObject(13640, -2226.3999023438, -1679.0999755859, 480.70001220703, 0, 0, 44);
  625.     CreateDynamicObject(13640, -2222.6999511719, -1675.5, 481.29998779297, 0, 0, 44);
  626.     CreateDynamicObject(13647, -2200.8000488281, -1655.5999755859, 480.79998779297, 0, 0, 44);
  627.     CreateDynamicObject(13647, -2202.1999511719, -1654.4000244141, 480.89999389648, 0, 0, 44);
  628.     CreateDynamicObject(13640, -2182.3000488281, -1643, 482.20001220703, 0, 0, 316);
  629.     CreateDynamicObject(13640, -2178.3999023438, -1646.9000244141, 482.39999389648, 0, 0, 314);
  630.     CreateDynamicObject(3515, -2174.6000976563, -1650.8000488281, 481.39999389648, 0, 0, 0);
  631.     CreateDynamicObject(9316, -2177, -1663.3000488281, 479.5, 0, 0, 316);
  632.     CreateDynamicObject(3865, -2185.3999023438, -1678.1999511719, 480.10000610352, 0, 0, 320);
  633.     CreateDynamicObject(3865, -2191.3000488281, -1685.0999755859, 480.10000610352, 0, 0, 142);
  634.     CreateDynamicObject(3865, -2196.8999023438, -1692.6999511719, 477.89999389648, 22, 0, 324);
  635.     CreateDynamicObject(8632, -2198.8999023438, -1731.3000488281, 474.79998779297, 0, 0, 158);
  636.     CreateDynamicObject(1503, -2207.3999023438, -1788.4000244141, 474.39999389648, 0, 0, 195.99993896484);
  637.     CreateDynamicObject(16318, -2198.8000488281, -1812.3000488281, 480.39999389648, 0, 0, 290);
  638.     CreateDynamicObject(16301, -2186.3999023438, -1841, 488.70001220703, 0, 0, 296);
  639.     CreateDynamicObject(13593, -2179.3000488281, -1855.5999755859, 494.29998779297, 0, 0, 208);
  640.     CreateDynamicObject(1395, -2149.8999023438, -1907, 500.20001220703, 273.99993896484, 180.00079345703, 210.00091552734);
  641.     CreateDynamicObject(1634, -2137.3999023438, -1928.8000488281, 504, 0, 0, 210);
  642.     CreateDynamicObject(8624, -2115, -1969.8000488281, 510.70001220703, 0, 0, 28);
  643.     CreateDynamicObject(8624, -2086.8999023438, -2022.6999511719, 510.70001220703, 0, 0, 28);
  644.     CreateDynamicObject(8624, -2058.6999511719, -2075.6000976563, 510.70001220703, 0, 0, 28);
  645.     CreateDynamicObject(1634, -2044.4000244141, -2097.6999511719, 511.79998779297, 0, 0, 206);
  646.     CreateDynamicObject(1634, -2048.1000976563, -2099.5, 511.79998779297, 0, 0, 205.99993896484);
  647.  
  648.     Dono[0] = 1;
  649.     Dono[1] = 2;
  650.     Dono[2] = 3;
  651.     Dono[3] = 4;
  652.     Dono[4] = 5;
  653.     Dono[5] = 6;
  654.     Dono[6] = 7;
  655.     Dono[7] = 8;
  656.     Dono[8] = 9;
  657.     Dono[9] = 10;
  658.     GZ[0] = GangZoneCreate(-1753.477, 625.6215, -1513.99, 803.1449);
  659.     GZ[1] = GangZoneCreate(-1517.853, 420.4833, -1208.838, 598.0067);
  660.     GZ[2] = GangZoneCreate(-2390.82, 65.43655, -2228.587, 329.7492);
  661.     GZ[3] = GangZoneCreate(-2750.05, 191.6754, -2549.19, 345.529);
  662.     GZ[4] = GangZoneCreate(-2155.196, 112.7761, -1992.963, 357.3639);
  663.     GZ[5] = GangZoneCreate(-1780.516, 1296.265, -1475.364, 1509.293);
  664.     GZ[6] = GangZoneCreate(-2263.351, 554.6121, -2085.668, 779.4751);
  665.     GZ[7] = GangZoneCreate(-2626.444, 1173.972, -2406.271, 1323.88);
  666.     GZ[8] = GangZoneCreate(-2800.265, -344.8398, -2583.954, -183.0962);
  667.     GZ[9] = GangZoneCreate(-2209.274, -293.5552, -1996.826, -56.85734);    
  668.     return 1;
  669. }
  670.  
  671. public OnGameModeExit()
  672. {
  673.     DOF2_Exit();
  674.     for(new i = 0;i<GetMaxPlayers();i++)
  675.     {
  676.         TextDrawDestroy(Textodraw[i][0]);
  677.         TextDrawDestroy(Textodraw[i][1]);
  678.         TextDrawDestroy(Textodraw[i][2]);
  679.     }
  680.     return 1;
  681. }
  682.  
  683. public OnPlayerEnterCheckpoint(playerid)
  684. {
  685.     if(PlayerBope(playerid) && PI[playerid][pCP] == 1){
  686.         if(Dono[0] != PI[playerid][pTime]){
  687.             if(Dominando[0] == false){
  688.                 Dominando[0] = true;
  689.                 Timer[0] = SetTimerEx("ContandoBope",1000,true,"i",playerid);
  690.                 Contando[0] = 15;
  691.                 DominandoGZ(0,PI[playerid][pTime]);
  692.             }
  693.         }
  694.     }
  695.     else if(PlayerExercito(playerid) && PI[playerid][pCP] == 2){
  696.         if(Dono[1] != PI[playerid][pTime]){
  697.             if(Dominando[1] == false){
  698.                 Dominando[1] = true;
  699.                 Timer[1] = SetTimerEx("ContandoExercito",1000,true,"i",playerid);
  700.                 Contando[1] = 15;
  701.                 DominandoGZ(1,PI[playerid][pTime]);
  702.             }
  703.         }
  704.     }
  705.     else if(PlayerBozo(playerid) && PI[playerid][pCP] == 3){
  706.         if(Dono[2] != PI[playerid][pTime]){
  707.             if(Dominando[2] == false){
  708.                 Dominando[2] = true;
  709.                 Timer[2] = SetTimerEx("ContandoBozo",1000,true,"i",playerid);
  710.                 Contando[2] = 15;
  711.                 DominandoGZ(2,PI[playerid][pTime]);
  712.             }
  713.         }
  714.     }
  715.     else if(PlayerFrango(playerid) && PI[playerid][pCP] == 4){
  716.         if(Dono[3] != PI[playerid][pTime]){
  717.             if(Dominando[3] == false){
  718.                 Dominando[3] = true;
  719.                 Timer[3] = SetTimerEx("ContandoFrango",1000,true,"i",playerid);
  720.                 Contando[3] = 15;
  721.                 DominandoGZ(3,PI[playerid][pTime]);
  722.             }
  723.         }
  724.     }
  725.     else if(PlayerRifas(playerid) && PI[playerid][pCP] == 5){
  726.         if(Dono[4] != PI[playerid][pTime]){
  727.             if(Dominando[4] == false){
  728.                 Dominando[4] = true;
  729.                 Timer[4] = SetTimerEx("ContandoRifas",1000,true,"i",playerid);
  730.                 Contando[4] = 15;
  731.                 DominandoGZ(4,PI[playerid][pTime]);
  732.             }
  733.         }
  734.     }
  735.     else if(PlayerNang(playerid) && PI[playerid][pCP] == 6){
  736.         if(Dono[5] != PI[playerid][pTime]){
  737.             if(Dominando[5] == false){
  738.                 Dominando[5] = true;
  739.                 Timer[5] = SetTimerEx("ContandoNang",1000,true,"i",playerid);
  740.                 Contando[5] = 15;
  741.                 DominandoGZ(5,PI[playerid][pTime]);
  742.             }
  743.         }
  744.     }
  745.     else if(PlayerTriads(playerid) && PI[playerid][pCP] == 7){
  746.         if(Dono[6] != PI[playerid][pTime]){
  747.             if(Dominando[6] == false){
  748.                 Dominando[6] = true;
  749.                 Timer[6] = SetTimerEx("ContandoTriads",1000,true,"i",playerid);
  750.                 Contando[6] = 15;
  751.                 DominandoGZ(6,PI[playerid][pTime]);
  752.             }
  753.         }
  754.     }
  755.     else if(PlayerMotoqueiro(playerid) && PI[playerid][pCP] == 8){
  756.         if(Dono[7] != PI[playerid][pTime]){
  757.             if(Dominando[7] == false){
  758.                 Dominando[7] = true;
  759.                 Timer[7] = SetTimerEx("ContandoMotoqueiro",1000,true,"i",playerid);
  760.                 Contando[7] = 15;
  761.                 DominandoGZ(7,PI[playerid][pTime]);
  762.             }
  763.         }
  764.     }
  765.     else if(PlayerPlayBoy(playerid) && PI[playerid][pCP] == 9){
  766.         if(Dono[8] != PI[playerid][pTime]){
  767.             if(Dominando[8] == false){
  768.                 Dominando[8] = true;
  769.                 Timer[8] = SetTimerEx("ContandoPlayBoy",1000,true,"i",playerid);
  770.                 Contando[8] = 15;
  771.                 DominandoGZ(8,PI[playerid][pTime]);
  772.             }
  773.         }
  774.     }
  775.     else if(PlayerMendigo(playerid) && PI[playerid][pCP] == 10){
  776.         if(Dono[9] != PI[playerid][pTime]){
  777.             if(Dominando[9] == false){
  778.                 Dominando[9] = true;
  779.                 Timer[9] = SetTimerEx("ContandoMendigo",1000,true,"i",playerid);
  780.                 Contando[9] = 15;
  781.                 DominandoGZ(9,PI[playerid][pTime]);
  782.             }
  783.         }
  784.     }
  785.     return 1;
  786. }
  787. public OnPlayerRequestClass(playerid, classid)
  788. {
  789.     if(Logou[playerid] == false) return 1;
  790.     SetPlayerPos(playerid, -2162.8064,460.9178,111.8750);
  791.     SetPlayerFacingAngle(playerid,1.2349);
  792.     SetPlayerCameraPos(playerid,-2162.9963,467.2214,111.8303);
  793.     SetPlayerCameraLookAt(playerid, -2162.8064,460.9178,111.8750);
  794.     switch(classid)
  795.     {
  796.         case 0:
  797.         {
  798.             PI[playerid][pTime] = 1;
  799.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~bope",3000,3);
  800.             SetPlayerColor(playerid,COR_COP);
  801.         }
  802.         case 1:
  803.         {
  804.             PI[playerid][pTime] = 2;
  805.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~Exercito",3000,3);
  806.             SetPlayerColor(playerid,COR_EXE);
  807.         }
  808.         case 2:
  809.         {
  810.             PI[playerid][pTime] = 3;
  811.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~bozo",3000,3);
  812.             SetPlayerColor(playerid,COR_BOZ);
  813.         }
  814.         case 3:
  815.         {
  816.             PI[playerid][pTime] = 4;   
  817.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~Frangolinos",3000,3);
  818.             SetPlayerColor(playerid,COR_FRA);
  819.         }
  820.         case 4..6:
  821.         {
  822.             PI[playerid][pTime] = 5;
  823.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~Rifas",3000,3);
  824.             SetPlayerColor(playerid,COR_RIF);
  825.         }
  826.         case 7..9:
  827.         {
  828.             PI[playerid][pTime] = 6;
  829.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~nang",3000,3);
  830.             SetPlayerColor(playerid,COR_NAN);
  831.         }
  832.         case 10..13:
  833.         {
  834.             PI[playerid][pTime] = 7;
  835.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~triads",3000,3);
  836.             SetPlayerColor(playerid,COR_TRI);
  837.         }
  838.         case 14..16:
  839.         {
  840.             PI[playerid][pTime] = 8;
  841.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~motoqueiros",3000,3);
  842.             SetPlayerColor(playerid,COR_MOT);
  843.         }
  844.         case 17..20:
  845.         {
  846.             PI[playerid][pTime] = 9;
  847.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~playboys",3000,3);
  848.             SetPlayerColor(playerid,COR_PLA);
  849.         }
  850.         case 21..25:
  851.         {
  852.             PI[playerid][pTime] = 10;
  853.             GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~mendigos",3000,3);
  854.             SetPlayerColor(playerid,COR_MEN);
  855.         }
  856.     }
  857.     return 1;
  858. }
  859. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  860. {
  861.     if(issuerid != INVALID_PLAYER_ID)
  862.     {
  863.         new Float: h,Float:c;
  864.         GetPlayerArmour(playerid,c);
  865.         GetPlayerHealth(playerid,h);
  866.         if(PI[issuerid][pTime] == PI[playerid][pTime]){
  867.             if(FoiX1[playerid] == false && FoiX1[issuerid] == false){
  868.                 SetPlayerHealth(playerid,h);
  869.                 SetPlayerArmour(playerid,c);
  870.             }
  871.         }
  872.         else
  873.         {
  874.             if(Comecou[playerid] == true){
  875.                 if(!IsPlayerInAnyVehicle(issuerid)){
  876.                     if(IsPlayerAimingTargetBodyPart(issuerid, playerid, 1))
  877.                     {
  878.                         PlayAudioStreamForPlayer(playerid,"http://dl.dropbox.com/u/93733388/headshot183.mp3");
  879.                         PlayAudioStreamForPlayer(issuerid,"http://dl.dropbox.com/u/93733388/headshot183.mp3");
  880.                         GameTextForPlayer(issuerid, "~r~H~r~~h~E~r~~h~~h~A~r~~h~~h~~h~D ~r~~h~~h~~h~S~r~~h~~h~H~r~~h~O~r~T", 2000, 3);
  881.                         GameTextForPlayer(playerid, "~r~H~r~~h~E~r~~h~~h~A~r~~h~~h~~h~D ~r~~h~~h~~h~S~r~~h~~h~H~r~~h~O~r~T", 5000, 3);
  882.                         SetPlayerHealth(playerid, 0);
  883.                         GivePlayerMoneyEx(issuerid,3000);
  884.                     }
  885.                 }
  886.             }
  887.         }
  888.     }
  889.     return 1;
  890. }
  891. public OnPlayerConnect(playerid)
  892. {
  893.     PlayAudioStreamForPlayer(playerid,"http://dl.dropbox.com/u/93733388/gameofthronestheme.mp3");
  894.     new arq[56];
  895.     format(arq,sizeof arq,"Banidos/%s.ini",Nome(playerid));
  896.     if(DOF2_FileExists(arq))
  897.     {
  898.         new str[250];
  899.         format(str,sizeof str,"{EE0000}Conta %s Banida\n\n{FF4500}Administrador: {FFFFFF}%s\n\n{FF4500}Razão: {FFFFFF}%s\n\n\n{FFFFFF}Para solicitar seu desbanimento acesse:\n\n\n\t{00FF00}forum.mib-samp.com",Nome(playerid),DOF2_GetString(arq,"Admin"),DOF2_GetString(arq,"Razao"));
  900.         ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"{EE0000}Banido",str,"Sair","");
  901.         return Kick(playerid);
  902.     }
  903.     TextDrawShowForPlayer(playerid,NomeServerTxt[0]);
  904.     TextDrawShowForPlayer(playerid,NomeServerTxt[1]);
  905.     SendDeathMessage(INVALID_PLAYER_ID, playerid, 200);
  906.     TextDrawShowForPlayer(playerid,ImagemEntrada);
  907.     TextDrawShowForPlayer(playerid,Textodraw[playerid][1]);
  908.     TextDrawShowForPlayer(playerid,Textodraw[playerid][2]);
  909.     PI[playerid][pDolar] = 0;
  910.     Matou[playerid] = 0;
  911.     PI[playerid][pMatou] = 0;
  912.     PI[playerid][pMorreu] = 0;
  913.     PI[playerid][pAdmin] = 0;
  914.     PI[playerid][pTime] = 0;
  915.     Errou[playerid] = 0;
  916.     PI[playerid][pCP] = 0;
  917.     PI[playerid][pPreso] = 0;
  918.     PI[playerid][pCalado] = 0;
  919.     PI[playerid][pMorreuX1] = 0;
  920.     PI[playerid][pMatouX1] = 0;
  921.     EnviarPM[playerid] = 999;
  922.     ResetPlayerWeapons(playerid);
  923.     new str[500];
  924.     format(str,sizeof str,"{FFFFFF}\tRegras {00FF00}Made {FFFF00}In {0000FF}Brazil {FFFFFF}Team Death Match v1.0\n\n\n\n{FFFFFF}Não utilize cheater's - Punição {FF0000}Banimento\n\n{FFFFFF}Não floodar - Punição {FF0000}Kick+Mute\n\n{FFFFFF}Não cometa Drive By ou Team Kill - Punição {FF0000}Prisão\n\n{FFFFFF}Não ofenda Admins/Players - Punição {FF0000}Kick+Mute\n\n{FFFFFF}Não divulgar outros Serve's - Punição {FF0000}Banimento\n\n");
  925.     ShowPlayerDialog(playerid,DIALOG_REGRA,DIALOG_STYLE_MSGBOX,"Regras",str,"Concordo","Discordo");
  926.  
  927.     return 1;
  928. }
  929.  
  930. public OnPlayerDisconnect(playerid, reason)
  931. {
  932.     SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
  933.     SalvarPlayer(playerid);
  934.     Logou[playerid] = false;
  935.     TextDrawHideForPlayer(playerid,Textodraw[playerid][0] );
  936.     TextDrawHideForPlayer(playerid,Textodraw[playerid][1]);
  937.     TextDrawHideForPlayer(playerid,Textodraw[playerid][2]);
  938.     TextDrawHideForPlayer(playerid,NomeServerTxt[0]);
  939.     TextDrawHideForPlayer(playerid,NomeServerTxt[1]);
  940.     if(FoiX1[playerid] == true){
  941.         for(new i = 0;i < GetMaxPlayers();i++){
  942.             if(FoiX1[i] == true){
  943.                 VenceuX1(i,playerid);
  944.             }
  945.        }
  946.     }
  947.     if(PI[playerid][pPreso] > 1){
  948.         KillTimer(Timerr[playerid]);
  949.     }
  950.     return 1;
  951. }  
  952. public OnPlayerSpawn(playerid)
  953. {
  954.     ResetPlayerWeapons(playerid);
  955.     TogglePlayerControllable(playerid,1);
  956.     Cagou[playerid] = false;
  957.     Comecou[playerid] = false;
  958.     ComprouColete[playerid] = false;
  959.     SetPlayerVirtualWorld(playerid,0);
  960.     if(PI[playerid][pPreso] > 0){
  961.         GameTextForPlayer(playerid,"~r~~n~~n~~n~Preso",5000,3);
  962.         SetPlayerInterior(playerid,6);
  963.         SetPlayerPos(playerid,264.7193,77.6862,1001.0391);
  964.         SetPlayerFacingAngle(playerid,266.1212);
  965.         SetCameraBehindPlayer(playerid);
  966.         KillTimer(Timerr[playerid]);
  967.         Timerr[playerid] = SetTimerEx("Prendeu",1000,true,"i",playerid);
  968.     }
  969.     else{
  970.         Aviso(playerid,"Em 5 segundos o jogo começará.");
  971.         SetTimerEx("Comecar",5000,false,"i",playerid);
  972.         SetPlayerInterior(playerid,0);
  973.         switch(PI[playerid][pTime])
  974.         {
  975.             case 1:
  976.             {
  977.                 SetPlayerPos(playerid,-1606.0048,732.9753,-5.2344);
  978.                 SetPlayerFacingAngle(playerid,4.1702);
  979.             }
  980.             case 2:
  981.             {
  982.                 SetPlayerPos(playerid,-1348.6628,492.0019,11.1953);
  983.                 SetPlayerFacingAngle(playerid,1.7673);
  984.             }
  985.             case 3:
  986.             {
  987.                 SetPlayerPos(playerid,-2267.8135,160.3676,35.3056);
  988.                 SetPlayerFacingAngle(playerid,90.6546);
  989.             }
  990.             case 4:
  991.             {
  992.                 SetPlayerPos(playerid,-2658.4312,261.9197,4.6328);
  993.                 SetPlayerFacingAngle(playerid,359.6839);
  994.             }
  995.             case 5:
  996.             {
  997.                 SetPlayerPos(playerid,-2127.1082,238.1429,37.2629);
  998.                 SetPlayerFacingAngle(playerid,271.3542);
  999.             }
  1000.             case 6:
  1001.             {
  1002.                 SetPlayerPos(playerid,-1694.0107,1362.7961,9.8047);
  1003.                 SetPlayerFacingAngle(playerid,224.7694);
  1004.             }
  1005.             case 7:
  1006.             {
  1007.                 SetPlayerPos(playerid,-2184.7234,702.9671,53.8906);
  1008.                 SetPlayerFacingAngle(playerid,267.4818);
  1009.             }
  1010.             case 8:
  1011.             {
  1012.                 SetPlayerPos(playerid,-2567.7373,1221.7560,41.2109);
  1013.                 SetPlayerFacingAngle(playerid,263.1116);
  1014.             }
  1015.             case 9:
  1016.             {
  1017.                 SetPlayerPos(playerid,-2676.2302,-277.5471,7.1737);
  1018.                 SetPlayerFacingAngle(playerid,313.9108);
  1019.             }
  1020.             case 10:
  1021.             {
  1022.                 SetPlayerPos(playerid,-2105.8059,-270.3278,35.3203);
  1023.                 SetPlayerFacingAngle(playerid,9.7480);
  1024.             }
  1025.         }
  1026.     }
  1027.     for(new k = 0;k<10;k++)
  1028.     {
  1029.         if(Dono[k] == 1)
  1030.         {
  1031.             GangZoneShowForPlayer(playerid,GZ[k],COR_COP1);
  1032.         }
  1033.         else if(Dono[k] == 2)
  1034.         {
  1035.             GangZoneShowForPlayer(playerid,GZ[k],COR_EXE1);
  1036.         }
  1037.         else if(Dono[k] == 3)
  1038.         {
  1039.             GangZoneShowForPlayer(playerid,GZ[k],COR_BOZ1);
  1040.         }
  1041.         else if(Dono[k] == 4)
  1042.         {
  1043.             GangZoneShowForPlayer(playerid,GZ[k],COR_FRA1);
  1044.         }
  1045.         else if(Dono[k] == 5)
  1046.         {
  1047.             GangZoneShowForPlayer(playerid,GZ[k],COR_RIF1);
  1048.         }
  1049.         else if(Dono[k] == 6)
  1050.         {
  1051.             GangZoneShowForPlayer(playerid,GZ[k],COR_NAN1);
  1052.         }
  1053.         else if(Dono[k] == 7)
  1054.         {
  1055.             GangZoneShowForPlayer(playerid,GZ[k],COR_TRI1);
  1056.         }
  1057.         else if(Dono[k] == 8)
  1058.         {
  1059.             GangZoneShowForPlayer(playerid,GZ[k],COR_MOT1);
  1060.         }
  1061.         else if(Dono[k] == 9)
  1062.         {
  1063.             GangZoneShowForPlayer(playerid,GZ[k],COR_PLA1);
  1064.         }
  1065.         else if(Dono[k] == 10)
  1066.         {
  1067.             GangZoneShowForPlayer(playerid,GZ[k],COR_MEN1);
  1068.         }
  1069.     }
  1070.     SetCameraBehindPlayer(playerid);
  1071.     SetPlayerHealth(playerid,99999);
  1072.     StopAudioStreamForPlayer(playerid);
  1073.     new str[128];
  1074.     new frag = (PI[playerid][pMatou] - PI[playerid][pMorreu]);
  1075.     if(frag > -1) format(str,sizeof str,"~w~Matou: ~g~~h~%d~n~~w~Morreu: ~r~~h~%d~n~~w~Frag: ~b~~h~%d",PI[playerid][pMatou],PI[playerid][pMorreu],frag);
  1076.     else format(str,sizeof str,"~w~Matou: ~g~~h~%d~n~~w~Morreu: ~r~~h~%d~n~~w~Frag: ~r~~h~%d",PI[playerid][pMatou],PI[playerid][pMorreu],frag);
  1077.     TextDrawSetString(Text:Textodraw[playerid][1],str);
  1078.     TextDrawShowForPlayer(playerid,Textodraw[playerid][1]);
  1079.     return 1;
  1080. }
  1081.  
  1082. public OnPlayerDeath(playerid, killerid, reason)
  1083. {
  1084.     if(killerid != INVALID_PLAYER_ID)
  1085.     {
  1086.         SendDeathMessage(killerid, playerid, reason);
  1087.         if(IsPlayerInAnyVehicle(killerid) && !IsPlayerInAnyVehicle(playerid)){
  1088.             avisou[killerid] ++;
  1089.             new str[128];
  1090.             format(str,sizeof str,"{EE0000}O player %s cometeu Drive By e recebeu um aviso.",Nome(killerid));
  1091.             SendClientMessageToAll(-1,str);
  1092.             if(avisou[killerid] == 2){
  1093.                 format(str,sizeof str,"{EE0000}O player %s foi preso por ter dois avisos.",Nome(killerid));
  1094.                 SendClientMessageToAll(-1,str);
  1095.                 PI[killerid][pPreso] += 30;
  1096.                 avisou[killerid] = 0;
  1097.                 SpawnPlayerEx(killerid);
  1098.                 return true;
  1099.             }
  1100.         }
  1101.         if(FoiX1[killerid] == true && FoiX1[playerid] == true){
  1102.             VenceuX1(killerid,playerid);
  1103.         }
  1104.         else{
  1105.             if(PI[killerid][pTime] != PI[playerid][pTime])
  1106.             {
  1107.                 PI[killerid][pMatou] ++;
  1108.                 PI[playerid][pMorreu] ++;
  1109.                 VerificarArquivo(killerid);
  1110.                 GivePlayerMoneyEx(killerid,1000);
  1111.                 GivePlayerMoneyEx(playerid,-200);
  1112.                 SetPlayerScore(killerid,PI[killerid][pMatou]);
  1113.                 GameTextForPlayer(playerid,"~r~~n~~n~~n~Olha quem te matou!!",6000,5);
  1114.                 new str[128];
  1115.                 new frag = (PI[killerid][pMatou] - PI[killerid][pMorreu]);
  1116.                 if(frag > 0) format(str,sizeof str,"~w~Matou: ~g~%d~n~~w~Morreu: ~r~%d~n~~w~Frag: ~b~%d",PI[killerid][pMatou],PI[killerid][pMorreu],frag);
  1117.                 else format(str,sizeof str,"~w~Matou: ~g~%d~n~~w~Morreu: ~r~%d~n~~w~Frag: ~r~%d",PI[killerid][pMatou],PI[killerid][pMorreu],frag);
  1118.                 TextDrawSetString(Text:Textodraw[killerid][1],str);
  1119.                 TextDrawShowForPlayer(killerid,Textodraw[killerid][1]);
  1120.                 Matou[killerid] ++;
  1121.                 OnWeaponDrop(playerid);
  1122.                
  1123. //===============================================================================================================================
  1124.                 if(Matou[killerid] == 5){
  1125.                     format(str,sizeof str,"{EE0000}O player %s está ingressando na carreira do crime. Já matou %d players.",Nome(killerid),Matou[killerid]);
  1126.                     SendClientMessageToAll(-1,str);
  1127.                 }
  1128.                 else if(Matou[killerid] == 10){
  1129.                     format(str,sizeof str,"{EE0000}O player %s está tomando gosto pela coisa. Já mandou %d players pra cova.",Nome(killerid),Matou[killerid]);
  1130.                     SendClientMessageToAll(-1,str);
  1131.                 }
  1132.                 else if(Matou[killerid] == 15){
  1133.                     format(str,sizeof str,"{EE0000}Estou começando a ficar com medo do %s. Já matou %d players.",Nome(killerid),Matou[killerid]);
  1134.                     SendClientMessageToAll(-1,str);
  1135.                 }
  1136.                 else if(Matou[killerid] == 20){
  1137.                     format(str,sizeof str,"{EE0000}Ninguem segura o %s ta deitando todo mundo. Já matou %d players.",Nome(killerid),Matou[killerid]);
  1138.                     SendClientMessageToAll(-1,str);
  1139.                 }
  1140.                 else if(Matou[killerid] == 30){
  1141.                     format(str,sizeof str,"{EE0000}Manda alguem parar o %s, daqui a pouco vai matar o server inteiro. Já matou %d players.",Nome(killerid),Matou[killerid]);
  1142.                     SendClientMessageToAll(-1,str);
  1143.                 }
  1144.                 else if(Matou[killerid] == 40){
  1145.                     format(str,sizeof str,"{EE0000}Chama a mamãe que o %s ta matando todo mundo. Já matou %d players.",Nome(killerid),Matou[killerid]);
  1146.                     SendClientMessageToAll(-1,str);
  1147.                 }
  1148.                 else if(Matou[killerid] == 50){
  1149.                     format(str,sizeof str,"{EE0000}O player %s me fez borrar o disco rigido. Já matou %d players.",Nome(killerid),Matou[killerid]);
  1150.                     SendClientMessageToAll(-1,str);
  1151.                 }
  1152.                 else if(Matou[killerid] == 75){
  1153.                     format(str,sizeof str,"{EE0000}O player %s só pode estar usando Cheater. Já mandou %d pra cova.",Nome(killerid),Matou[killerid]);
  1154.                     SendClientMessageToAll(-1,str);
  1155.                 }
  1156.                 else if(Matou[killerid] == 90){
  1157.                     format(str,sizeof str,"{EE0000}Ah não dá, %s ja matou %d players, vou embora jogar tibia! ",Nome(killerid),Matou[killerid]);
  1158.                     SendClientMessageToAll(-1,str);
  1159.                 }
  1160.                 else if(Matou[killerid] == 100){
  1161.                     format(str,sizeof str,"{EE0000}Esse %s só pode ser discipulo do Chuck Norris. %d players já provaram de sua fúria.",Nome(killerid),Matou[killerid]);
  1162.                     SendClientMessageToAll(-1,str);
  1163.                 }
  1164. //===============================================================================================================================
  1165.                
  1166.                 if(IsPlayerInAnyVehicle(killerid)){
  1167.                     TogglePlayerSpectating(playerid, 1);
  1168.                     PlayerSpectateVehicle(playerid, GetPlayerVehicleID(killerid), SPECTATE_MODE_NORMAL);
  1169.                 }
  1170.                 else{
  1171.                     TogglePlayerSpectating(playerid, 1);
  1172.                     PlayerSpectatePlayer(playerid, killerid);
  1173.                 }
  1174.                 SetTimerEx("Pararespiar",5000,false,"d",playerid);
  1175.             }
  1176.             else if(PI[killerid][pTime] == PI[playerid][pTime]){
  1177.                 avisou[killerid] ++;
  1178.                 new str[128];
  1179.                 format(str,sizeof str,"{EE0000}O player %s cometeu Team Kill e recebeu um aviso.",Nome(killerid));
  1180.                 SendClientMessageToAll(-1,str);
  1181.                 if(avisou[killerid] == 2){
  1182.                     format(str,sizeof str,"{EE0000}O player %s foi preso por ter dois avisos.",Nome(killerid));
  1183.                     SendClientMessageToAll(-1,str);
  1184.                     PI[killerid][pPreso] += 30;
  1185.                     avisou[killerid] = 0;
  1186.                     SpawnPlayerEx(killerid);
  1187.                 }
  1188.             }
  1189.         }
  1190.     }
  1191.     return 1;
  1192. }
  1193.  
  1194. public OnVehicleSpawn(vehicleid)
  1195. {
  1196.     return 1;
  1197. }
  1198.  
  1199. public OnVehicleDeath(vehicleid, killerid)
  1200. {
  1201.     return 1;
  1202. }
  1203.  
  1204. public OnPlayerText(playerid, text[])
  1205. {
  1206.     if(Logou[playerid] == false) return Aviso(playerid,"Você não pode falar, pois não está logado.");
  1207.     if(PI[playerid][pCalado] > gettime()){
  1208.         new str[128];
  1209.         format(str,sizeof str,"Você ainda vai ficar calado por mais %d segundos.",PI[playerid][pCalado] - gettime());
  1210.         Aviso(playerid,str);
  1211.         return 0;
  1212.     }
  1213.     else PI[playerid][pCalado] = 0;
  1214.     if(strlen(text) == strlen(Ftexto[playerid]) && !strcmp(Ftexto[playerid], text,  false))
  1215.     {
  1216.         SendClientMessage(playerid, -1, "{FF0000}[ERRO]{FFFFFF} Não repita a mesma mensagem!");
  1217.         format(Ftexto[playerid], 128, "%s", text);
  1218.         return 0;
  1219.     }
  1220.     return 1;
  1221. }
  1222. public OnRconCommand(cmd[])
  1223. {
  1224.     return 0;
  1225. }
  1226. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1227. {
  1228.     return 1;
  1229. }
  1230.  
  1231. public OnPlayerExitVehicle(playerid, vehicleid)
  1232. {
  1233.     return 1;
  1234. }
  1235.  
  1236. public OnPlayerRequestSpawn(playerid)
  1237. {
  1238.     if(Logou[playerid] == true)
  1239.     {
  1240.         SpawnPlayerEx(playerid);
  1241.     }
  1242.     else return true;
  1243.     return 1;
  1244. }
  1245. public OnPlayerPickUpPickup(playerid, pickupid)
  1246. {
  1247.     OnWeaponDropPickup(playerid, pickupid);
  1248.     return 1;
  1249. }
  1250. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1251. {
  1252.     if(newkeys & KEY_YES)
  1253.     {
  1254.         if(Comecou[playerid] == true){
  1255.             if(!IsPlayerInAnyVehicle(playerid))
  1256.             {
  1257.                 if(PI[playerid][pDolar] > 999)
  1258.                 {
  1259.                     if(Cagou[playerid] == false)
  1260.                     {
  1261.                         GivePlayerMoneyEx(playerid,-1000);
  1262.                         new Float:x,Float:y,Float:z;
  1263.                         GetPlayerPos(playerid,x,y,z);
  1264.                         CreateObject(1225,x+0.5,y,z-0.55,0.00000000,0.00000000,0.00000000);
  1265.                         GameTextForPlayer(playerid,"~p~~n~~n~~n~Voce cagou um barril",5000,5);
  1266.                         if(PI[playerid][pAdmin] < 1)
  1267.                         {
  1268.                             Cagou[playerid] = true;
  1269.                         }
  1270.                         return true;
  1271.                     }
  1272.                     else return GameTextForPlayer(playerid,"~r~~n~~n~Cagaooo~n~voce ja cagou, so poderas cagar denovo assim que nascer novamente.",5000,5);
  1273.                 }
  1274.             }
  1275.             else if(IsPlayerInAnyVehicle(playerid))
  1276.             {
  1277.                 if(PI[playerid][pDolar] > 999)
  1278.                 {
  1279.                     if(Cagou[playerid] == false)
  1280.                     {
  1281.                         GivePlayerMoneyEx(playerid,-1000);
  1282.                         new Float:x,Float:y,Float:z;
  1283.                         GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
  1284.                         GetXYInFrontOfVehicle(GetPlayerVehicleID(playerid), x, y, -5.0);
  1285.                         CreateObject(1225,x,y,z-0.25,0.00000000,0.00000000,0.00000000);
  1286.                         GameTextForPlayer(playerid,"~p~~n~~n~~n~Voce cagou um barril CARRO",5000,5);
  1287.                         if(PI[playerid][pAdmin] < 1)
  1288.                         {
  1289.                             Cagou[playerid] = true;
  1290.                         }
  1291.                         return true;
  1292.                     }
  1293.                     else return GameTextForPlayer(playerid,"~r~~n~~n~Cagaooo~n~voce ja cagou, so poderas cagar denovo assim que nascer novamente.",5000,5);
  1294.                 }
  1295.             }
  1296.         }
  1297.     }
  1298.     if (HOLDING( KEY_FIRE )){
  1299.         if(IsPlayerInAnyVehicle(playerid)) return AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  1300.     }
  1301.     else{
  1302.         RemoveVehicleComponent(GetPlayerVehicleID(playerid),1010);
  1303.     }
  1304.     if (HOLDING( KEY_NO )){
  1305.         if(IsPlayerConnected(playerid)){
  1306.             new str1[350];
  1307.             new str2[350];
  1308.             new str3[350];
  1309.             new str4[150];
  1310.             new str5[1024];
  1311.             new arq[24];
  1312.             format(arq,sizeof arq,"MortesFix.ini");
  1313.             TextDrawShowForPlayer(playerid,Ranking[0]);
  1314.             format(str1,sizeof str1,"~n~Posicao 1: Player %s - Matou %dx~n~~n~Posicao 2: Player %s - Matou %dx~n~~n~Posicao 3: Player %s - Matou %dx~n~",DOF2_GetString(arq,"Nome1"),DOF2_GetInt(arq,"Rank1"),DOF2_GetString(arq,"Nome2"),DOF2_GetInt(arq,"Rank2"),DOF2_GetString(arq,"Nome3"),DOF2_GetInt(arq,"Rank3"));
  1315.             format(str2,sizeof str2,"~n~Posicao 4: Player %s - Matou %dx~n~~n~Posicao 5: Player %s - Matou %dx~n~~n~Posicao 6: Player %s - Matou %dx~n~",DOF2_GetString(arq,"Nome4"),DOF2_GetInt(arq,"Rank4"),DOF2_GetString(arq,"Nome5"),DOF2_GetInt(arq,"Rank5"),DOF2_GetString(arq,"Nome6"),DOF2_GetInt(arq,"Rank6"));
  1316.             format(str3,sizeof str3,"~n~Posicao 7: Player %s - Matou %dx~n~~n~Posicao 8: Player %s - Matou %dx~n~~n~Posicao 9: Player %s - Matou %dx~n~",DOF2_GetString(arq,"Nome7"),DOF2_GetInt(arq,"Rank7"),DOF2_GetString(arq,"Nome8"),DOF2_GetInt(arq,"Rank8"),DOF2_GetString(arq,"Nome9"),DOF2_GetInt(arq,"Rank9"));
  1317.             format(str4,sizeof str4,"~n~Posicao 10: Player %s - Matou %dx",DOF2_GetString(arq,"Nome10"),DOF2_GetInt(arq,"Rank10"));
  1318.             strcat(str5,str1);
  1319.             strcat(str5,str2);
  1320.             strcat(str5,str3);
  1321.             strcat(str5,str4);
  1322.             TextDrawSetString(Text:Ranking[1],str5);
  1323.             TextDrawShowForPlayer(playerid,Ranking[1]);
  1324.         }
  1325.     }
  1326.     else{
  1327.         TextDrawHideForPlayer(playerid,Ranking[0]);
  1328.         TextDrawHideForPlayer(playerid,Ranking[1]);
  1329.     }
  1330.     return 1;
  1331. }
  1332. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1333. {
  1334.     switch(dialogid)
  1335.     {
  1336.         case DIALOG_REGISTRO:
  1337.         {
  1338.             if(!response)
  1339.                 Kick(playerid);
  1340.             else
  1341.             {
  1342.                 if(strlen(inputtext) < 5 || strlen(inputtext) > 20) return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "{E066FF}Registro", "{EE0000}[Erro]{FFFFFF}Digite uma senha para se registrar.\n\n{FF0000}<!>A senha deve conter entre 5 e 20 caracteres.", "Registrar", "Sair");
  1343.                 else
  1344.                 {
  1345.                     DOF2_CreateFile(Contas(playerid));
  1346.                     DOF2_SetInt(Contas(playerid),"Senha",udb_hash(inputtext));
  1347.                     DOF2_SetInt(Contas(playerid),"Matou",PI[playerid][pMatou]);
  1348.                     DOF2_SetInt(Contas(playerid),"Morreu",PI[playerid][pMorreu]);
  1349.                     DOF2_SetInt(Contas(playerid),"Dolar",5000);
  1350.                     DOF2_SaveFile();
  1351.                     new string[200];
  1352.                     new IP[17];
  1353.                     GetPlayerIp(playerid,IP,sizeof IP);
  1354.                     format(string,sizeof(string),"{FFFFFF}Bem vindo ao {E066FF}%s\n\n\n\n\n{E066FF}Conta: {FFFFFF}%s.\n\n{E066FF}Status: {00EE00}Registrado\n\n{E066FF}IP: {FFFFFF}%s",NomeServer,Nome(playerid),IP);
  1355.                     ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{E066FF}Login",string,"Logar","Sair");
  1356.                 }
  1357.             }
  1358.         }
  1359.         case DIALOG_LOGIN:
  1360.         {
  1361.             if(!response)
  1362.                 Kick(playerid);
  1363.  
  1364.             else
  1365.             {
  1366.                 if(strlen(inputtext) < 5 || strlen(inputtext) > 20) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{E066FF}Login", "{EE0000}[Erro] {FFFFFF}Digite uma senha para logar.\n\n{FF0000}<!>A senha deve conter entre 5 e 20 caracteres.", "Logar", "Sair");
  1367.                 else
  1368.                 {
  1369.                     if(DOF2_GetInt(Contas(playerid),"Senha") == udb_hash(inputtext))
  1370.                     {
  1371.                         TextDrawHideForPlayer(playerid,ImagemEntrada);
  1372.                         Errou[playerid] = 0;
  1373.                         CarregarPlayer(playerid);
  1374.                         Logou[playerid] = true;
  1375.                         OnPlayerRequestClass(playerid,0);
  1376.                     }
  1377.                     else
  1378.                     {
  1379.                         Errou[playerid] ++;
  1380.                         new string[128];
  1381.                         format(string,sizeof string,"{FFFFFF}Você já errou a senha {EE0000}%d {FFFFFF}veze(s). Se errar 3 vezes serás kickado.",Errou[playerid]);
  1382.                         Aviso(playerid,string);
  1383.                         if(Errou[playerid] >= 3)
  1384.                         {
  1385.                             Kick(playerid);
  1386.                         }  
  1387.                         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{E066FF}Login", "{EE0000}[Erro] {FFFFFF}Digite uma senha para logar.\n\n{FF0000}<!>Senha incorreta.", "Logar", "Sair");
  1388.                     }
  1389.                 }              
  1390.             }
  1391.         }
  1392.         case DIALOG_PM:
  1393.         {
  1394.             if(!response){
  1395.                 Aviso(playerid,"Você cancelou o enviou de mensagem privado.");
  1396.             }
  1397.             else{
  1398.                 new string[128];
  1399.                 format(string,sizeof string,"{FFD700}[%s ID:%d] diz: %s",Nome(playerid),playerid,inputtext);
  1400.                 SendClientMessage(EnviarPM[playerid],-1,string);
  1401.                 format(string,sizeof string,"{FFD700}Você enviou uma mensagem ao player %s",Nome(EnviarPM[playerid]));
  1402.                 SendClientMessage(playerid,-1,string);
  1403.                 PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
  1404.                 PlayerPlaySound(EnviarPM[playerid],1054,0.0,0.0,0.0);
  1405.                 EnviarPM[playerid] = 999;
  1406.             }
  1407.         }
  1408.         case DIALOG_REGRA:
  1409.         {
  1410.             if(!response){
  1411.                 Kick(playerid);
  1412.             }
  1413.             else{
  1414.                 if(!DOF2_FileExists(Contas(playerid)))
  1415.                 {
  1416.                     new string[200];
  1417.                     new IP[17];
  1418.                     GetPlayerIp(playerid,IP,sizeof IP);
  1419.                     format(string,sizeof(string),"{FFFFFF}Bem vindo ao {E066FF}%s\n\n\n\n\n{E066FF}Conta: {FFFFFF}%s.\n\n{E066FF}Status: {EE0000}Não Registrada\n\n{E066FF}IP: {FFFFFF}%s",NomeServer,Nome(playerid),IP);
  1420.                     ShowPlayerDialog(playerid,DIALOG_REGISTRO,DIALOG_STYLE_PASSWORD,"{E066FF}Registro",string,"Registrar","Sair");
  1421.                 }
  1422.                 else
  1423.                 {
  1424.                     new string[200];
  1425.                     new IP[17];
  1426.                     GetPlayerIp(playerid,IP,sizeof IP);
  1427.                     format(string,sizeof(string),"{FFFFFF}Bem vindo ao {E066FF}%s\n\n\n\n\n{E066FF}Conta: {FFFFFF}%s.\n\n{E066FF}Status: {00EE00}Registrado\n\n{E066FF}IP: {FFFFFF}%s",NomeServer,Nome(playerid),IP);
  1428.                     ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{E066FF}Login",string,"Logar","Sair");
  1429.                 }
  1430.             }
  1431.         }
  1432.     }
  1433.     return 1;
  1434. }
  1435.  
  1436. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1437. {
  1438.     if(clickedplayerid != INVALID_PLAYER_ID)
  1439.     {
  1440.         new string[128];
  1441.         format(string,sizeof string,"{FFA500}Deseja enviar uma mensagem privada ao player {FF8C00}%s {FFA500}ID: {FF8C00}%d?\n{FFA500}Caso queira digite abaixo a mensagem.",Nome(clickedplayerid),clickedplayerid);
  1442.         ShowPlayerDialog(playerid,DIALOG_PM,DIALOG_STYLE_INPUT,"Mensagem Privada",string,"Enviar","Cancelar");
  1443.         EnviarPM[playerid] = clickedplayerid;
  1444.     }
  1445.     return 1;
  1446. }
  1447. //=============================================COMANDOS===============================================
  1448. CMD:gmx(playerid)
  1449. {
  1450.     if(PI[playerid][pAdmin] < 3) return Aviso(playerid,"Sem autorização.");
  1451.     SendRconCommand("gmx");
  1452.     return 1;
  1453. }
  1454. CMD:vital(playerid){
  1455.     Vital();
  1456. }
  1457. CMD:credito(playerid){//NAO SEJA NOOB....NAO RETIRE OS CREDITOSSSSS
  1458.     if(IsPlayerConnected(playerid)){
  1459.         ShowPlayerDialog(playerid,3212,0,"Server Info","{FFFFFF}Criadores/Colaboradores para a criação do MIB TDM v1.0\n\n\n{FF6666}Donos: {FFFFFF}Yiakin_Ruffles,Fuca_Ruffles,Etton_Ruffles\n\n{FF6666}Scripter/Idealizador: {FFFFFF}Yiakin_Ruffles\n\n{FF6666}Sistema de Weapon Drop: {FFFFFF}Jeffry\n\n{FF6666}AntiCheater Base: {FFFFFF}Garfield","Sair","");
  1460.     }
  1461.     return true;
  1462. }
  1463. CMD:creditos(playerid){//NAO SEJA NOOB....NAO RETIRE OS CREDITOSSSSS
  1464.     if(IsPlayerConnected(playerid)){
  1465.         ShowPlayerDialog(playerid,3212,0,"Server Info","{FFFFFF}Criadores/Colaboradores para a criação do MIB TDM v1.0\n\n\n{FF6666}Donos: {FFFFFF}Yiakin_Ruffles,Fuca_Ruffles,Etton_Ruffles\n\n{FF6666}Scripter/Idealizador: {FFFFFF}Yiakin_Ruffles\n\n{FF6666}Sistema de Weapon Drop: {FFFFFF}Jeffry\n\n{FF6666}AntiCheater Base: {FFFFFF}Garfield","Sair","");
  1466.     }
  1467.     return true;
  1468. }
  1469. CMD:desbug(playerid){
  1470.     Vital();
  1471. }
  1472. CMD:serverinfo(playerid){//NAO SEJA NOOB....NAO RETIRE OS CREDITOSSSSS
  1473.     if(IsPlayerConnected(playerid)){
  1474.         ShowPlayerDialog(playerid,3212,0,"Server Info","{FFFFFF}Criadores/Colaboradores para a criação do MIB TDM v1.0\n\n\n{FF6666}Donos: {FFFFFF}Yiakin_Ruffles,Fuca_Ruffles,Etton_Ruffles\n\n{FF6666}Scripter/Idealizador: {FFFFFF}Yiakin_Ruffles\n\n{FF6666}Sistema de Weapon Drop: {FFFFFF}Jeffry\n\n{FF6666}AntiCheater Base: {FFFFFF}Garfield","Sair","");
  1475.     }
  1476.     return true;
  1477. }
  1478. CMD:rank(playerid)
  1479. {
  1480.     if(IsPlayerConnected(playerid)){
  1481.         Aviso(playerid,"Para ver o ranking pressione a tecla  {FF0000}'N'");
  1482.     }
  1483.     return true;
  1484. }
  1485. CMD:id(playerid,params[])
  1486. {
  1487.     if(IsPlayerConnected(playerid)){
  1488.         if(sscanf(params,"u",id)) return Aviso(playerid,"USE: /id [Nickplayer]");
  1489.         if(IsPlayerConnected(id))
  1490.         {
  1491.             new str[78];
  1492.             format(str,sizeof str,"Player: %s [ID: %d]",Nome(id),id);
  1493.             Informe(playerid,str);
  1494.         }
  1495.     }
  1496.     return true;
  1497. }
  1498. CMD:relatorio(playerid,params[])
  1499. {
  1500.     if(IsPlayerConnected(playerid))
  1501.     {
  1502.         if(anflood[playerid] > gettime()) return Aviso(playerid,"[ANTI-FLOOD]Aguarde para poder enviar outro relatório");
  1503.         new texto[128];
  1504.         new str[128];
  1505.         if(sscanf(params,"s[128]",texto)) return Aviso(playerid,"USE: /relatorio [texto]");
  1506.         anflood[playerid] = gettime()+5;
  1507.         SendClientMessage(playerid,-1,"Relatório enviado...");
  1508.         format(str,sizeof str,"{00FFFF}[%s][ID:%d]: %s",playerid,Nome(playerid),texto);
  1509.         for(new i = 0;i < GetMaxPlayers();i++)
  1510.         {
  1511.             if(PI[i][pAdmin] > 0)
  1512.             {
  1513.                 SendClientMessage(i,-1,str);
  1514.                 PlayerPlaySound(i,1054,0.0,0.0,0.0);
  1515.             }
  1516.         }
  1517.     }
  1518.     return 1;
  1519. }
  1520. CMD:relato(playerid,params[])
  1521. {
  1522.     if(IsPlayerConnected(playerid))
  1523.     {
  1524.         if(anflood[playerid] > gettime()) return Aviso(playerid,"[ANTI-FLOOD]Aguarde para poder enviar outro relatório");
  1525.         new texto[128];
  1526.         new str[128];
  1527.         if(sscanf(params,"s[128]",texto)) return Aviso(playerid,"USE: /relatorio [texto]");
  1528.         anflood[playerid] = gettime()+5;
  1529.         SendClientMessage(playerid,-1,"Relatório enviado...");
  1530.         format(str,sizeof str,"{00FFFF}[%s][ID:%d]: %s",playerid,Nome(playerid),texto);
  1531.         for(new i = 0;i < GetMaxPlayers();i++)
  1532.         {
  1533.             if(PI[i][pAdmin] > 0)
  1534.             {
  1535.                 SendClientMessage(i,-1,str);
  1536.                 PlayerPlaySound(i,1054,0.0,0.0,0.0);
  1537.             }
  1538.         }
  1539.     }
  1540.     return 1;
  1541. }
  1542. CMD:nrg(playerid){
  1543.     new pname[MAX_PLAYER_NAME];
  1544.     SetPlayerInterior(playerid,0);
  1545.     SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
  1546.     GetPlayerName(playerid, pname, sizeof (pname));
  1547.     UsouComando(playerid,"nrg");
  1548.     return 1;
  1549. }
  1550. CMD:colete(playerid)
  1551. {
  1552.     if(ComprouColete[playerid] == false){
  1553.         if(PI[playerid][pDolar] > 1000){
  1554.             GivePlayerMoneyEx(playerid,-1000);
  1555.             SetPlayerArmour(playerid,100);
  1556.             Informe(playerid,"Você comprou colete por $: 1000");
  1557.             if(PI[playerid][pAdmin] < 3){
  1558.                 ComprouColete[playerid] = true;
  1559.                 UsouComando(playerid,"colete");
  1560.             }
  1561.             return true;
  1562.         }
  1563.         else return GameTextForPlayer(playerid,"~n~~n~~n~~r~Sem dinheiro!",5000,5);
  1564.     }
  1565.     else return Aviso(playerid,"Você já comprou um colete.");
  1566. }
  1567. CMD:skin(playerid,params[])
  1568. {
  1569.     if(PI[playerid][pAdmin] < 3) return Aviso(playerid,"Sem autorização.");
  1570.     if(sscanf(params,"i",ii)) return Aviso(playerid,"USE:/skin [Nº skin]");
  1571.     if(IsValidSkin(ii))
  1572.     {
  1573.         SetPlayerSkin(playerid,ii);
  1574.         return Informe(playerid,"Skin atualizada com sucesso");
  1575.     }
  1576.     else return Aviso(playerid,"[ERROR]Escolha a skin entre 0 e 299.");
  1577. }
  1578. CMD:dararma(playerid,params[])
  1579. {
  1580.     if(PI[playerid][pAdmin] < 2) return Aviso(playerid,"Sem autorização.");
  1581.     if(sscanf(params,"ud",id,ii)) return Aviso(playerid,"USE:/arma [playerid][ID Arma]");
  1582.     new str[128];
  1583.     format(str,sizeof str,"{00FFFF}O admin %s deu uma arma ao player %s",Nome(playerid),Nome(id));
  1584.     SendClientMessageToAll(-1,str);
  1585.     GivePlayerWeapon(id,ii,999);
  1586.     return true;
  1587. }
  1588. CMD:pagar(playerid,params[])
  1589. {
  1590.     if(sscanf(params,"ud",id,ii)) return Aviso(playerid,"USE:/arma [playerid][quantia]");
  1591.     if(PI[playerid][pDolar] < ii) return Aviso(playerid,"Sem dinheiro");
  1592.     if(id == INVALID_PLAYER_ID) return Aviso(playerid,"Player não encontrado");
  1593.     GivePlayerMoneyEx(id,ii);
  1594.     GivePlayerMoneyEx(playerid,-ii);
  1595.     new str[128];
  1596.     format(str,sizeof str,"{FFFFFF}O player {00FFFF}%s {FFFFFF}pagou {00FFFF}$ %d {FFFFFF}para o player {00FFFF}%s",Nome(playerid),ii,Nome(id));
  1597.     SendClientMessageToAll(-1,str);
  1598.     return true;
  1599. }
  1600. CMD:mibgames(playerid)
  1601. {
  1602.     if(IsPlayerConnected(playerid)){
  1603.         ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Made In Brazil Games","{FFFFFF}Com vontade de jogar um server RPG?\n\nNão há opção melhor do que o Made In Brazil LS RPG.\nGame Mode único, com sistemas diferenciados e administradores atenciosos...\n\nEntão não perca tempo {EE0000}MIB RPG IP: 69.195.128.54:7777\n\n{FFFFFF}E claro {EE0000}MIB TDM IP: 69.195.128.54:7778\n\n\t{FFFFFF}Mais informações acesse: {00EE00}forum.mib-samp.com.","Sair","");
  1604.     }
  1605.     return true;
  1606. }
  1607. CMD:rs(playerid){
  1608.     Vital();
  1609. }
  1610. CMD:comandos(playerid)
  1611. {
  1612.     if(IsPlayerConnected(playerid)){
  1613.         new str4[500];
  1614.         format(str4,sizeof str4,"\n{9932CC}Teleportes:\n {FFFFFF}/aero - /nrg - /minirampa - /arena - /x1 - /sf\n\n{9932CC}Comandos Utéis:\n{FFFFFF}/mibgames - /colete - /kit - /pm - /relatorio - /admins - /status - /rank\n\n{9932CC}Dicas:\n{FFFFFF}Apertando {9932CC}Y {FFFFFF}você pode criar um barril explosivo por $ 1000\n{FFFFFF}Apertando {9932CC}N {FFFFFF}você pode ver o ranking de mortes do servidor\n{FFFFFF}Apertando {9932CC}ALT {FFFFFF}você ganhará nitro permanente.");
  1615.         ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Ajuda",str4,"Sair","");
  1616.     }
  1617.     return true;
  1618. }
  1619. CMD:ajuda(playerid)
  1620. {
  1621.     if(IsPlayerConnected(playerid)){
  1622.         new str4[500];
  1623.         format(str4,sizeof str4,"\n{9932CC}Teleportes:\n {FFFFFF}/aero - /minirampa - /arena - /x1 - /sf\n\n{9932CC}Comandos Utéis:\n{FFFFFF}/mibgames - /colete - /kit - /pm - /relatorio - /admins - /status - /rank\n\n{9932CC}Dicas:\n{FFFFFF}Apertando {9932CC}Y {FFFFFF}você pode criar um barril explosivo por $ 1000\n{FFFFFF}Apertando {9932CC}N {FFFFFF}você pode ver o ranking de mortes do servidor\n{FFFFFF}Apertando {9932CC}ALT {FFFFFF}você ganhará nitro permanente.");
  1624.         ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Ajuda",str4,"Sair","");
  1625.     }
  1626.     return true;
  1627. }
  1628. CMD:stats(playerid)
  1629. {
  1630.     if(IsPlayerConnected(playerid)){
  1631.         new str4[500];
  1632.         format(str4,sizeof str4,"{00FFFF}Status {FFFFFF}%s\n\n\n{00FFFF}Matou: {FFFFFF}%d\n\n{00FFFF}Morreu: {FFFFFF}%d\n\n{00FFFF}Frag: {FFFFFF}%d\n\n{00FFFF}Matou X1: {FFFFFF}%d\n\n{00FFFF}Morreu X1: {FFFFFF}%d\n\n{00FFFF}Dolar: {FFFFFF}%d",Nome(playerid),PI[playerid][pMatou],PI[playerid][pMorreu],PI[playerid][pMatou]-PI[playerid][pMorreu],PI[playerid][pMatouX1],PI[playerid][pMorreuX1],PI[playerid][pDolar]);
  1633.         ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Status",str4,"Sair","");
  1634.     }
  1635.     return true;
  1636. }
  1637. CMD:status(playerid)
  1638. {
  1639.     if(IsPlayerConnected(playerid)){
  1640.         new str4[500];
  1641.         format(str4,sizeof str4,"{00FFFF}Status {FFFFFF}%s\n\n\n{00FFFF}Matou: {FFFFFF}%d\n\n{00FFFF}Morreu: {FFFFFF}%d\n\n{00FFFF}Frag: {FFFFFF}%d\n\n{00FFFF}Matou X1: {FFFFFF}%d\n\n{00FFFF}Morreu X1: {FFFFFF}%d\n\n{00FFFF}Dolar: {FFFFFF}%d",Nome(playerid),PI[playerid][pMatou],PI[playerid][pMorreu],PI[playerid][pMatou]-PI[playerid][pMorreu],PI[playerid][pMatouX1],PI[playerid][pMorreuX1],PI[playerid][pDolar]);
  1642.         ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Status",str4,"Sair","");
  1643.     }
  1644.     return true;
  1645. }
  1646. CMD:aa(playerid)
  1647. {
  1648.     if(IsPlayerConnected(playerid)){
  1649.         new str[150];
  1650.         new str2[128];
  1651.         new str3[128];
  1652.         new str4[500];
  1653.         if(PI[playerid][pAdmin] == 1){
  1654.             format(str,sizeof str,"{FFA07A}Comandos Moderador\n{FFFFFF}/espiar - /pararespiar - /a - /desmutar - /mutar - /ir\n{FFFFFF}/trazer - /tapa - /ban - /kick - /prender");
  1655.         }
  1656.         else if(PI[playerid][pAdmin] == 2){
  1657.             format(str,sizeof str,"{FFA07A}Comandos Moderador\n{FFFFFF}/espiar - /pararespiar - /a - /desmutar - /mutar - /ir\n{FFFFFF}/trazer - /tapa - /ban - /kick - /prender");
  1658.             format(str2,sizeof str2,"\n\n{FF4500}Comandos Administrador\n{FFFFFF}/dararma - /explodir - /desban - /dolar");
  1659.         }
  1660.         else if(PI[playerid][pAdmin] == 3){
  1661.             format(str,sizeof str,"{FFA07A}Comandos Moderador\n{FFFFFF}/espiar - /pararespiar - /a - /desmutar - /mutar - /ir\n{FFFFFF}/trazer - /tapa - /ban - /kick - /prender");
  1662.             format(str2,sizeof str2,"\n\n{FF4500}Comandos Administrador\n{FFFFFF}/dararma - /explodir - /desban - /dolar - /aviso");
  1663.             format(str3,sizeof str3,"\n\n{EE0000}Comandos Dono\n{FFFFFF}/gmx - /skin - /veh - /fixveh - /daradmin");
  1664.         }
  1665.         else{
  1666.              return Aviso(playerid,"Sem permissão.");
  1667.         }
  1668.         format(str4,sizeof str4,"%s%s%s",str,str2,str3);
  1669.         ShowPlayerDialog(playerid,999,DIALOG_STYLE_MSGBOX,"Comandos",str4,"Sair","");
  1670.     }
  1671.     return true;
  1672. }
  1673. CMD:pararespiar(playerid)
  1674. {
  1675.     if(PI[playerid][pAdmin] > 0){
  1676.         TogglePlayerSpectating(playerid, 0);
  1677.         SpawnPlayerEx(playerid);
  1678.     }
  1679.     else{
  1680.         Aviso(playerid,"Sem permissão.");
  1681.     }
  1682.     return true;
  1683. }
  1684. CMD:uou(playerid){
  1685.     Vital();
  1686. }
  1687. CMD:espiar(playerid,params[])
  1688. {
  1689.     if(IsPlayerConnected(playerid)){
  1690.         if(PI[playerid][pAdmin] > 0){
  1691.             if(sscanf(params,"u",id)) return Aviso(playerid,"USE: /espiar [playerid]");
  1692.             if(id == playerid) return Aviso(playerid,"Você não pode espiar a si próprio.");
  1693.             if(IsPlayerConnected(id)){
  1694.                 new str[128];
  1695.                 if(IsPlayerInAnyVehicle(id)){
  1696.                     format(str,sizeof str,"Você está espiando o player %s. (/pararespiar)",Nome(id));
  1697.                     Informe(playerid,str);
  1698.                     SetPlayerInterior(playerid,GetPlayerInterior(id));
  1699.                     SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  1700.                     TogglePlayerSpectating(playerid, 1);
  1701.                     PlayerSpectateVehicle(playerid, GetPlayerVehicleID(id), SPECTATE_MODE_NORMAL);
  1702.                 }
  1703.                 else{
  1704.                     format(str,sizeof str,"Você está espiando o player %s",Nome(id));
  1705.                     Informe(playerid,str);
  1706.                     SetPlayerInterior(playerid,GetPlayerInterior(id));
  1707.                     SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  1708.                     TogglePlayerSpectating(playerid, 1);
  1709.                     PlayerSpectatePlayer(playerid, id);
  1710.                 }
  1711.             }
  1712.             else return Aviso(playerid,"Player não encontrado.");
  1713.         }
  1714.         else return Aviso(playerid,"Sem permissão.");
  1715.     }
  1716.     return true;
  1717. }
  1718. CMD:x1(playerid)
  1719. {
  1720.     if(IsPlayerConnected(playerid)){
  1721.         if(FoiX1[playerid] == true) return Aviso(playerid,"Você já esta no x1, aguarde seu adversário entrar.");
  1722.         if(xx1 == 0){
  1723.             SetPlayerPos(playerid,-1382.2594,-499.7868,32.0100);
  1724.             SetPlayerFacingAngle(playerid,297.9940);
  1725.             SetCameraBehindPlayer(playerid);
  1726.             TogglePlayerControllable(playerid,0);
  1727.             UsouComando(playerid,"x1");
  1728.             FoiX1[playerid] = true;
  1729.             xx1 ++;
  1730.             Tx1 = SetTimerEx("EsperandoComecar",1000*60,false,"i",playerid);
  1731.             Aviso(playerid,"Tem 1 minuto para o jogo começar.");
  1732.             SetPlayerHealth(playerid,100);
  1733.             SetPlayerArmour(playerid,100);
  1734.         }
  1735.         else if(xx1 == 1){
  1736.             SetPlayerPos(playerid,-1348.6866,-480.4431,32.0100);
  1737.             SetPlayerFacingAngle(playerid,118.7421);
  1738.             TogglePlayerControllable(playerid,0);
  1739.             SetCameraBehindPlayer(playerid);
  1740.             UsouComando(playerid,"x1");
  1741.             FoiX1[playerid] = true;
  1742.             xx1 ++;
  1743.             KillTimer(Tx1);
  1744.             ContandoX1 = 5;
  1745.             Tx1 = SetTimer("ComecaX1",1000,true);
  1746.             SetPlayerHealth(playerid,100);
  1747.             SetPlayerArmour(playerid,100);
  1748.         }
  1749.         else Aviso(playerid,"Já há uma partida de x1 acontecendo, espere acabar.");
  1750.     }
  1751.     return true;
  1752. }
  1753. CMD:minirampa(playerid)
  1754. {
  1755.     if(IsPlayerConnected(playerid)){
  1756.         SetPlayerPosEx(playerid,300.8014,1841.2706,1054.3063+3);
  1757.         SetPlayerFacingAngle(playerid,135.3409);
  1758.         SetCameraBehindPlayer(playerid);
  1759.         UsouComando(playerid,"minirampa");
  1760.     }
  1761.     return true;
  1762. }
  1763. CMD:aero(playerid)
  1764. {
  1765.     if(IsPlayerConnected(playerid)){
  1766.         if(FoiX1[playerid] == true) return Aviso(playerid,"Você esta no x1");
  1767.         SetPlayerPosEx(playerid,-1260.2542,-487.5527,14.2539);
  1768.         SetPlayerFacingAngle(playerid,296.9659);
  1769.         SetCameraBehindPlayer(playerid);
  1770.         UsouComando(playerid,"aero");
  1771.     }
  1772.     return true;
  1773. }
  1774. CMD:arena(playerid)
  1775. {
  1776.     if(IsPlayerConnected(playerid)){
  1777.         if(FoiX1[playerid] == true) return Aviso(playerid,"Você esta no x1");
  1778.         new r = random(sizeof(SpawnArena));
  1779.         SetPlayerPos(playerid,SpawnArena[r][0],SpawnArena[r][1],SpawnArena[r][2]+4);
  1780.         SetPlayerFacingAngle(playerid,SpawnArena[r][3]);
  1781.         SetCameraBehindPlayer(playerid);
  1782.         UsouComando(playerid,"arena");
  1783.     }
  1784.     return true;
  1785. }
  1786. CMD:kit(playerid,params[])
  1787. {
  1788.     if(Comecou[playerid] == false) return Aviso(playerid,"Você só pode comprar um kit apos o tempo de spawn.");
  1789.     if(sscanf(params,"d",ii)){
  1790.         Aviso(playerid,"USE:/kit [Nº do kit]");
  1791.         Aviso(playerid,"{ADD8E6}Kit 1: Eagle,Escopeta,MP5,AK47,Sniper Rifle,Granada. [$:2000]");
  1792.         Aviso(playerid,"{ADD8E6}Kit 2: Eagle,Combat,UZI,M4,Sniper Rifle,Granada. [$:5000]");
  1793.         Aviso(playerid,"{ADD8E6}Kit 3: Faca,Eagle,Sawn,Tec9,M4,Sniper Rifle,Granada. [$:7000]");
  1794.         return true;
  1795.     }
  1796.     if(ii == 1)
  1797.     {
  1798.         if(PI[playerid][pDolar] < 2000) return GameTextForPlayer(playerid,"~n~~n~~n~~r~Sem dinheiro!",5000,5);
  1799.         GivePlayerMoneyEx(playerid,-2000);
  1800.         GivePlayerWeapon(playerid,24,200);
  1801.         GivePlayerWeapon(playerid,25,150);
  1802.         GivePlayerWeapon(playerid,29,500);
  1803.         GivePlayerWeapon(playerid,30,500);
  1804.         GivePlayerWeapon(playerid,34,70);
  1805.         GivePlayerWeapon(playerid,16,5);
  1806.         Informe(playerid,"Você comprou o kit 1 por $:2000.");
  1807.     }
  1808.     else if(ii == 2)
  1809.     {
  1810.         if(PI[playerid][pDolar] < 5000) return GameTextForPlayer(playerid,"~n~~n~~n~~r~Sem dinheiro!",5000,5);
  1811.         GivePlayerMoneyEx(playerid,-5000);
  1812.         GivePlayerWeapon(playerid,24,400);
  1813.         GivePlayerWeapon(playerid,27,200);
  1814.         GivePlayerWeapon(playerid,28,700);
  1815.         GivePlayerWeapon(playerid,31,700);
  1816.         GivePlayerWeapon(playerid,34,150);
  1817.         GivePlayerWeapon(playerid,16,10);
  1818.         Informe(playerid,"Você comprou o kit 2 por $:5000.");
  1819.     }
  1820.     else if(ii == 3)
  1821.     {
  1822.         if(PI[playerid][pDolar] < 7000) return GameTextForPlayer(playerid,"~n~~n~~n~~r~Sem dinheiro!",5000,5);
  1823.         GivePlayerMoneyEx(playerid,-7000);
  1824.         GivePlayerWeapon(playerid,4,1);
  1825.         GivePlayerWeapon(playerid,24,500);
  1826.         GivePlayerWeapon(playerid,32,999);
  1827.         GivePlayerWeapon(playerid,26,300);
  1828.         GivePlayerWeapon(playerid,31,999);
  1829.         GivePlayerWeapon(playerid,34,150);
  1830.         GivePlayerWeapon(playerid,16,20);
  1831.         Informe(playerid,"Você comprou o kit 3 por $:7000.");
  1832.     }
  1833.     else
  1834.     {
  1835.         Aviso(playerid,"USE:/kit [Nº do kit]");
  1836.         Aviso(playerid,"{ADD8E6}Kit 1: Eagle,Escopeta,MP5,AK47,Sniper Rifle,Granada. [$:2000]");
  1837.         Aviso(playerid,"{ADD8E6}Kit 2: Eagle,Combat,UZI,M4,Sniper Rifle,Granada. [$:5000]");
  1838.         Aviso(playerid,"{ADD8E6}Kit 3: Faca,Eagle,Sawn,Tec9,M4,Sniper Rifle,Granada. [$:7000]");
  1839.         return true;
  1840.     }
  1841.     PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
  1842.     UsouComando(playerid,"kit");
  1843.     return true;
  1844. }
  1845. CMD:criarveiculo(playerid,params[])
  1846. {
  1847.     if(PI[playerid][pAdmin] < 3) return Aviso(playerid,"Sem autorização.");
  1848.     if(sscanf(params,"d",ii)) return Aviso(playerid,"USE:/criarveiculo [veiculo ID]");
  1849.     if(ii < 400 || ii > 611) return Aviso(playerid,"Veiculo ID inválido.Use entre 400 e 611");
  1850.     new Float:x,Float:y,Float:z;
  1851.     CreateVehicle(ii,x,y+1.0,z,0.0,-1,-1,6000);
  1852.     Informe(playerid,"Veiculo Criado!");
  1853.     return true;
  1854. }
  1855. CMD:veh(playerid,params[])
  1856. {
  1857.     if(PI[playerid][pAdmin] < 3) return Aviso(playerid,"Sem autorização.");
  1858.     if(sscanf(params,"d",ii)) return Aviso(playerid,"USE:/criarveiculo [veiculo ID]");
  1859.     if(ii < 400 || ii > 611) return Aviso(playerid,"Veiculo ID inválido.Use entre 400 e 611");
  1860.     new Float:x,Float:y,Float:z;
  1861.     GetPlayerPos(playerid,x,y,z);
  1862.     CreateVehicle(ii,x+1.0,y,z,0.0,-1,-1,6000);
  1863.     Informe(playerid,"Veiculo Criado!");
  1864.     return true;
  1865. }
  1866. CMD:fixveh(playerid,params[])
  1867. {
  1868.     if(PI[playerid][pAdmin] < 3) return Aviso(playerid,"Sem autorização.");
  1869.     SetVehicleHealth(GetPlayerVehicleID(playerid),10000);
  1870.     RepairVehicle(GetPlayerVehicleID(playerid));
  1871.     Informe(playerid,"Veiculo consertado!");
  1872.     return true;
  1873. }
  1874. CMD:explodir(playerid,params[])
  1875. {
  1876.     if(PI[playerid][pAdmin] < 2) return Aviso(playerid,"Sem autorização.");
  1877.     if(sscanf(params,"u",id)) return Aviso(playerid,"USE:/explodir [playerid]");
  1878.     if(id != INVALID_PLAYER_ID)
  1879.     {
  1880.         new Float:x,Float:y,Float:z;
  1881.         GetPlayerPos(id,x,y,z);
  1882.         CreateExplosion(x, y , z, 7, 10);
  1883.         CreateExplosion(x, y , z, 7, 10);
  1884.         CreateExplosion(x, y , z, 7, 10);
  1885.         new string[128];
  1886.         format(string,sizeof string,"Você explodiu o player %s",Nome(id));
  1887.         Informe(playerid,string);
  1888.     }
  1889.     else return Aviso(playerid,"Player não encontrado");
  1890.     return true;
  1891. }
  1892. CMD:admins(playerid,params[])
  1893. {
  1894.     new str[64];
  1895.     new cargo[16];
  1896.     new bool:achou;
  1897.     SendClientMessage(playerid,-1,"___________ADMINISTRADORES___________");
  1898.     for(new i = 0;i<GetMaxPlayers();i++)
  1899.     {
  1900.         if(IsPlayerConnected(i)){
  1901.             if(PI[i][pAdmin] > 0){
  1902.                 if(PI[i][pAdmin] == 1) cargo = "Moderador";
  1903.                 else if(PI[i][pAdmin] == 2)cargo = "Administrador";
  1904.                 else if(PI[i][pAdmin] == 3)cargo = "Dono";
  1905.                 format(str,sizeof str,"{FF7F50}[%s] %s [ID: %d]",cargo,Nome(i),i);
  1906.                 SendClientMessage(playerid,-1,str);
  1907.                 achou = true;
  1908.             }
  1909.         }
  1910.     }
  1911.     if(achou == false) SendClientMessage(playerid,-1,"{FF7F50}[Dono] Pedrão_PãoDeBatata [ID: 999]");
  1912.     return true;
  1913. }
  1914. CMD:a(playerid,params[])
  1915. {
  1916.     if(PI[playerid][pAdmin] < 1) return true;
  1917.     new texto[128];
  1918.     new str[128];
  1919.     new cargo[20];
  1920.     if(sscanf(params,"s[128]",texto)) return Aviso(playerid,"USE:/a [texto]");
  1921.     if(PI[playerid][pAdmin] == 1)cargo = "Moderador";
  1922.     else if(PI[playerid][pAdmin] == 2)cargo = "Administrador";
  1923.     else if(PI[playerid][pAdmin] == 3)cargo = "Dono";
  1924.     format(str,sizeof str,"{EE82EE}[%s]%s: %s",cargo,Nome(playerid),texto);
  1925.     for(new i = 0;i < GetMaxPlayers();i++)
  1926.     {
  1927.         if(PI[i][pAdmin] > 0)
  1928.         {
  1929.             SendClientMessage(i,-1,str);
  1930.         }
  1931.     }
  1932.     return true;
  1933. }
  1934. CMD:r(playerid,params[])
  1935. {
  1936.     if(Logou[playerid] == false) return Aviso(playerid,"Você não pode falar, pois não está logado.");
  1937.     if(PI[playerid][pCalado] > gettime()){
  1938.         new str[128];
  1939.         format(str,sizeof str,"Você ainda vai ficar calado por mais %d segundos.",PI[playerid][pCalado] - gettime());
  1940.         Aviso(playerid,str);
  1941.         return 1;
  1942.     }
  1943.     else PI[playerid][pCalado] = 0;
  1944.     new texto[128];
  1945.     new str[128];
  1946.     if(sscanf(params,"s[128]",texto)) return Aviso(playerid,"USE:/r [texto]");
  1947.     format(str,sizeof str,"{4169E1}[%s] diz: {FFFFFF}%s",Nome(playerid),texto);
  1948.     for(new i = 0;i < GetMaxPlayers();i++)
  1949.     {
  1950.         if(PI[playerid][pTime] == PI[i][pTime])
  1951.         {
  1952.             SendClientMessage(i,-1,str);
  1953.         }
  1954.     }
  1955.     return true;
  1956. }
  1957. CMD:par(playerid,params[])
  1958. {
  1959.     if(Logou[playerid] == false) return Aviso(playerid,"Você não pode falar, pois não está logado.");
  1960.     if(PI[playerid][pCalado] > gettime()){
  1961.         new str[128];
  1962.         format(str,sizeof str,"Você ainda vai ficar calado por mais %d segundos.",PI[playerid][pCalado] - gettime());
  1963.         Aviso(playerid,str);
  1964.         return 1;
  1965.     }
  1966.     else PI[playerid][pCalado] = 0;
  1967.     new texto[128];
  1968.     if(sscanf(params,"us[128]",id,texto)) return Aviso(playerid,"USE:/par [playerid][texto]");
  1969.     if(id != INVALID_PLAYER_ID)
  1970.     {
  1971.         new string[128];
  1972.         format(string,sizeof string,"{FFD700}[%s ID:%d] diz: %s",Nome(playerid),playerid,texto);
  1973.         SendClientMessage(id,-1,string);
  1974.         format(string,sizeof string,"{FFD700}Você enviou uma mensagem ao player %s",Nome(id));
  1975.         SendClientMessage(playerid,-1,string);
  1976.         PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
  1977.         PlayerPlaySound(id,1054,0.0,0.0,0.0);
  1978.     }
  1979.     else return Aviso(playerid,"Player não encontrado");
  1980.     return true;
  1981. }
  1982. CMD:desmutar(playerid,params[])
  1983. {
  1984.     if(IsPlayerConnected(playerid)){
  1985.         if(PI[playerid][pAdmin] > 0){
  1986.             if(sscanf(params,"u",id)) return Aviso(playerid,"USE: /desmutar [playerid]");
  1987.             if(IsPlayerConnected(id)){
  1988.                 PI[id][pCalado] = 0;
  1989.                 new str[128];
  1990.                 format(str,sizeof str,"{EE0000}O administrador %s descalou o player %s.",Nome(playerid),Nome(id));
  1991.                 SendClientMessageToAll(-1,str);
  1992.             }
  1993.             else return Aviso(playerid,"Player não encontrado");
  1994.         }
  1995.         else return Aviso(playerid,"Sem autorização.");
  1996.     }
  1997.     return true;
  1998. }
  1999. CMD:mutar(playerid,params[])
  2000. {
  2001.     if(IsPlayerConnected(playerid)){
  2002.         if(PI[playerid][pAdmin] > 0){
  2003.             if(sscanf(params,"ui",id,ii)) return Aviso(playerid,"USE: /mutar [playerid] [tempo em minutos]");
  2004.             if(IsPlayerConnected(id)){
  2005.                 PI[id][pCalado] = gettime()+(ii*60);
  2006.                 new str[128];
  2007.                 format(str,sizeof str,"{EE0000}O administrador %s calou o player %s por %d minuto(s)",Nome(playerid),Nome(id),ii);
  2008.                 SendClientMessageToAll(-1,str);
  2009.             }
  2010.             else return Aviso(playerid,"Player não encontrado");
  2011.         }
  2012.         else return Aviso(playerid,"Sem autorização.");
  2013.     }
  2014.     return true;
  2015. }
  2016. CMD:pm(playerid,params[])
  2017. {
  2018.     if(Logou[playerid] == false) return Aviso(playerid,"Você não pode falar, pois não está logado.");
  2019.     if(PI[playerid][pCalado] > gettime()){
  2020.         new str[128];
  2021.         format(str,sizeof str,"Você ainda vai ficar calado por mais %d segundos.",PI[playerid][pCalado] - gettime());
  2022.         Aviso(playerid,str);
  2023.         return 1;
  2024.     }
  2025.     else PI[playerid][pCalado] = 0;
  2026.     new texto[128];
  2027.     if(sscanf(params,"us[128]",id,texto)) return Aviso(playerid,"USE:/par [playerid][texto]");
  2028.     if(id != INVALID_PLAYER_ID)
  2029.     {
  2030.         new string[128];
  2031.         format(string,sizeof string,"{FFD700}[%s ID:%d] diz: %s",Nome(playerid),playerid,texto);
  2032.         SendClientMessage(id,-1,string);
  2033.         format(string,sizeof string,"{FFD700}Você enviou uma mensagem ao player %s",Nome(id));
  2034.         SendClientMessage(playerid,-1,string);
  2035.         PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
  2036.         PlayerPlaySound(id,1054,0.0,0.0,0.0);
  2037.     }
  2038.     else return Aviso(playerid,"Player não encontrado");
  2039.     return true;
  2040. }
  2041. CMD:ir(playerid,params[])
  2042. {
  2043.     if(PI[playerid][pAdmin] < 1) return Aviso(playerid,"Sem autorização.");
  2044.     if(sscanf(params,"u",id)) return Aviso(playerid,"USE:/ir [playerid]");
  2045.     if(id != INVALID_PLAYER_ID)
  2046.     {
  2047.         new Float:x,Float:y,Float:z;
  2048.         GetPlayerPos(id,x,y,z);
  2049.         SetPlayerInterior(playerid,GetPlayerInterior(id));
  2050.         SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  2051.         SetPlayerPosEx(playerid,x,y,z);
  2052.         new string[128];
  2053.         format(string,sizeof string,"Você foi até o player %s",Nome(id));
  2054.         Informe(playerid,string);
  2055.     }
  2056.     else return Aviso(playerid,"Player não encontrado");
  2057.     return true;
  2058. }
  2059. CMD:trazer(playerid,params[])
  2060. {
  2061.     if(PI[playerid][pAdmin] < 1) return Aviso(playerid,"Sem autorização.");
  2062.     if(sscanf(params,"u",id)) return Aviso(playerid,"USE:/trazer [playerid]");
  2063.     if(id != INVALID_PLAYER_ID)
  2064.     {
  2065.         new Float:x,Float:y,Float:z;
  2066.         GetPlayerPos(playerid,x,y,z);
  2067.         SetPlayerInterior(id,GetPlayerInterior(playerid));
  2068.         SetPlayerVirtualWorld(id,GetPlayerVirtualWorld(playerid));
  2069.         SetPlayerPosEx(id,x,y,z);
  2070.         new string[128];
  2071.         format(string,sizeof string,"Você trouxe o player %s",Nome(id));
  2072.         Informe(playerid,string);
  2073.     }
  2074.     else return Aviso(playerid,"Player não encontrado");
  2075.     return true;
  2076. }
  2077. CMD:sf(playerid,params[])
  2078. {
  2079.     if(Comecou[playerid] == true){
  2080.         if(FoiX1[playerid] == true) return Aviso(playerid,"Você esta no x1");
  2081.         SetPlayerPosEx(playerid,-1492.5144,832.0471,7.1875);
  2082.         UsouComando(playerid,"sf");
  2083.     }
  2084.     return true;
  2085. }
  2086. CMD:tapa(playerid,params[])
  2087. {
  2088.     if(PI[playerid][pAdmin] < 1) return Aviso(playerid,"Sem autorização.");
  2089.     if(sscanf(params,"us",id)) return Aviso(playerid,"USE:/tapa [playerid]");
  2090.     if(id != INVALID_PLAYER_ID)
  2091.     {
  2092.         new Float:x,Float:y,Float:z;
  2093.         GetPlayerPos(id,x,y,z);
  2094.         SetPlayerPos(id,x,y,z+10);
  2095.         new string[128];
  2096.         format(string,sizeof string,"Você deu tapa no player %s",Nome(id));
  2097.         Informe(playerid,string);
  2098.     }
  2099.     else return Aviso(playerid,"Player não encontrado");
  2100.     return true;
  2101. }
  2102. CMD:ban(playerid,params[])
  2103. {
  2104.     new texto[26];
  2105.     if(PI[playerid][pAdmin] < 1) return Aviso(playerid,"Sem autorização.");
  2106.     if(sscanf(params,"us[26]",id,texto)) return Aviso(playerid,"USE:/ban [playerid][motivo]");
  2107.     if(id != INVALID_PLAYER_ID)
  2108.     {
  2109.         new str[128];
  2110.         format(str,sizeof str,"{EE0000}O player %s foi banido pelo admin %s. Motivo: %s.",Nome(id),Nome(playerid),texto);
  2111.         SendClientMessageToAll(-1,str);
  2112.         format(str,sizeof str,"%s",texto);
  2113.         BanPlayer(id,playerid,str);
  2114.     }
  2115.     else return Aviso(playerid,"Player não encontrado");
  2116.     return true;
  2117. }
  2118. CMD:kick(playerid,params[])
  2119. {
  2120.     new texto[26];
  2121.     if(PI[playerid][pAdmin] < 1) return Aviso(playerid,"Sem autorização.");
  2122.     if(sscanf(params,"us[26]",id,texto)) return Aviso(playerid,"USE: /kick [playerid][motivo]");
  2123.     if(id != INVALID_PLAYER_ID)
  2124.     {
  2125.         new str[128];
  2126.         format(str,sizeof str,"{EE0000}O player %s foi kickado pelo admin %s. Motivo: %s.",Nome(id),Nome(playerid),texto);
  2127.         SendClientMessageToAll(-1,str);
  2128.         Kick(id);
  2129.     }
  2130.     else return Aviso(playerid,"Player não encontrado");
  2131.     return true;
  2132. }
  2133. CMD:desban(playerid,params[])
  2134. {
  2135.     new texto[30];
  2136.     if(PI[playerid][pAdmin] < 2) return Aviso(playerid,"Sem autorização.");
  2137.     if(sscanf(params,"s[30]",texto)) return Aviso(playerid,"USE: /desban [insira o nome da conta]");
  2138.     new arq[56];
  2139.     format(arq,sizeof arq,"Banidos/%s.ini",texto);
  2140.     if(DOF2_FileExists(arq))
  2141.     {
  2142.         new str[128];
  2143.         format(str,sizeof str,"{EE0000}Você debaniu o player %s.",texto);
  2144.         SendClientMessage(playerid,-1,str);
  2145.         DOF2_RemoveFile(arq);
  2146.     }
  2147.     else return Aviso(playerid,"Conta não encontrada");
  2148.     return true;
  2149. }
  2150. CMD:dolar(playerid,params[])
  2151. {
  2152.     if(PI[playerid][pAdmin] < 2) return Aviso(playerid,"Sem autorização.");
  2153.     if(sscanf(params,"ud",id,ii)) return Aviso(playerid,"USE:/dolar [playerid][quantia]");
  2154.     GanhouDim[id] = true;
  2155.     GivePlayerMoneyEx(id,ii);
  2156.     new str[128];
  2157.     format(str,sizeof str,"Você deu %d dolares ao player %s",ii,Nome(id));
  2158.     Informe(playerid,str);
  2159.     format(str,sizeof str,"O admin %s deu %d dolares para você.",Nome(playerid),ii);
  2160.     Informe(id,str);
  2161.     return 1;
  2162. }
  2163. CMD:daradmin(playerid,params[])
  2164. {
  2165.     if(PI[playerid][pAdmin] < 3) return Aviso(playerid,"Sem autorização.");
  2166.     if(sscanf(params,"ud",id,ii)) return Aviso(playerid,"USE:/daradmin [playerid][level]");
  2167.     if(ii > 3) return Aviso(playerid,"ERRO. Admin level máximo é o 3.");
  2168.     PI[id][pAdmin] = ii;
  2169.     new str[128];
  2170.     format(str,sizeof str,"Você deu admin level %d ao player %s",ii,Nome(id));
  2171.     Informe(playerid,str);
  2172.     format(str,sizeof str,"{00FFFF}O player %s é o novo administrador.",Nome(id));
  2173.     SendClientMessageToAll(-1,str);
  2174.     return 1;
  2175. }
  2176. CMD:prender(playerid,params[])
  2177. {
  2178.     if(PI[playerid][pAdmin] < 1) return Aviso(playerid,"Sem autorização.");
  2179.     if(sscanf(params,"ud",id,ii)) return Aviso(playerid,"USE:/prender [playerid][tempo]");
  2180.     PI[id][pPreso] = ii;
  2181.     new str[128];
  2182.     format(str,sizeof str,"{FF0000}O administrador %s prendeu o player %s por %d segundos",Nome(playerid),Nome(id),ii);
  2183.     SendClientMessageToAll(-1,str);
  2184.     SpawnPlayerEx(id);
  2185.     return 1;
  2186. }
  2187. //====================================================================================================
  2188. //=============================================STOCKS/CALLBACKS=======================================
  2189. stock GivePlayerMoneyEx(aa,bb)
  2190. {
  2191.     new str[15];
  2192.     if(bb >= 0) format(str,sizeof str,"~g~+%d",bb);
  2193.     else format(str,sizeof str,"~r~%d",bb);
  2194.     TextDrawSetString(Text:Textodraw[aa][0],str);
  2195.     TextDrawShowForPlayer(aa,Textodraw[aa][0]);
  2196.     SetTimerEx("ApagarTexto",2000,false,"d",aa);
  2197.     PI[aa][pDolar] += bb;
  2198.     ResetPlayerMoney(aa);
  2199.     GivePlayerMoney(aa,PI[aa][pDolar]);
  2200.     GanhouDim[aa] = false;
  2201.     return 1;
  2202. }
  2203. forward ApagarTexto(playerid);
  2204. public ApagarTexto(playerid)
  2205. {
  2206.     TextDrawHideForPlayer(playerid,Textodraw[playerid][0]);
  2207.     return true;
  2208. }
  2209. stock SpawnPlayerEx(playerid) {
  2210.     if(IsPlayerInAnyVehicle(playerid)) {
  2211.          RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, 10.0,10.0,10.0);
  2212.     }
  2213.     return SpawnPlayer(playerid);
  2214. }
  2215. forward Comecar(playerid);
  2216. public Comecar(playerid)
  2217. {
  2218.     PlayerPlaySound(playerid,1054,0.0,0.0,0.0);
  2219.     GameTextForPlayer(playerid,"~g~~n~~n~~n~~n~O jogo comecou",5000,3);
  2220.     Comecou[playerid] = true;
  2221.     switch(PI[playerid][pTime])
  2222.     {
  2223.         case 1:
  2224.         {
  2225.             SetPlayerHealth(playerid,100);
  2226.             GivePlayerWeapon(playerid,3,1);
  2227.             GivePlayerWeapon(playerid,22,150);
  2228.             GivePlayerWeapon(playerid,27,75);
  2229.             GivePlayerWeapon(playerid,32,150);
  2230.             GivePlayerWeapon(playerid,31,200);
  2231.         }
  2232.         case 2:
  2233.         {
  2234.             SetPlayerHealth(playerid,100);
  2235.             GivePlayerWeapon(playerid,24,70);
  2236.             GivePlayerWeapon(playerid,25,50);
  2237.             GivePlayerWeapon(playerid,29,150);
  2238.             GivePlayerWeapon(playerid,16,5);
  2239.         }
  2240.         case 3:
  2241.         {
  2242.             SetPlayerHealth(playerid,100);
  2243.             GivePlayerWeapon(playerid,23,70);
  2244.             GivePlayerWeapon(playerid,26,50);
  2245.             GivePlayerWeapon(playerid,30,150);
  2246.             GivePlayerWeapon(playerid,33,40);
  2247.         }
  2248.         //parei aqui...
  2249.         case 4:
  2250.         {
  2251.             SetPlayerHealth(playerid,100);
  2252.             GivePlayerWeapon(playerid,22,70);
  2253.             GivePlayerWeapon(playerid,27,50);
  2254.             GivePlayerWeapon(playerid,30,200);
  2255.             GivePlayerWeapon(playerid,16,5);
  2256.         }
  2257.         case 5:
  2258.         {
  2259.             SetPlayerHealth(playerid,100);
  2260.             GivePlayerWeapon(playerid,24,70);
  2261.             GivePlayerWeapon(playerid,25,50);
  2262.             GivePlayerWeapon(playerid,29,150);
  2263.             GivePlayerWeapon(playerid,34,10);
  2264.         }
  2265.         case 6:
  2266.         {
  2267.             SetPlayerHealth(playerid,100);
  2268.             GivePlayerWeapon(playerid,23,70);
  2269.             GivePlayerWeapon(playerid,8,1);
  2270.             GivePlayerWeapon(playerid,26,50);
  2271.             GivePlayerWeapon(playerid,28,150);
  2272.             GivePlayerWeapon(playerid,30,200);
  2273.         }
  2274.         case 7:
  2275.         {
  2276.             SetPlayerHealth(playerid,100);
  2277.             GivePlayerWeapon(playerid,8,1);
  2278.             GivePlayerWeapon(playerid,22,70);
  2279.             GivePlayerWeapon(playerid,27,50);
  2280.             GivePlayerWeapon(playerid,28,150);
  2281.             GivePlayerWeapon(playerid,33,40);
  2282.         }
  2283.         case 8:
  2284.         {
  2285.             SetPlayerHealth(playerid,100);
  2286.             GivePlayerWeapon(playerid,1,1);
  2287.             GivePlayerWeapon(playerid,22,70);
  2288.             GivePlayerWeapon(playerid,25,50);
  2289.             GivePlayerWeapon(playerid,28,50);
  2290.             GivePlayerWeapon(playerid,31,150);
  2291.         }
  2292.         case 9:
  2293.         {
  2294.             SetPlayerHealth(playerid,100);
  2295.             GivePlayerWeapon(playerid,23,70);
  2296.             GivePlayerWeapon(playerid,26,50);
  2297.             GivePlayerWeapon(playerid,31,200);
  2298.             GivePlayerWeapon(playerid,34,40);
  2299.         }
  2300.         case 10:
  2301.         {
  2302.             SetPlayerHealth(playerid,100);
  2303.             GivePlayerWeapon(playerid,24,70);
  2304.             GivePlayerWeapon(playerid,25,50);
  2305.             GivePlayerWeapon(playerid,31,150);
  2306.             GivePlayerWeapon(playerid,16,5);
  2307.         }
  2308.     }
  2309.     return true;
  2310. }
  2311. stock Contas(playerid)
  2312. {
  2313.     new c[40],no[26];
  2314.     GetPlayerName(playerid,no,sizeof no);
  2315.     format(c,sizeof c,"Contas/%s.ini",no);
  2316.     return c;
  2317. }
  2318. stock Aviso(playerid,msg[])
  2319. {
  2320.     new string[128];
  2321.     format(string,sizeof string,"{FF0000}<!> {CDCDB4}%s.",msg);
  2322.     return SendClientMessage(playerid,-1,string);
  2323. }
  2324. stock Informe(playerid,msg[])
  2325. {
  2326.     new string[128];
  2327.     format(string,sizeof string,"{FF0000}<!> {7FFFD4}%s.",msg);
  2328.     return SendClientMessage(playerid,-1,string);
  2329. }
  2330. stock Nome(i)
  2331. {
  2332.     new nome[MAX_PLAYER_NAME];
  2333.     GetPlayerName(i,nome,sizeof nome);
  2334.     return nome;
  2335. }
  2336. stock InformeArma(i,w)
  2337. {
  2338.     new str[128];
  2339.     format(str,sizeof str,"{EE0000}[ADMIN BOT] %s foi kickado suspeita de Weapon Hack ( %s ).",Nome(i),NomeArma(w));
  2340.     return SendClientMessageToAll(-1,str);
  2341. }
  2342. stock NomeArma(w)
  2343. {
  2344.     new arma[12];
  2345.     switch(w)
  2346.     {
  2347.         case 0:arma = "Bazuka";
  2348.         case 1:arma = "Bazuka";
  2349.         case 2:arma = "Laça Chamas";
  2350.         case 3:arma = "Mini Gun";
  2351.         case 4..5:arma = "Mochilinha";
  2352.         case 6..7:arma = "Oculos";
  2353.     }
  2354.     return arma;
  2355. }
  2356. forward SalvarPlayer(playerid);
  2357. public SalvarPlayer(playerid)
  2358. {
  2359.     if(Logou[playerid] == true)
  2360.     {
  2361.         if(DOF2_FileExists(Contas(playerid)))
  2362.         {
  2363.             DOF2_SetInt(Contas(playerid),"Matou",PI[playerid][pMatou]);
  2364.             DOF2_SetInt(Contas(playerid),"Morreu",PI[playerid][pMorreu]);
  2365.             DOF2_SetInt(Contas(playerid),"Dolar",PI[playerid][pDolar]);
  2366.             DOF2_SetInt(Contas(playerid),"Admin",PI[playerid][pAdmin]);
  2367.             DOF2_SetInt(Contas(playerid),"Preso",PI[playerid][pPreso]);
  2368.             DOF2_SetInt(Contas(playerid),"Calado",PI[playerid][pCalado]);
  2369.             DOF2_SetInt(Contas(playerid),"MorreuX1",PI[playerid][pMorreuX1]);
  2370.             DOF2_SetInt(Contas(playerid),"MatouX1",PI[playerid][pMatouX1]);
  2371.             DOF2_SaveFile();
  2372.             printf("Salvou");
  2373.         }
  2374.     }
  2375.     return 1;
  2376. }
  2377. forward CarregarPlayer(playerid);
  2378. public CarregarPlayer(playerid)
  2379. {
  2380.     if(IsPlayerConnected(playerid))
  2381.     {
  2382.         PI[playerid][pMatou] = DOF2_GetInt(Contas(playerid),"Matou");
  2383.         PI[playerid][pMorreu] = DOF2_GetInt(Contas(playerid),"Morreu");
  2384.         PI[playerid][pDolar] = DOF2_GetInt(Contas(playerid),"Dolar");
  2385.         PI[playerid][pAdmin] = DOF2_GetInt(Contas(playerid),"Admin");
  2386.         PI[playerid][pPreso] = DOF2_GetInt(Contas(playerid),"Preso");
  2387.         PI[playerid][pCalado] = DOF2_GetInt(Contas(playerid),"Calado");
  2388.         PI[playerid][pMorreuX1] = DOF2_GetInt(Contas(playerid),"MorreuX1");
  2389.         PI[playerid][pMatouX1] = DOF2_GetInt(Contas(playerid),"MatouX1");
  2390.         GivePlayerMoney(playerid,PI[playerid][pDolar]);
  2391.         SetPlayerScore(playerid,PI[playerid][pMatou]);
  2392.     }
  2393.     return 1;
  2394. }
  2395. forward AntiCheat();
  2396. public AntiCheat()
  2397. {
  2398.     for(new i, e = GetMaxPlayers();  i != e; ++i){
  2399.         if(PI[i][pAdmin] < 1){
  2400.             if(GetPlayerWeapon(i) > 34){
  2401.                 if(IsPlayerConnected(i)){
  2402.                     for(new w; w != sizeof(gArmas); ++w){
  2403.                         if(GetPlayerWeapon(i) == gArmas[w]){
  2404.                             ResetPlayerWeapons(i);
  2405.                             InformeArma(i,w);
  2406.                             Kick(i);
  2407.                         }
  2408.                     }
  2409.                     if(GanhouDim[i] == false){
  2410.                         if(PI[i][pDolar] < GetPlayerMoney(i)){
  2411.                             ResetPlayerMoney(i);
  2412.                             GivePlayerMoney(i,PI[i][pDolar]);
  2413.                         }
  2414.                         else if(PI[i][pDolar] > GetPlayerMoney(i)){
  2415.                             PI[i][pDolar] = GetPlayerMoney(i);
  2416.                         }
  2417.                     }              
  2418.                 }
  2419.             }
  2420.         }  
  2421.     }
  2422. }
  2423. forward BanPlayer(banido,admin,razao[]);
  2424. public BanPlayer(banido,admin,razao[])
  2425. {
  2426.     new arq[56];
  2427.     format(arq,sizeof arq,"Banidos/%s.ini",Nome(banido));
  2428.     DOF2_CreateFile(arq);
  2429.     DOF2_SetString(arq,"Admin",Nome(admin));
  2430.     DOF2_SetString(arq,"Razao",razao);
  2431.     DOF2_SaveFile();
  2432.     Kick(banido);
  2433. }
  2434. forward Pararespiar(playerid);
  2435. public Pararespiar(playerid)
  2436. {
  2437.     TogglePlayerSpectating(playerid, 0);
  2438. }
  2439. stock PlayerBope(playerid)
  2440. {
  2441.     new Float:x,Float:y,Float:z;
  2442.     GetPlayerPos(playerid,x,y,z);
  2443.     if(x >= -1753.477 && y >= 625.6215 && x <= -1513.99 && y <= 803.1449) return true;
  2444.     else return false;
  2445. }
  2446. stock PlayerExercito(playerid)
  2447. {
  2448.     new Float:x,Float:y,Float:z;
  2449.     GetPlayerPos(playerid,x,y,z);
  2450.     if(x >= -1517.853 && y >= 420.4833 && x <= -1208.838 && y <= 598.0067) return true;
  2451.     else return false;
  2452. }
  2453. stock PlayerBozo(playerid)
  2454. {
  2455.     new Float:x,Float:y,Float:z;
  2456.     GetPlayerPos(playerid,x,y,z);
  2457.     if(x >= -2390.82&& y >= 65.43655&& x <=  -2228.587&& y <= 329.7492) return true;
  2458.     else return false;
  2459. }
  2460. stock PlayerFrango(playerid)
  2461. {
  2462.     new Float:x,Float:y,Float:z;
  2463.     GetPlayerPos(playerid,x,y,z);
  2464.     if(x >= -2750.05 && y >= 191.6754 && x <= -2549.19 && y <= 345.529) return true;
  2465.     else return false;
  2466. }
  2467. stock PlayerRifas(playerid)
  2468. {
  2469.     new Float:x,Float:y,Float:z;
  2470.     GetPlayerPos(playerid,x,y,z);
  2471.     if(x >= -2155.196 && y >= 112.7761 && x <= -1992.963 && y <= 357.3639) return true;
  2472.     else return false;
  2473. }
  2474. stock PlayerNang(playerid)
  2475. {
  2476.     new Float:x,Float:y,Float:z;
  2477.     GetPlayerPos(playerid,x,y,z);
  2478.     if(x >= -1780.516 && y >= 1296.265 && x <= -1475.364 && y <= 1509.293) return true;
  2479.     else return false;
  2480. }
  2481. stock PlayerTriads(playerid)
  2482. {
  2483.     new Float:x,Float:y,Float:z;
  2484.     GetPlayerPos(playerid,x,y,z);
  2485.     if(x >= -2263.351 && y >= 554.6121 && x <= -2085.668 && y <= 779.4751 ) return true;
  2486.     else return false;
  2487. }
  2488. stock PlayerMotoqueiro(playerid)
  2489. {
  2490.     new Float:x,Float:y,Float:z;
  2491.     GetPlayerPos(playerid,x,y,z);
  2492.     if(x >= -2626.444 && y >= 1173.972 && x <= -2406.271 && y <= 1323.88) return true;
  2493.     else return false;
  2494. }
  2495. stock PlayerPlayBoy(playerid)
  2496. {
  2497.     new Float:x,Float:y,Float:z;
  2498.     GetPlayerPos(playerid,x,y,z);
  2499.     if(x >= -2800.265 && y >= -344.8398 && x <= -2583.954 && y <= -183.0962) return true;
  2500.     else return false;
  2501. }
  2502. stock PlayerMendigo(playerid)
  2503. {
  2504.     new Float:x,Float:y,Float:z;
  2505.     GetPlayerPos(playerid,x,y,z);
  2506.     if(x >= -2209.274 && y >= -293.5552 && x <= -1996.826 && y <= -56.85734) return true;
  2507.     else return false;
  2508. }
  2509. stock CarregarTextos(playerid)
  2510. {
  2511.     Textodraw[playerid][0] = TextDrawCreate(503.000000, 105.000000, "_");
  2512.     TextDrawBackgroundColor(Textodraw[playerid][0] , 255);
  2513.     TextDrawFont(Textodraw[playerid][0] , 3);
  2514.     TextDrawLetterSize(Textodraw[playerid][0] , 0.450000, 1.100000);
  2515.     TextDrawColor(Textodraw[playerid][0] , 16711935);
  2516.     TextDrawSetOutline(Textodraw[playerid][0] , 1);
  2517.     TextDrawSetProportional(Textodraw[playerid][0] , 1);
  2518.  
  2519.     Textodraw[playerid][1]  = TextDrawCreate(546.000000, 20.000000, "_");
  2520.     TextDrawBackgroundColor(Textodraw[playerid][1], 255);
  2521.     TextDrawFont(Textodraw[playerid][1], 2);
  2522.     TextDrawLetterSize(Textodraw[playerid][1], 0.180000, 0.899999);
  2523.     TextDrawColor(Textodraw[playerid][1], -1);
  2524.     TextDrawSetOutline(Textodraw[playerid][1], 0);
  2525.     TextDrawSetProportional(Textodraw[playerid][1], 1);
  2526.     TextDrawSetShadow(Textodraw[playerid][1], 1);
  2527.     TextDrawUseBox(Textodraw[playerid][1], 1);
  2528.     TextDrawBoxColor(Textodraw[playerid][1], 100);
  2529.     TextDrawTextSize(Textodraw[playerid][1], 595.000000, 0.000000);
  2530.  
  2531.     NomeServerTxt[0] = TextDrawCreate(2.000000, 431.000000, "        forum.mib-samp.com          mib-TDM V1.0");
  2532.     TextDrawBackgroundColor(NomeServerTxt[0], 255);
  2533.     TextDrawFont(NomeServerTxt[0], 2);
  2534.     TextDrawLetterSize(NomeServerTxt[0], 0.450000, 1.600000);
  2535.     TextDrawColor(NomeServerTxt[0], 16711935);
  2536.     TextDrawSetOutline(NomeServerTxt[0], 0);
  2537.     TextDrawSetProportional(NomeServerTxt[0], 1);
  2538.     TextDrawSetShadow(NomeServerTxt[0], 1);
  2539.     TextDrawUseBox(NomeServerTxt[0], 1);
  2540.     TextDrawBoxColor(NomeServerTxt[0], 100);
  2541.     TextDrawTextSize(NomeServerTxt[0], 640.000000, 80.000000);
  2542.  
  2543.     Textodraw[playerid][2] = TextDrawCreate(21.000000, 324.000000, "_");
  2544.     TextDrawBackgroundColor(Textodraw[playerid][2], 255);
  2545.     TextDrawFont(Textodraw[playerid][2], 1);
  2546.     TextDrawLetterSize(Textodraw[playerid][2], 0.350000, 1.100000);
  2547.     TextDrawColor(Textodraw[playerid][2], -1);
  2548.     TextDrawSetOutline(Textodraw[playerid][2], 0);
  2549.     TextDrawSetProportional(Textodraw[playerid][2], 1);
  2550.     TextDrawSetShadow(Textodraw[playerid][2], 1);
  2551.  
  2552.     NomeServerTxt[1] = TextDrawCreate(588.000000, 430.000000, "~y~Yiakin ~r~- ~y~Fuca~n~~y~Etton ~r~- ~y~Scott");
  2553.     TextDrawBackgroundColor(NomeServerTxt[1], 255);
  2554.     TextDrawFont(NomeServerTxt[1], 2);
  2555.     TextDrawLetterSize(NomeServerTxt[1], 0.160000, 0.899999);
  2556.     TextDrawColor(NomeServerTxt[1], -65281);
  2557.     TextDrawSetOutline(NomeServerTxt[1], 0);
  2558.     TextDrawSetProportional(NomeServerTxt[1], 1);
  2559.     TextDrawSetShadow(NomeServerTxt[1], 0);
  2560.  
  2561. }
  2562. forward ChecarGz();
  2563. public ChecarGz()
  2564. {
  2565.     for(new i = 0;i < GetMaxPlayers();i++)
  2566.     {
  2567.         if(IsPlayerConnected(i))
  2568.         {
  2569.             if(IsPlayerInAnyVehicle(i)){
  2570.                 if(GetPlayerVehicleID(i) > 167 && GetPlayerVehicleID(i) < 232){
  2571.                     new Float:h;
  2572.                     GetVehicleHealth(GetPlayerVehicleID(i),h);
  2573.                     if(h < 999){
  2574.                         SetVehicleHealth(GetPlayerVehicleID(i),99999);
  2575.                         RepairVehicle(GetPlayerVehicleID(i));
  2576.                         GameTextForPlayer(i,"~b~~n~~n~~n~~h~Veiculo reparado",3000,5);
  2577.                     }
  2578.                 }
  2579.             }
  2580.             if(PlayerBope(i))
  2581.             {
  2582.                 if(PI[i][pCP] != 1)
  2583.                 {
  2584.                     PI[i][pCP] = 1;
  2585.                     SetPlayerCheckpoint(i,-1615.9286,685.1993,7.1875,3.0);
  2586.                     new str[56];
  2587.                     format(str,sizeof str,"Territorio HQ Bope");
  2588.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2589.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2590.                 }
  2591.             }
  2592.             else if(PlayerExercito(i))
  2593.             {
  2594.                 if(PI[i][pCP] != 2)
  2595.                 {
  2596.                     PI[i][pCP] = 2;
  2597.                     SetPlayerCheckpoint(i,-1314.8594,495.7732,18.2344,3.0);
  2598.                     new str[56];
  2599.                     format(str,sizeof str,"Territorio HQ Exercito");
  2600.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2601.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2602.                 }
  2603.             }
  2604.             else if(PlayerBozo(i))
  2605.             {
  2606.                 if(PI[i][pCP] != 3)
  2607.                 {
  2608.                     PI[i][pCP] = 3;
  2609.                     SetPlayerCheckpoint(i,-2315.6755,198.0226,35.3984,3.0);
  2610.                     new str[56];
  2611.                     format(str,sizeof str,"Territorio HQ Bozo");
  2612.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2613.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2614.                 }
  2615.             }
  2616.             else if(PlayerFrango(i))
  2617.             {
  2618.                 if(PI[i][pCP] != 4)
  2619.                 {
  2620.                     PI[i][pCP] = 4;
  2621.                     SetPlayerCheckpoint(i,-2658.6428,276.3374,4.3359,3.0);
  2622.                     new str[56];
  2623.                     format(str,sizeof str,"Territorio HQ Frango");
  2624.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2625.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2626.                 }
  2627.             }
  2628.             else if(PlayerRifas(i))
  2629.             {
  2630.                 if(PI[i][pCP] != 5)
  2631.                 {
  2632.                     PI[i][pCP] = 5;
  2633.                     SetPlayerCheckpoint(i,-2087.0298,303.8562,41.1309,3.0);
  2634.                     new str[56];
  2635.                     format(str,sizeof str,"Territorio HQ Rifas");
  2636.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2637.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2638.                 }
  2639.             }
  2640.             else if(PlayerNang(i))
  2641.             {
  2642.                 if(PI[i][pCP] != 6)
  2643.                 {
  2644.                     PI[i][pCP] = 6;
  2645.                     SetPlayerCheckpoint(i,-1687.9135,1331.6653,17.2432,3.0);
  2646.                     new str[56];
  2647.                     format(str,sizeof str,"Territorio HQ Nang");
  2648.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2649.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2650.                 }
  2651.             }
  2652.             else if(PlayerTriads(i))
  2653.             {
  2654.                 if(PI[i][pCP] != 7)
  2655.                 {
  2656.                     PI[i][pCP] = 7;
  2657.                     SetPlayerCheckpoint(i,-2179.3279,609.3130,35.1641,3.0);
  2658.                     new str[56];
  2659.                     format(str,sizeof str,"Territorio HQ Triads");
  2660.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2661.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2662.                 }
  2663.             }
  2664.             else if(PlayerMotoqueiro(i))
  2665.             {
  2666.                 if(PI[i][pCP] != 8)
  2667.                 {
  2668.                     PI[i][pCP] = 8;
  2669.                     SetPlayerCheckpoint(i,-2520.8586,1216.2838,37.4283,3.0);
  2670.                     new str[56];
  2671.                     format(str,sizeof str,"Territorio HQ Motoqueiro");
  2672.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2673.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2674.                 }
  2675.             }
  2676.             else if(PlayerPlayBoy(i))
  2677.             {
  2678.                 if(PI[i][pCP] != 9)
  2679.                 {
  2680.                     PI[i][pCP] = 9;
  2681.                     SetPlayerCheckpoint(i,-2745.2581,-251.9947,7.1952,3.0);
  2682.                     new str[56];
  2683.                     format(str,sizeof str,"Territorio HQ PlayBoy");
  2684.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2685.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2686.                 }
  2687.             }
  2688.             else if(PlayerMendigo(i))
  2689.             {
  2690.                 if(PI[i][pCP] != 10)
  2691.                 {
  2692.                     PI[i][pCP] = 10;
  2693.                     SetPlayerCheckpoint(i,-2178.8064,-234.2019,36.5220,3.0);
  2694.                     new str[56];
  2695.                     format(str,sizeof str,"Territorio HQ Mendigo");
  2696.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2697.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2698.                 }
  2699.             }
  2700.             else
  2701.             {
  2702.                 if(PI[i][pCP] != 0)
  2703.                 {
  2704.                     DisablePlayerCheckpoint(i);
  2705.                     PI[i][pCP] = 0;
  2706.                     new str[56];
  2707.                     format(str,sizeof str,"Territorio Desconhecido");
  2708.                     TextDrawSetString(Text:Textodraw[i][2],str);
  2709.                     TextDrawShowForPlayer(i,Textodraw[i][2]);
  2710.                 }
  2711.             }  
  2712.         }
  2713.     }
  2714. }
  2715. forward ContandoBope(playerid);
  2716. public ContandoBope(playerid){
  2717.     new str[30];
  2718.     if(IsPlayerInRangeOfPoint(playerid,3.0,-1615.9286,685.1993,7.1875)){
  2719.         if(Contando[0] > 1){
  2720.             Contando[0] --;
  2721.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[0]);
  2722.             GameTextForPlayer(playerid,str,2000,5);
  2723.         }
  2724.         else{
  2725.             DominouGZ(0,PI[playerid][pTime]);
  2726.             GivePlayerMoneyEx(playerid,2000);
  2727.             KillTimer(Timer[0]);
  2728.             Dominando[0] = false;
  2729.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2730.             GivePlayerMoneyEx(playerid,2000);
  2731.         }
  2732.     }
  2733.     else{
  2734.         KillTimer(Timer[0]);
  2735.         Dominando[0] = false;
  2736.         GangZoneStopFlashForAll(GZ[0]);
  2737.     }
  2738. }
  2739. forward ContandoExercito(playerid);
  2740. public ContandoExercito(playerid){
  2741.     new str[15];
  2742.     if(IsPlayerInRangeOfPoint(playerid,3.0,-1314.8594,495.7732,18.2344)){
  2743.         if(Contando[1] > 1){
  2744.             Contando[1] --;
  2745.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[1]);
  2746.             GameTextForPlayer(playerid,str,2000,5);
  2747.         }
  2748.         else{
  2749.             DominouGZ(1,PI[playerid][pTime]);
  2750.             GivePlayerMoneyEx(playerid,2000);
  2751.             KillTimer(Timer[1]);
  2752.             Dominando[1] = false;
  2753.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2754.             GivePlayerMoneyEx(playerid,2000);
  2755.         }
  2756.     }
  2757.     else{
  2758.         KillTimer(Timer[1]);
  2759.         Dominando[1] = false;
  2760.         GangZoneStopFlashForAll(GZ[1]);
  2761.     }
  2762. }
  2763. forward ContandoBozo(playerid);
  2764. public ContandoBozo(playerid){
  2765.     new str[15];
  2766.     if(IsPlayerInRangeOfPoint(playerid,3.0,-2315.6755,198.0226,35.3984)){
  2767.         if(Contando[2] > 1){
  2768.             Contando[2] --;
  2769.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[2]);
  2770.             GameTextForPlayer(playerid,str,2000,5);
  2771.         }
  2772.         else{
  2773.             DominouGZ(2,PI[playerid][pTime]);
  2774.             GivePlayerMoneyEx(playerid,2000);
  2775.             KillTimer(Timer[2]);
  2776.             Dominando[2] = false;
  2777.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2778.             GivePlayerMoneyEx(playerid,2000);
  2779.         }
  2780.     }
  2781.     else{
  2782.         KillTimer(Timer[2]);
  2783.         Dominando[2] = false;
  2784.         GangZoneStopFlashForAll(GZ[2]);
  2785.     }
  2786. }
  2787. forward ContandoFrango(playerid);
  2788. public ContandoFrango(playerid){
  2789.     new str[15];
  2790.     if(IsPlayerInRangeOfPoint(playerid,3.0,-2658.6428,276.3374,4.3359)){
  2791.         if(Contando[3] > 1){
  2792.             Contando[3] --;
  2793.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[3]);
  2794.             GameTextForPlayer(playerid,str,2000,5);
  2795.         }
  2796.         else{
  2797.             DominouGZ(3,PI[playerid][pTime]);
  2798.             GivePlayerMoneyEx(playerid,2000);
  2799.             KillTimer(Timer[3]);
  2800.             Dominando[3] = false;
  2801.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2802.             GivePlayerMoneyEx(playerid,2000);
  2803.         }
  2804.     }
  2805.     else{
  2806.         KillTimer(Timer[3]);
  2807.         Dominando[3] = false;
  2808.         GangZoneStopFlashForAll(GZ[3]);
  2809.     }
  2810. }
  2811. forward ContandoRifas(playerid);
  2812. public ContandoRifas(playerid){
  2813.     new str[15];
  2814.     if(IsPlayerInRangeOfPoint(playerid,3.0,-2087.0298,303.8562,41.1309)){
  2815.         if(Contando[4] > 1){
  2816.             Contando[4] --;
  2817.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[4]);
  2818.             GameTextForPlayer(playerid,str,2000,5);
  2819.         }
  2820.         else{
  2821.             DominouGZ(4,PI[playerid][pTime]);
  2822.             GivePlayerMoneyEx(playerid,2000);
  2823.             KillTimer(Timer[4]);
  2824.             Dominando[4] = false;
  2825.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2826.             GivePlayerMoneyEx(playerid,2000);
  2827.         }
  2828.     }
  2829.     else{
  2830.         KillTimer(Timer[4]);
  2831.         Dominando[4] = false;
  2832.         GangZoneStopFlashForAll(GZ[4]);
  2833.     }
  2834. }
  2835. forward ContandoNang(playerid);
  2836. public ContandoNang(playerid){
  2837.     new str[15];
  2838.     if(IsPlayerInRangeOfPoint(playerid,3.0,-1687.9135,1331.6653,17.2432)){
  2839.         if(Contando[5] > 1){
  2840.             Contando[5] --;
  2841.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[5]);
  2842.             GameTextForPlayer(playerid,str,2000,5);
  2843.         }
  2844.         else{
  2845.             DominouGZ(5,PI[playerid][pTime]);
  2846.             GivePlayerMoneyEx(playerid,2000);
  2847.             KillTimer(Timer[5]);
  2848.             Dominando[5] = false;
  2849.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2850.             GivePlayerMoneyEx(playerid,2000);
  2851.         }
  2852.     }
  2853.     else{
  2854.         KillTimer(Timer[5]);
  2855.         Dominando[5] = false;
  2856.         GangZoneStopFlashForAll(GZ[5]);
  2857.     }
  2858. }
  2859. forward ContandoTriads(playerid);
  2860. public ContandoTriads(playerid){
  2861.     new str[15];
  2862.     if(IsPlayerInRangeOfPoint(playerid,3.0,-2179.3279,609.3130,35.1641)){
  2863.         if(Contando[6] > 1){
  2864.             Contando[6] --;
  2865.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[6]);
  2866.             GameTextForPlayer(playerid,str,2000,5);
  2867.         }
  2868.         else{
  2869.             DominouGZ(6,PI[playerid][pTime]);
  2870.             GivePlayerMoneyEx(playerid,2000);
  2871.             KillTimer(Timer[6]);
  2872.             Dominando[6] = false;
  2873.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2874.             GivePlayerMoneyEx(playerid,2000);
  2875.         }
  2876.     }
  2877.     else{
  2878.         KillTimer(Timer[6]);
  2879.         Dominando[6] = false;
  2880.         GangZoneStopFlashForAll(GZ[6]);
  2881.     }
  2882. }
  2883. forward ContandoMotoqueiro(playerid);
  2884. public ContandoMotoqueiro(playerid){
  2885.     new str[15];
  2886.     if(IsPlayerInRangeOfPoint(playerid,3.0,-2745.2581,-251.9947,7.1952)){
  2887.         if(Contando[7] > 1){
  2888.             Contando[7] --;
  2889.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[7]);
  2890.             GameTextForPlayer(playerid,str,2000,5);
  2891.         }
  2892.         else{
  2893.             DominouGZ(7,PI[playerid][pTime]);
  2894.             GivePlayerMoneyEx(playerid,2000);
  2895.             KillTimer(Timer[7]);
  2896.             Dominando[7] = false;
  2897.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2898.             GivePlayerMoneyEx(playerid,2000);
  2899.         }
  2900.     }
  2901.     else{
  2902.         KillTimer(Timer[7]);
  2903.         Dominando[7] = false;
  2904.         GangZoneStopFlashForAll(GZ[7]);
  2905.     }
  2906. }
  2907. forward ContandoPlayBoy(playerid);
  2908. public ContandoPlayBoy(playerid){
  2909.     new str[15];
  2910.     if(IsPlayerInRangeOfPoint(playerid,3.0,-1615.9286,685.1993,7.1875)){
  2911.         if(Contando[8] > 1){
  2912.             Contando[8] --;
  2913.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[8]);
  2914.             GameTextForPlayer(playerid,str,2000,5);
  2915.         }
  2916.         else{
  2917.             DominouGZ(8,PI[playerid][pTime]);
  2918.             GivePlayerMoneyEx(playerid,2000);
  2919.             KillTimer(Timer[8]);
  2920.             Dominando[8] = false;
  2921.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2922.             GivePlayerMoneyEx(playerid,2000);
  2923.         }
  2924.     }
  2925.     else{
  2926.         KillTimer(Timer[8]);
  2927.         Dominando[8] = false;
  2928.         GangZoneStopFlashForAll(GZ[8]);
  2929.     }
  2930. }
  2931. forward ContandoMendigo(playerid);
  2932. public ContandoMendigo(playerid){
  2933.     new str[15];
  2934.     if(IsPlayerInRangeOfPoint(playerid,3.0,-2178.8064,-234.2019,36.5220)){
  2935.         if(Contando[9] > 1){
  2936.             Contando[9] --;
  2937.             format(str,sizeof str,"~r~~n~~n~~n~%d",Contando[9]);
  2938.             GameTextForPlayer(playerid,str,2000,5);
  2939.         }
  2940.         else{
  2941.             DominouGZ(9,PI[playerid][pTime]);
  2942.             GivePlayerMoneyEx(playerid,2000);
  2943.             KillTimer(Timer[9]);
  2944.             Dominando[9] = false;
  2945.             GameTextForPlayer(playerid,"~g~~n~~n~~n~dominado",5000,5);
  2946.             GivePlayerMoneyEx(playerid,2000);
  2947.         }
  2948.     }
  2949.     else{
  2950.         KillTimer(Timer[9]);
  2951.         Dominando[9] = false;
  2952.         GangZoneStopFlashForAll(GZ[9]);
  2953.     }
  2954. }
  2955. stock DominandoGZ(g,time)
  2956. {
  2957.     new x[30];
  2958.     new area[30];
  2959.     switch(time)
  2960.     {
  2961.         case 1:GangZoneFlashForAll(GZ[g],COR_COP1),x = "BOPE";
  2962.         case 2:GangZoneFlashForAll(GZ[g],COR_EXE1),x = "EXERCITO";
  2963.         case 3:GangZoneFlashForAll(GZ[g],COR_BOZ1),x = "BOZO";
  2964.         case 4:GangZoneFlashForAll(GZ[g],COR_FRA1),x = "FRANGO";
  2965.         case 5:GangZoneFlashForAll(GZ[g],COR_RIF1),x = "RIFAS";
  2966.         case 6:GangZoneFlashForAll(GZ[g],COR_NAN1),x = "NANG";
  2967.         case 7:GangZoneFlashForAll(GZ[g],COR_TRI1),x = "TRIADS";
  2968.         case 8:GangZoneFlashForAll(GZ[g],COR_MOT1),x = "MOTOQUEIRO";
  2969.         case 9:GangZoneFlashForAll(GZ[g],COR_PLA1),x = "PLAYBOYS";
  2970.         case 10:GangZoneFlashForAll(GZ[g],COR_MEN1),x = "MENDIGOS";
  2971.     }
  2972.     switch(g)
  2973.     {
  2974.         case 0: area = "BOPE";
  2975.         case 1: area = "EXERCITO";
  2976.         case 2: area = "BOZO";
  2977.         case 3: area = "FRANGO";
  2978.         case 4: area = "RIFAS";
  2979.         case 5: area = "NANG";
  2980.         case 6: area = "TRIADS";
  2981.         case 7: area = "MOTOQUEIRO";
  2982.         case 8: area = "PLAYBOYS";
  2983.         case 9: area = "MENDIGOS";
  2984.     }
  2985.     new string[128];
  2986.     format(string,sizeof string,"{FFFF00}[GangZones] {FFFFFF}A gang {FFFF00}%s {FFFFFF}esta dominando a HQ dos {FFFF00}%s.",x,area);
  2987.     SendClientMessageToAll(-1,string);
  2988.     format(string,sizeof string,"{FFFF00}A gang %s esta dominando um território seu.",x);
  2989.     Radio(Dono[g],string);
  2990. }
  2991. stock Radio(org,msg[])
  2992. {
  2993.     for(new i = 0;i < GetMaxPlayers();i++)
  2994.     {
  2995.         if(PI[i][pTime] == org)
  2996.         {
  2997.             SendClientMessage(i,-1,msg);
  2998.         }
  2999.     }
  3000. }
  3001. stock DominouGZ(g,equipe)
  3002. {
  3003.     new x[15];
  3004.     new area[15];
  3005.     switch(equipe)
  3006.     {
  3007.         case 1:GangZoneShowForAll(GZ[g],COR_COP1),x = "BOPE";
  3008.         case 2:GangZoneShowForAll(GZ[g],COR_EXE1),x = "EXERCITO";
  3009.         case 3:GangZoneShowForAll(GZ[g],COR_BOZ1),x = "BOZO";
  3010.         case 4:GangZoneShowForAll(GZ[g],COR_FRA1),x = "FRANGO";
  3011.         case 5:GangZoneShowForAll(GZ[g],COR_RIF1),x = "RIFAS";
  3012.         case 6:GangZoneShowForAll(GZ[g],COR_NAN1),x = "NANG";
  3013.         case 7:GangZoneShowForAll(GZ[g],COR_TRI1),x = "TRIADS";
  3014.         case 8:GangZoneShowForAll(GZ[g],COR_MOT1),x = "MOTOQUEIRO";
  3015.         case 9:GangZoneShowForAll(GZ[g],COR_PLA1),x = "PLAYBOYS";
  3016.         case 10:GangZoneShowForAll(GZ[g],COR_MEN1),x = "MENDIGOS";
  3017.     }
  3018.     switch(g)
  3019.     {
  3020.         case 0: area = "BOPE";
  3021.         case 1: area = "EXERCITO";
  3022.         case 2: area = "BOZO";
  3023.         case 3: area = "FRANGO";
  3024.         case 4: area = "RIFAS";
  3025.         case 5: area = "NANG";
  3026.         case 6: area = "TRIADS";
  3027.         case 7: area = "MOTOQUEIRO";
  3028.         case 8: area = "PLAYBOYS";
  3029.         case 9: area = "MENDIGOS";
  3030.     }
  3031.     new string[128];
  3032.     format(string,sizeof string,"{FFFF00}[GangZones] {FFFFFF}A gang {FFFF00}%s {FFFFFF}dominou a HQ dos {FFFF00}%s.",x,area);
  3033.     SendClientMessageToAll(-1,string);
  3034.     format(string,sizeof string,"{FFFF00}A gang %s dominou um território seu.",x);
  3035.     Radio(Dono[g],string);
  3036.     Dono[g] = equipe;
  3037. }
  3038. stock GetXYInFrontOfVehicle(vehicleid, &Float:x, &Float:y, Float:distance)
  3039. {//Thanks for who made this function.
  3040.     new Float:a;
  3041.     GetVehiclePos(vehicleid, x, y, a);
  3042.     GetVehicleZAngle(vehicleid, a);
  3043.     x += (distance * floatsin(-a, degrees));
  3044.     y += (distance * floatcos(-a, degrees));
  3045. }
  3046. forward Prendeu(playerid);
  3047. public Prendeu(playerid){
  3048.     if(PI[playerid][pPreso] > 1){
  3049.         new str[24];
  3050.         PI[playerid][pPreso] --;
  3051.         format(str,sizeof str,"~r~Tempo: ~w~%d",PI[playerid][pPreso]);
  3052.         GameTextForPlayer(playerid,str,2000,5);
  3053.     }
  3054.     else{
  3055.         GameTextForPlayer(playerid,"~b~voce esta livre!",2000,5);
  3056.         PI[playerid][pPreso] = 0;
  3057.         SpawnPlayerEx(playerid);
  3058.         KillTimer(Timerr[playerid]);
  3059.     }
  3060. }
  3061. stock UsouComando(playerid,comando[]){
  3062.     new str[128];
  3063.     format(str,sizeof str,"{90EE90}[MIB INFORMA] O player {4876FF}%s {90EE90}usou o comando {4876FF}/%s",Nome(playerid),comando);
  3064.     SendClientMessageToAll(-1,str);
  3065.     PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  3066.     return true;
  3067. }
  3068. forward ComecaX1();
  3069. public ComecaX1()
  3070. {
  3071.     new str[10];
  3072.     if(ContandoX1 > 0){
  3073.         ContandoX1 --;
  3074.         format(str,sizeof str,"~r~%d",ContandoX1);
  3075.         for(new i = 0;i < GetMaxPlayers();i++)
  3076.         {
  3077.             if(FoiX1[i] == true){
  3078.                 GameTextForPlayer(i,str,2000,5);
  3079.             }
  3080.         }
  3081.     }
  3082.     else{
  3083.         KillTimer(Tx1);
  3084.         for(new i = 0;i < GetMaxPlayers();i++)
  3085.         {
  3086.             if(FoiX1[i] == true){
  3087.                 TogglePlayerControllable(i,1);
  3088.                 GameTextForPlayer(i,"~g~fight",5000,5);
  3089.             }
  3090.         }
  3091.     }
  3092. }
  3093. forward EsperandoComecar(playerid);
  3094. public EsperandoComecar(playerid)
  3095. {
  3096.     Aviso(playerid,"Sem jogadores suficientes para começar uma disputa..");
  3097.     VenceuX1(playerid,999);
  3098. }
  3099. stock VerificarArquivo(playerid){
  3100.     new arq[24];
  3101.     new n[10];
  3102.     new s[10];
  3103.     new n1[10];
  3104.     new s1[10];
  3105.     format(arq,sizeof arq,"MortesFix.ini");
  3106.     if(!DOF2_FileExists(arq)) DOF2_CreateFile(arq),DOF2_SaveFile();
  3107.     else{
  3108.         for(new i = 1;i < 11;i++){
  3109.             format(n,sizeof n,"Rank%d",i);
  3110.             format(s,sizeof s,"Nome%d",i);
  3111.             if(PI[playerid][pMatou] > DOF2_GetInt(arq,n)){
  3112.                 format(n1,sizeof n1,"Rank%d",i+1);
  3113.                 format(s1,sizeof s1,"Nome%d",i+1);
  3114.                 if(strcmp(Nome(playerid), DOF2_GetString(arq,s), true) == 0){
  3115.                     DOF2_SetInt(arq,n,PI[playerid][pMatou]);
  3116.                 }
  3117.                 else{
  3118.                     DOF2_SetInt(arq,n1,DOF2_GetInt(arq,n));
  3119.                     DOF2_SetString(arq,s1,DOF2_GetString(arq,s));
  3120.                     DOF2_SetInt(arq,n,PI[playerid][pMatou]);
  3121.                     DOF2_SetString(arq,s,Nome(playerid));
  3122.                     new str[160];
  3123.                     format(str,sizeof str,"{FF0000}[RANK] {FFFFFF}O player {FF0000}%s {FFFFFF}agora ocupa a posição {FF0000}%d {FFFFFF}no ranking de mortes.{FF0000}(/rank)",Nome(playerid),i);
  3124.                     SendClientMessageToAll(-1,str);
  3125.                     DOF2_SaveFile();
  3126.                 }
  3127.                 break;
  3128.             }
  3129.         }
  3130.     }
  3131. }
  3132. stock VenceuX1(venceu,perdeu){
  3133.     xx1 = 0;
  3134.     FoiX1[venceu] = false;
  3135.     KillTimer(Tx1);
  3136.     if(perdeu < 999){
  3137.         FoiX1[perdeu] = false;
  3138.         new str[128],ha[12];
  3139.         new Float:h;
  3140.         GetPlayerArmour(venceu,h);
  3141.         PI[venceu][pMatouX1] ++;
  3142.         PI[perdeu][pMorreuX1] ++;
  3143.         PI[venceu][pMatou] ++;
  3144.         PI[perdeu][pMorreu] ++;
  3145.         VerificarArquivo(venceu);
  3146.         if( h == 100){
  3147.             ha = "PERFECT!!";
  3148.         }
  3149.         format(str,sizeof str,"{FF7F50}O player %s venceu a disputa de x1 contra o player %s. {00FF00}%s",Nome(venceu),Nome(perdeu),ha);
  3150.         SendClientMessageToAll(-1,str);
  3151.         PlayAudioStreamForPlayer(venceu,"https://dl.dropbox.com/s/saayilmqq21qbbs/Announcer%20Flawless%20Victory.mp3");
  3152.         GivePlayerMoneyEx(venceu,3000);
  3153.     }
  3154.     else{
  3155.         SendClientMessageToAll(-1,"Não houve jogadores suficientes na disputa do x1.");
  3156.     }
  3157.     SetTimerEx("TSpawn",5000,false,"i",venceu);
  3158.     return true;
  3159. }
  3160. stock SetPlayerPosEx(playerid,Float:ix,Float:iy,Float:iz)
  3161. {
  3162.     if(IsPlayerInAnyVehicle(playerid)){
  3163.         SetVehiclePos(GetPlayerVehicleID(playerid),ix,iy,iz);
  3164.     }
  3165.     else{
  3166.         SetPlayerPos(playerid,ix,iy,iz);
  3167.     }
  3168. }
  3169. forward MensagensMIB();
  3170. public MensagensMIB()
  3171. {
  3172.     new string[128];
  3173.     new random1 = random(sizeof(MsgMIB));
  3174.     new random2 = random(sizeof(CoresMsg));
  3175.     format(string, sizeof(string), "%s", MsgMIB[random1]);
  3176.     SendClientMessageToAll(CoresMsg[random2],string);
  3177. }
  3178. //=====================================================================================================
  3179. forward TSpawn(playerid);
  3180. public TSpawn(playerid)
  3181. {
  3182.     SpawnPlayerEx(playerid);
  3183. }
  3184. stock IsPlayerAimingBodyPart(playerid, bodypart)
  3185. {
  3186.     // Get the camera's positions
  3187.     new Float:x, Float:y, Float:z;
  3188.     new Float:vx, Float:vy, Float:vz;
  3189.     new Float:cx, Float:cy, Float:cz;
  3190.     GetPlayerCameraFrontVector(playerid, vx, vy, vz);
  3191.     GetPlayerCameraPos(playerid, cx, cy, cz);
  3192.  
  3193.     // Check if the player is aiming in a certain distance
  3194.     for(new Float:d; d < MAX_DISTANCE_UNIT; d += 0.5)
  3195.     {
  3196.         x = vx*d+cx;
  3197.         y = vy*d+cy;
  3198.         z = vz*d+cz;
  3199.         new Float:dist = floatsqroot((x-cx)*(x-cx)+(y-cy)*(y-cy));
  3200.         new Float:offset;
  3201.         switch (GetPlayerWeapon(playerid))
  3202.         {
  3203.             case 24, 29, 22, 23, 25, 26, 27, 28, 32: offset = 0.1122047500310059125919013005129;
  3204.             case 30, 31: offset = 0.07867820613690007867820613690008;
  3205.             case 33, 34: offset = 0.0;
  3206.         }
  3207.         new Float:height;
  3208.         if (z > cz) height = z-cz;
  3209.         else height = cz-z;
  3210.         offset *= dist;
  3211.         height /= dist;
  3212.         new Float:part;
  3213.         if (bodypart == BODY_PART_HEAD) part = -0.4;
  3214.         else if (bodypart == BODY_PART_TORSO) part = 0.3;
  3215.         else if (bodypart == BODY_PART_LEGS) part = 1.0;
  3216.         z = z+offset-height+part;
  3217.         for(new i, m = GetMaxPlayers(); i < m; i++)
  3218.         {
  3219.             if (!IsPlayerConnected(i)) continue;
  3220.             if (playerid == i) continue;
  3221.             if (IsPlayerInRangeOfPoint(i, 0.5, x, y, z-0.5)) return 1;
  3222.         }
  3223.     }
  3224.     return 0;
  3225. }
  3226.  
  3227. /*
  3228.                                             ---[IsPlayerAimingTargetBodyPart]---
  3229.             »playerid: the player
  3230.             »targetid: the target
  3231.             »bodypart: the body part you want to check
  3232.             *Return: 1 if true, 0 if false
  3233.         *-------------------------------------------------------------------*
  3234.         | Checks if the player is aiming at target's specific body part.    |
  3235.         *-------------------------------------------------------------------*
  3236. */
  3237.  
  3238. stock IsPlayerAimingTargetBodyPart(playerid, targetid, bodypart)
  3239. {
  3240.     // Get the camera's positions
  3241.     new Float:x, Float:y, Float:z;
  3242.     new Float:vx, Float:vy, Float:vz;
  3243.     new Float:cx, Float:cy, Float:cz;
  3244.     GetPlayerCameraFrontVector(playerid, vx, vy, vz);
  3245.     GetPlayerCameraPos(playerid, cx, cy, cz);
  3246.  
  3247.     // Check if the player is aiming in a certain distance
  3248.     new Float:px, Float:py, Float:pz;
  3249.     GetPlayerPos(targetid, px, py, pz);
  3250.     new Float:dist = floatsqroot(((cx-px)*(cx-px)) + ((cy-py)*(cy-py)) + ((cz-pz)*(cz-pz)));
  3251.     x = vx*dist+cx;
  3252.     y = vy*dist+cy;
  3253.     z = vz*dist+cz;
  3254.     new Float:offset;
  3255.     switch (GetPlayerWeapon(playerid))
  3256.     {
  3257.         case 24, 29, 22, 23, 25, 26, 27, 28, 32: offset = 0.1122047500310059125919013005129;
  3258.         case 30, 31: offset = 0.07867820613690007867820613690008;
  3259.         case 33, 34: offset = 0.0;
  3260.     }
  3261.     new Float:height;
  3262.     if (z > cz) height = z-cz;
  3263.     else height = cz-z;
  3264.     offset *= dist;
  3265.     height /= dist;
  3266.     new Float:part;
  3267.     if (bodypart == BODY_PART_HEAD) part = -0.4;
  3268.     else if (bodypart == BODY_PART_TORSO) part = 0.3;
  3269.     else if (bodypart == BODY_PART_LEGS) part = 1.0;
  3270.     z = z+offset-height+part;
  3271.     if (IsPlayerInRangeOfPoint(targetid, 0.5, x, y, z-0.5)) return 1;
  3272.  
  3273.     return 0;
  3274. }
  3275.  
  3276.  
  3277. /*======================================================================================================*
  3278. * This Weapon-Drop Filterscript is made by Jeffry!                                                      *
  3279. *                                                                                                       *
  3280. *                                                                                                       *
  3281. * Made in April 2011.                                                                                   *
  3282. *                                                                                                       *
  3283. * Your Rights:                                                                                          *
  3284. *                                                                                                       *
  3285. * -You are allowed to modify this Filterscript, aslong as you DO NOT remove credits or re-upload it.    *
  3286. *                                                                                                       *
  3287. * -You are NOT allowed to re-upload this Filterscript.                                                  *
  3288. * -You are NOT allowed to claim this as your own.                                                       *
  3289. * -You are NOT allowed to remove any credits.                                                           *
  3290. *                                                                                                       *
  3291. * Thank you.                                                                                            *
  3292. * Have fun. I would be happy if you give me /credits.  :D                                               *
  3293. *                                                                                                       *
  3294.  
  3295. //=============The Functions====================================================*/
  3296. stock OnWeaponDropInit()
  3297. {
  3298.     for(new i=0; i<MAX_PLAYERS; i++)
  3299.     {
  3300.         for(new a=0; a<14; a++)
  3301.         {
  3302.             WeaponDrop[i][a] = -1;
  3303.             WeaponData[i][a][0] = -1;
  3304.             WeaponData[i][a][1] = -1;
  3305.         }
  3306.         WeaponTimer[i] = -1;
  3307.     }
  3308.     print("\n--------------------------------------");
  3309.     print("[FS] WeaponDrop v1.0 by Jeffry loaded!");
  3310.     print("--------------------------------------\n");
  3311.     return 1;
  3312. }
  3313.  
  3314. stock OnWeaponDropPickup(playerid, pickupid)
  3315. {
  3316.     for(new i=0; i<MAX_PLAYERS; i++)
  3317.     {
  3318.         for(new a=0; a<13; a++)
  3319.         {
  3320.             if(WeaponDrop[i][a] == pickupid)
  3321.             {
  3322.                 WeaponDrop[i][a] = -1;
  3323.                 DestroyPickup(pickupid);
  3324.                 GivePlayerWeapon(playerid, WeaponData[i][a][0], WeaponData[i][a][1]);
  3325.                 WeaponData[i][a][0] = -1;
  3326.                 WeaponData[i][a][1] = -1;
  3327.             }
  3328.         }
  3329.         if(WeaponDrop[i][13] == pickupid)
  3330.         {
  3331.             WeaponDrop[i][13] = -1;
  3332.             DestroyPickup(pickupid);
  3333.             GivePlayerMoney(playerid, WeaponData[i][13][0]);
  3334.             WeaponData[i][13][0] = -1;
  3335.             WeaponData[i][13][1] = -1;
  3336.         }
  3337.     }
  3338.  
  3339.     return 1;
  3340. }
  3341.  
  3342. stock OnWeaponDrop(playerid)
  3343. {
  3344.     RemovePickups(playerid);
  3345.     new Float:x, Float:y, Float:z, dropped;
  3346.     GetPlayerPos(playerid,x,y,z);
  3347.     for(new i=0; i<13; i++)
  3348.     {
  3349.         new weapon, ammo;
  3350.         GetPlayerWeaponData(playerid, i, weapon, ammo);
  3351.         if((ammo > 0 || weapon == 1) && weapon != 0)
  3352.         {
  3353.             new model = GetModel(weapon);
  3354.             if(model != -1)
  3355.             {
  3356.                 WeaponData[playerid][i][0] = weapon;
  3357.                 WeaponData[playerid][i][1] = ammo;
  3358.                 dropped++;
  3359.             }
  3360.         }
  3361.     }
  3362.     if(BagMoney != 0)
  3363.     {
  3364.         if(BagMoney == -1 && GetPlayerMoney(playerid) > 0)
  3365.         {
  3366.             WeaponData[playerid][13][0] = GetPlayerMoney(playerid);
  3367.             if(BagMode) GivePlayerMoney(playerid, -WeaponData[playerid][13][0]);
  3368.             WeaponDrop[playerid][13] = CreatePickup(1550, 1, x, y, z);
  3369.             if(dropped <= 0) dropped=1;
  3370.         }
  3371.         if(BagMoney > 0)
  3372.         {
  3373.             WeaponData[playerid][13][0] = BagMoney;
  3374.             if(BagMode) GivePlayerMoney(playerid, -WeaponData[playerid][13][0]);
  3375.             WeaponDrop[playerid][13] = CreatePickup(1550, 1, x, y, z);
  3376.             if(dropped <= 0) dropped=1;
  3377.         }
  3378.     }
  3379.     if(dropped > 0)
  3380.     {
  3381.         new radius;
  3382.         if(dropped < 3) radius = 1;
  3383.         if(dropped < 6) radius = 2;             /*If you want another radius, change it here.*/
  3384.         if(dropped < 9) radius = 3;
  3385.         if(dropped > 8) radius = 4;
  3386.         new Float:degree, Float:tmp;
  3387.         degree = 360.0 / (float(dropped));
  3388.         tmp = degree;
  3389.         if(WeaponTimer[playerid] != -1) KillTimer(WeaponTimer[playerid]);
  3390.         WeaponTimer[playerid] = SetTimerEx("RemovePickups", WEAPON_RESPAWN_TIME*1000, 0, "d", playerid);
  3391.         for(new i=0; i<13; i++)
  3392.         {
  3393.             if((WeaponData[playerid][i][1] > 0 || WeaponData[playerid][i][0] == 1) && WeaponData[playerid][i][0] > 0)
  3394.             {
  3395.                 new model = GetModel(WeaponData[playerid][i][0]);
  3396.                 if(model != -1)
  3397.                 {
  3398.                     WeaponDrop[playerid][i] = CreatePickup(model, 1, x+(floatsin(degree, degrees)*radius), y+(floatcos(degree, degrees)*radius), z);
  3399.                     degree = degree + tmp;
  3400.                 }
  3401.             }
  3402.         }
  3403.     }
  3404.     return 1;
  3405. }
  3406.  
  3407. stock GetModel(weaponid)
  3408. {
  3409.     for(new i=0; i<sizeof(ForbiddenWeapons); i++)
  3410.     {
  3411.         if(weaponid == ForbiddenWeapons[i])
  3412.         {
  3413.             return -1;
  3414.         }
  3415.     }
  3416.     switch(weaponid)
  3417.     {
  3418.         case 1: return 331;
  3419.         case 2: return 333;
  3420.         case 3: return 334;
  3421.         case 4: return 335;
  3422.         case 5: return 336;
  3423.         case 6: return 337;
  3424.         case 7: return 338;
  3425.         case 8: return 339;
  3426.         case 9: return 341;
  3427.         case 10: return 321;
  3428.         case 11: return 322;
  3429.         case 12: return 323;
  3430.         case 13: return 324;
  3431.         case 14: return 325;
  3432.         case 15: return 326;
  3433.         case 16: return 342;
  3434.         case 17: return 343;
  3435.         case 18: return 344;
  3436.         case 22: return 346;
  3437.         case 23: return 347;
  3438.         case 24: return 348;
  3439.         case 25: return 349;
  3440.         case 26: return 350;
  3441.         case 27: return 351;
  3442.         case 28: return 352;
  3443.         case 29: return 353;
  3444.         case 30: return 355;
  3445.         case 31: return 356;
  3446.         case 32: return 372;
  3447.         case 33: return 357;
  3448.         case 34: return 358;
  3449.         case 35: return 359;
  3450.         case 36: return 360;
  3451.         case 37: return 361;
  3452.         case 38: return 362;
  3453.         case 39: return 363;
  3454.         case 40: return 364;
  3455.         case 41: return 365;
  3456.         case 42: return 366;
  3457.         case 43: return 367;
  3458.         case 44: return 368;
  3459.         case 45: return 369;
  3460.         case 46: return 371;
  3461.         default: return -1;
  3462.     }
  3463.     return -1;
  3464. }
  3465.  
  3466. forward RemovePickups(playerid);
  3467. public RemovePickups(playerid)
  3468. {
  3469.     if(WeaponTimer[playerid] != -1) KillTimer(WeaponTimer[playerid]);
  3470.     WeaponTimer[playerid] = -1;
  3471.     for(new a=0; a<14; a++)
  3472.     {
  3473.         if(WeaponDrop[playerid][a] != -1)
  3474.         {
  3475.             DestroyPickup(WeaponDrop[playerid][a]);
  3476.             WeaponDrop[playerid][a] = -1;
  3477.             WeaponData[playerid][a][0] = -1;
  3478.             WeaponData[playerid][a][1] = -1;
  3479.         }
  3480.     }
  3481.     return 1;
  3482. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement