Advertisement
Guest User

Samp: GM Duelo de times By Guuh

a guest
Mar 21st, 2012
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 49.46 KB | None | 0 0
  1. //==============================[Includes]======================================
  2. #include <  a_samp  >
  3. #include <  Dini    >
  4. #include <  foreach >
  5. #include <  zcmd    >
  6. #include <  sscanf2 >
  7. //==============================[Defines]=======================================
  8. //[Dialogos]
  9. #define REGISTRO    1
  10. #define LOGIN       2
  11. #define CREDITOS    3
  12. //[Cores]
  13. #define CorVagos        0xE8E300AA  // Amarelo
  14. #define CorBallas       0x7E0C97AA  // Roxo
  15. #define CorAztecas      0x0068E1AA  // Azul
  16. #define CorGroove       0x1A8600AA  // Verde
  17. //[Salvamentos]
  18. #define CONTAS "Contas/%s.ini"
  19. #define BANIDOS "Banidos/%s.ini"
  20. #define LOGS "Logs/"
  21. //[Creditos do Gamemode]
  22. #define ScripterGM "Gustavo_Guerino"
  23. #define Scripter2GM "RedTube_xD"
  24. #define Scripter3GM "Ninguem"
  25. #define MapperGM "Ninguem"
  26. #define ResponsavelGM "Diego"
  27. //[Mensagens principais]
  28. #define  ADMININVALIDO "{5F6264}[Erro >>] {F60000}Você não tem autorização para usar este comando!"
  29. //=================================[Pragmas]====================================
  30.  
  31. //===============================[New's]========================================
  32. //[Foreash]
  33.  
  34. //[Text Draws]
  35. new Text:InfosPlayer[MAX_PLAYERS];
  36. new Text:LogoServer;
  37. new Text:velo[MAX_PLAYERS];
  38. //[Outros]
  39. new String[150], StringDialogos[400];
  40. new PrimeiroSpawn[MAX_PLAYERS];
  41. enum pInfo
  42. {
  43.     Level,
  44.     Matou,
  45.     Morreu,
  46.     Admin,
  47.     Time,
  48.     Titulo
  49. };
  50. new Info[MAX_PLAYERS][pInfo];
  51. new Vagos[28], Groove[28], Ballas[28], Aztecas[28];
  52. new GZAztecas, GZVagos, GZBallas, GZGroove;
  53. new Ano, Mes, Dia, Hora, Minuto, Segundo;
  54. new MensagensRandomicas[4][128] = /*ao colocar as mensagens substitua o [4] pelo número de mensagens. que vocês colocou*/
  55. {
  56.     "{F66D00}[Mensagem >>]{959399} Adicione nosso ip aos favoritos: 127.0.0.1",
  57.     "{F66D00}[Mensagem >>]{959399} Nossa equipe esta fazendo o melhor por você!",
  58.     "{F66D00}[Mensagem >>]{959399} Aqui não permitimos hacks ou qualquer derivado!",
  59.     "{F66D00}[Mensagem >>]{959399} Mesmo sendo servidor de DM é proibido DB" //Lembre-se que a última mensagem não deve conter ','
  60. };
  61. new NomeCarro[212][] =
  62. {
  63.     "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana",
  64.     "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat",
  65.     "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife",
  66.     "Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo",
  67.     "Seasparrow", "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair",
  68.     "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
  69.     "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito",
  70.     "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring",
  71.     "Sandking", "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B",
  72.     "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster","Stunt",  "Tanker",
  73.     "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  74.     "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak",
  75.     "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck LA", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit",
  76.     "Utility", "Nevada", "Yosemite", "Windsor", "Monster A", "Monster B", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance",
  77.     "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway",
  78.     "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog",
  79.     "Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
  80.     "Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A",
  81.     "Luggage Trailer B", "Stairs", "BoxVille", "Tiller", "Utility Trailer"
  82. };
  83.  
  84. //==========================[Forwards]==========================================
  85. forward ChecarRank(killerid);
  86. forward PularLinhas(quantidade, playerid);
  87. forward MensagemAdmins(COR, const Mensagem[]);
  88. forward SpawnKill(id);
  89. forward Velocimetro();
  90. forward Mensagens();
  91.  
  92. main()
  93. {
  94.     print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
  95.     print("------------------------------------------------------------");
  96.     print("|MM       MM    MM   MM     AAAAA   TTTTT    AAAAA         |");
  97.     print("|M M     M M    M MMM M     A   A     T      A   A         |");
  98.     print("|M  M   M  M    M  M  M     AAAAA     T      AAAAA         |");
  99.     print("|M   M M   M    M     M     A   A     T      A   A         |");
  100.     print("|M    M    M AAAAA  TTTTT  AAAAA                        |");
  101.     print("|M         M A   A    T    A   A  Projeto feito por:|");
  102.     print("|M         M AAAAA    T    AAAAA  - Gustavo Guerino |");
  103.     print("|M         M A   A    T    A   A  - Marcelo Ferreira|");
  104.     print("------------------------------------------------------------");
  105. }
  106. public Mensagens()
  107. {
  108.     SendClientMessageToAll(-1,MensagensRandomicas[random(sizeof(MensagensRandomicas))]);
  109.     return 1;
  110. }
  111. public OnPlayerStateChange(playerid, newstate, oldstate)
  112. {
  113.     new veiculo;
  114.     veiculo = GetPlayerVehicleID(playerid);
  115.     if(newstate == PLAYER_STATE_DRIVER)
  116.     {
  117.         for (new carro = 0; carro != 28; ++carro)
  118.         {
  119.             if(veiculo == Vagos[carro] )
  120.             {
  121.                 if(Info[playerid][Time] != 1)
  122.                 {
  123.                     SendClientMessage(playerid,-1,"{5F6264}[Atenção >>] {F60000}Este carro pertence aos Vagos!");
  124.                     RemovePlayerFromVehicleEx(playerid);
  125.                 }
  126.             }
  127.             else if(veiculo == Ballas[carro])
  128.             {
  129.                 if(Info[playerid][Time] != 0)
  130.                 {
  131.                     SendClientMessage(playerid,-1,"{5F6264}[Atenção >>] {F60000}Este carro pertence aos Ballas!");
  132.                     RemovePlayerFromVehicleEx(playerid);
  133.                 }
  134.             }
  135.             else if(veiculo == Groove[carro])
  136.             {
  137.                 if(Info[playerid][Time] != 2)
  138.                 {
  139.                     SendClientMessage(playerid,-1,"{5F6264}[Atenção >>] {F60000}Este carro pertence aos Groove!");
  140.                     RemovePlayerFromVehicleEx(playerid);
  141.                 }
  142.             }
  143.             else if(veiculo == Aztecas[carro])
  144.             {
  145.                 if(Info[playerid][Time] != 3)
  146.                 {
  147.                     SendClientMessage(playerid,-1,"{5F6264}[Atenção >>] {F60000}Este carro pertence aos Aztecas!");
  148.                     RemovePlayerFromVehicleEx(playerid);
  149.                 }
  150.             }
  151.         }
  152.     }
  153.     return 1;
  154. }
  155. stock RemovePlayerFromVehicleEx(playerid)
  156. {
  157.     RemovePlayerFromVehicle(playerid);
  158.     TogglePlayerControllable(playerid, 1);
  159. }
  160. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  161. {
  162.     if(!success) return SendClientMessage(playerid,-1,"Comando Nao Reconhecido.");//quando o comando nao existe ou nao e executado com sucesso returna a mensagem
  163.     return 1;
  164. }
  165. public OnPlayerSpawn(playerid)
  166. {
  167.     switch(Info[playerid][Time])
  168.     {
  169.         case 0://Balas  // Posição, Vida, Colete e armas deles
  170.         {
  171.             SetPlayerHealth(playerid, 100.0);
  172.             SetPlayerArmour(playerid, 100.0);
  173.             ArmasBasicas(playerid);
  174.             SetPlayerPos(playerid,1150.6455,-1180.9176,32.0275);
  175.         }
  176.         case 1://Vagos  // Posição, Vida, Colete e armas deles
  177.         {
  178.             SetPlayerHealth(playerid, 100.0);
  179.             SetPlayerArmour(playerid, 100.0);
  180.             ArmasBasicas(playerid);
  181.             SetPlayerPos(playerid,2266.8694,-1096.7681,42.6484);
  182.         }
  183.         case 2://Groove // Posição, Vida, Colete e armas deles
  184.         {
  185.             SetPlayerHealth(playerid, 100.0);
  186.             SetPlayerArmour(playerid, 100.0);
  187.             ArmasBasicas(playerid);
  188.             SetPlayerPos(playerid,2519.4255,-1678.6809,14.7228);
  189.         }
  190.         case 3://Aztecas    // Posição, Vida, Colete e armas deles
  191.         {
  192.             SetPlayerHealth(playerid, 100.0);
  193.             SetPlayerArmour(playerid, 100.0);
  194.             ArmasBasicas(playerid);
  195.             SetPlayerPos(playerid,1876.0376,-2020.8409,13.5391);
  196.         }
  197.     }
  198.     DarSkils(playerid);
  199.     PularLinhas(50, playerid);
  200.     if(PrimeiroSpawn[playerid] == 0)
  201.     {
  202.         PrimeiroSpawn[playerid] = 1;
  203.         SendClientMessage(playerid,0x3F1583AA,"{979C9C}[Mensagem >>] Bem vindo ao {E8F600}Brasil {8CE000}Mata{F6F6F6}-{0072F6}Mata {F6F6F6}2012");
  204.         SendClientMessage(playerid,0x3F1583AA,"{E88E00}Caso tenha alguma duvida sobre nosso servidor contate um admin online!, {E80000}Nossa equipe:");
  205.         MostrarCreditos(2, playerid);
  206.     }
  207.     SetPlayerHealth(playerid, 9999);
  208.     SetTimerEx("SpawnKill", 15000, false, "i", playerid);
  209.     GameTextForPlayer(playerid, "~g~Ant-Spawn Kill ~y~ativado ~w~por ~r~15 ~w~segundos", 5000, 1);
  210.     return 1;
  211. }
  212. public SpawnKill(id)
  213. {
  214.     SendClientMessage(id,0x3F1583AA,"{7F7A73}[Ant-Spawn Kill >>] {F60000}15 segundos se passaram e agora você pode ser morto!");
  215.     SetPlayerHealth(id, 100);
  216.     return 1;
  217. }
  218. public OnPlayerText(playerid, text[])
  219. {//GetPlayerColor(playerid)
  220.     if(text[0] == '!')
  221.     {
  222.         foreach (Player, i)
  223.         {
  224.             if(Info[i][Time] == Info[playerid][Time])
  225.             {
  226.                 strdel(text, 0, 1);
  227.                 format(String, sizeof (String), "..:: Time: %s - %s diz: {C8C8DE}%s ::..", NomeTime(Info[playerid][Time]), PlayerName(playerid), text);
  228.                 SendClientMessage(i,GetPlayerColor(playerid), String);
  229.             }
  230.         }
  231.         return 0;
  232.     }
  233.     format(String, sizeof (String), "[%d]%s diz: {C8C8DE}%s", playerid, PlayerName(playerid), text);
  234.     SendClientMessageToAll(GetPlayerColor(playerid), String);
  235.     return 0;
  236. }
  237. public OnGameModeInit()
  238. {
  239.     UsePlayerPedAnims();
  240.  
  241.     SetGameModeText("Mata-Mata 2012");
  242.     SendRconCommand("hostname [BR] Mata-Mata [2012]");
  243.     //Ballas
  244.     AddPlayerClass(103, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  245.     //Vagos
  246.     AddPlayerClass(110, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  247.     //Groove
  248.     AddPlayerClass(105, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  249.     //Aztecas
  250.     AddPlayerClass(115, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  251.     //Text Draws variadas ======================================================
  252.     LogoServer = TextDrawCreate(2.000000, 430.000000, "~y~Brasil~g~ Mata~w~-~b~Mata ~w~ [2012]");
  253.     TextDrawBackgroundColor(LogoServer, 255);
  254.     TextDrawFont(LogoServer, 3);
  255.     TextDrawLetterSize(LogoServer, 0.460000, 1.799999);
  256.     TextDrawColor(LogoServer, -1);
  257.     TextDrawSetOutline(LogoServer, 1);
  258.     TextDrawSetProportional(LogoServer, 1);
  259.     TextDrawUseBox(LogoServer, 1);
  260.     TextDrawBoxColor(LogoServer, 16843108);
  261.     TextDrawTextSize(LogoServer, 228.000000, 0.000000);
  262.     //Gang Zones ===============================================================
  263.     GZAztecas = GangZoneCreate(1806.7534,-2011.6721, 1960.0278,-2062.0476);
  264.     GZVagos = GangZoneCreate(2236.2129,-1106.0194, 2300.6370,-1133.2113);
  265.     GZBallas = GangZoneCreate(1081.4655,-1122.3550, 1124.0198,-1295.3240);
  266.     GZGroove = GangZoneCreate(2471.0310,-1652.1807, 2509.3789,-1689.2802);
  267.     //Timmers ==================================================================
  268.     SetTimer("Mensagens", 240000, true);// 4 minutos
  269.     SetTimer("AtualizarTextos", 1000, true);// 1 segundo
  270.     SetTimer("Velocimetro", 500, true);// 1/2 segundos
  271.     //[CARROS] Ballas
  272.     Ballas[0] = AddStaticVehicleEx(506,1085.39941406,-1225.50000000,15.60000038,181.99951172,115,1,15); //Super GT
  273.     Ballas[1] = AddStaticVehicleEx(560,1092.39941406,-1226.00000000,15.60000038,180.00000000,22,1,15); //Sultan
  274.     Ballas[2] = AddStaticVehicleEx(560,1096.09997559,-1226.09997559,15.60000038,180.00000000,22,1,15); //Sultan
  275.     Ballas[3] = AddStaticVehicleEx(517,1099.40002441,-1226.09997559,15.80000019,180.00000000,22,1,15); //Majestic
  276.     Ballas[4] = AddStaticVehicleEx(517,1102.39941406,-1226.19921875,15.80000019,180.00000000,22,1,15); //Majestic
  277.     Ballas[5] = AddStaticVehicleEx(567,1107.00000000,-1225.69921875,15.80000019,177.99499512,22,1,15); //Savanna
  278.     Ballas[6] = AddStaticVehicleEx(567,1110.80004883,-1225.80004883,15.80000019,177.99499512,22,1,15); //Savanna
  279.     Ballas[7] = AddStaticVehicleEx(521,1105.09997559,-1191.09997559,17.89999962,182.00000000,22,1,15); //FCR-900
  280.     Ballas[8] = AddStaticVehicleEx(521,1106.59997559,-1191.19995117,17.89999962,181.99951172,22,1,15); //FCR-900
  281.     Ballas[9] = AddStaticVehicleEx(521,1108.80004883,-1191.30004883,17.89999962,181.99951172,22,1,15); //FCR-900
  282.     Ballas[10] = AddStaticVehicleEx(522,1109.59997559,-1191.19995117,17.79999924,184.00000000,22,1,15); //NRG-500
  283.     Ballas[11] = AddStaticVehicleEx(522,1110.80004883,-1191.30004883,17.79999924,183.99902344,22,1,15); //NRG-500
  284.     Ballas[12] = AddStaticVehicleEx(522,1113.30004883,-1191.40002441,17.79999924,183.99902344,22,1,15); //NRG-500
  285.     Ballas[13] = AddStaticVehicleEx(567,1114.59997559,-1249.59997559,15.80000019,357.99499512,22,1,15); //Savanna
  286.     Ballas[14] = AddStaticVehicleEx(522,1111.80004883,-1191.30004883,17.79999924,183.99902344,22,1,15); //NRG-500
  287.     Ballas[15] = AddStaticVehicleEx(522,1114.50000000,-1191.30004883,17.79999924,183.99902344,22,1,15); //NRG-500
  288.     Ballas[16] = AddStaticVehicleEx(521,1107.80004883,-1191.30004883,17.89999962,181.99951172,22,1,15); //FCR-900
  289.     Ballas[17] = AddStaticVehicleEx(521,1105.80004883,-1191.30004883,17.89999962,181.99951172,22,1,15); //FCR-900
  290.     Ballas[18] = AddStaticVehicleEx(506,1084.19995117,-1236.19995117,15.60000038,181.99951172,115,1,15); //Super GT
  291.     Ballas[19] = AddStaticVehicleEx(506,1084.30004883,-1250.00000000,15.60000038,359.99951172,115,1,15); //Super GT
  292.     Ballas[20] = AddStaticVehicleEx(560,1088.50000000,-1249.80004883,15.60000038,358.00000000,22,1,15); //Sultan
  293.     Ballas[21] = AddStaticVehicleEx(560,1091.50000000,-1250.00000000,15.60000038,357.99499512,22,1,15); //Sultan
  294.     Ballas[22] = AddStaticVehicleEx(517,1095.19995117,-1250.00000000,15.80000019,0.00000000,22,1,15); //Majestic
  295.     Ballas[23] = AddStaticVehicleEx(517,1098.40002441,-1250.00000000,15.80000019,0.00000000,22,1,15); //Majestic
  296.     Ballas[24] = AddStaticVehicleEx(567,1102.40002441,-1249.69995117,15.80000019,357.99499512,22,1,15); //Savanna
  297.     Ballas[25] = AddStaticVehicleEx(567,1106.30004883,-1249.59997559,15.80000019,357.99499512,22,1,15); //Savanna
  298.     Ballas[26] = AddStaticVehicleEx(567,1110.69995117,-1249.69995117,15.80000019,357.99499512,22,1,15); //Savanna
  299.  
  300.     //[CARROS] Vagos
  301.     Vagos[0] = AddStaticVehicleEx(506,2257.69995117,-1107.80004883,37.79999924,244.00000000,6,1,15); //Super GT
  302.     Vagos[1] = AddStaticVehicleEx(555,2259.19995117,-1105.19995117,37.79999924,244.00000000,6,1,15); //Windsor
  303.     Vagos[2] = AddStaticVehicleEx(560,2260.29980469,-1102.19921875,37.79999924,243.99536133,6,1,15); //Sultan
  304.     Vagos[3] = AddStaticVehicleEx(517,2262.29980469,-1098.69921875,37.90000153,243.99536133,6,1,15); //Majestic
  305.     Vagos[4] = AddStaticVehicleEx(535,2274.00000000,-1106.79980469,37.79999924,191.99707031,6,1,15); //Slamvan
  306.     Vagos[5] = AddStaticVehicleEx(567,2277.89990234,-1108.90002441,38.00000000,190.00000000,6,1,15); //Savanna
  307.     Vagos[6] = AddStaticVehicleEx(576,2281.69921875,-1110.50000000,37.70000076,191.99707031,6,1,15); //Tornado
  308.     Vagos[7] = AddStaticVehicleEx(581,2284.69995117,-1106.90002441,37.70000076,168.00000000,6,1,15); //BF-400
  309.     Vagos[8] = AddStaticVehicleEx(581,2285.69995117,-1106.90002441,37.70000076,167.99743652,6,1,15); //BF-400
  310.     Vagos[9] = AddStaticVehicleEx(581,2286.50000000,-1107.00000000,37.70000076,167.99743652,6,1,15); //BF-400
  311.     Vagos[10] = AddStaticVehicleEx(522,2288.69995117,-1107.30004883,37.59999847,176.00000000,6,1,15); //NRG-500
  312.     Vagos[11] = AddStaticVehicleEx(522,2289.89990234,-1107.30004883,37.59999847,175.99548340,6,1,15); //NRG-500
  313.     Vagos[12] = AddStaticVehicleEx(522,2291.09960938,-1107.29980469,37.59999847,175.99548340,6,1,15); //NRG-500
  314.     Vagos[13] = AddStaticVehicleEx(522,2292.10009766,-1107.40002441,37.59999847,175.99548340,6,1,15); //NRG-500
  315.     Vagos[14] = AddStaticVehicleEx(522,2293.10009766,-1107.50000000,37.59999847,175.99548340,6,1,15); //NRG-500
  316.     Vagos[15] = AddStaticVehicleEx(522,2294.30004883,-1107.40002441,37.59999847,175.99548340,6,1,15); //NRG-500
  317.     Vagos[16] = AddStaticVehicleEx(581,2287.50000000,-1106.90002441,37.70000076,167.99743652,6,1,15); //BF-400
  318.     Vagos[17] = AddStaticVehicleEx(535,2272.69995117,-1100.09997559,37.79999924,155.99707031,6,1,15); //Slamvan
  319.     Vagos[18] = AddStaticVehicleEx(576,2283.89990234,-1119.09997559,37.70000076,269.99707031,6,1,15); //Tornado
  320.     Vagos[19] = AddStaticVehicleEx(560,2275.00000000,-1116.19995117,37.79999924,237.99536133,6,1,15); //Sultan
  321.     Vagos[20] = AddStaticVehicleEx(517,2273.30004883,-1138.90002441,26.70000076,261.99536133,6,1,15); //Majestic
  322.     Vagos[21] = AddStaticVehicleEx(517,2281.10009766,-1139.80004883,26.70000076,261.99096680,6,1,15); //Majestic
  323.     Vagos[22] = AddStaticVehicleEx(405,2256.60009766,-1136.30004883,26.70000076,254.00000000,6,1,15); //Sentinel
  324.     Vagos[23] = AddStaticVehicleEx(405,2249.60009766,-1134.50000000,26.39999962,253.99841309,6,1,15); //Sentinel
  325.     Vagos[24] = AddStaticVehicleEx(576,2291.89990234,-1119.09997559,37.70000076,271.99707031,6,1,15); //Tornado
  326.     Vagos[25] = AddStaticVehicleEx(535,2252.30004883,-1150.30004883,26.79999924,253.99707031,6,1,15); //Slamvan
  327.     Vagos[26] = AddStaticVehicleEx(535,2261.69995117,-1153.19995117,26.79999924,253.99291992,6,1,15); //Slamvan
  328.  
  329.     //[CARROS]Groove
  330.     Groove[0] = AddStaticVehicleEx(522,2485.39990234,-1686.19995117,13.19999981,0.00000000,86,1,15); //NRG-500
  331.     Groove[1] = AddStaticVehicleEx(522,2486.59960938,-1686.19921875,13.22999954,0.00000000,86,1,15); //NRG-500
  332.     Groove[2] = AddStaticVehicleEx(522,2487.60009766,-1686.19995117,13.19999981,0.00000000,86,1,15); //NRG-500
  333.     Groove[3] = AddStaticVehicleEx(581,2488.50000000,-1686.30004883,13.19999981,0.00000000,86,1,15); //BF-400
  334.     Groove[4] = AddStaticVehicleEx(581,2489.30004883,-1686.30004883,13.19999981,0.00000000,86,1,15); //BF-400
  335.     Groove[5] = AddStaticVehicleEx(581,2490.00000000,-1686.29980469,13.22999954,0.00000000,86,1,15); //BF-400
  336.     Groove[6] = AddStaticVehicleEx(600,2473.39990234,-1691.50000000,13.39999962,0.00000000,86,1,15); //Picador
  337.     Groove[7] = AddStaticVehicleEx(560,2478.89990234,-1654.59997559,13.30000019,90.00000000,86,1,15); //Sultan
  338.     Groove[8] = AddStaticVehicleEx(562,2486.89990234,-1654.00000000,13.00000000,88.00000000,86,1,15); //Elegy
  339.     Groove[9] = AddStaticVehicleEx(506,2504.39990234,-1651.50000000,13.50000000,140.00000000,86,1,15); //Super GT
  340.     Groove[10] = AddStaticVehicleEx(567,2504.60009766,-1674.40002441,13.39999962,64.00000000,86,1,15); //Savanna
  341.     Groove[11] = AddStaticVehicleEx(405,2498.30004883,-1682.09997559,13.39999962,104.00000000,86,1,15); //Sentinel
  342.     Groove[12] = AddStaticVehicleEx(550,2469.80004883,-1671.50000000,13.19999981,10.00000000,86,1,15); //Sunrise
  343.     Groove[13] = AddStaticVehicleEx(522,2481.69995117,-1686.00000000,13.19999981,0.00000000,86,1,15); //NRG-500
  344.     Groove[14] = AddStaticVehicleEx(560,2479.30004883,-1660.30004883,13.30000019,90.00000000,86,1,15); //Sultan
  345.     Groove[15] = AddStaticVehicleEx(560,2479.10009766,-1665.80004883,13.30000019,90.00000000,86,1,15); //Sultan
  346.     Groove[16] = AddStaticVehicleEx(562,2486.89990234,-1660.30004883,13.00000000,91.99499512,86,1,15); //Elegy
  347.     Groove[17] = AddStaticVehicleEx(562,2486.89990234,-1665.80004883,13.00000000,91.99401855,86,1,15); //Elegy
  348.     Groove[18] = AddStaticVehicleEx(405,2496.10009766,-1655.69995117,13.39999962,91.99658203,86,1,15); //Sentinel
  349.     Groove[19] = AddStaticVehicleEx(405,2495.60009766,-1660.00000000,13.39999962,91.99401855,86,1,15); //Sentinel
  350.     Groove[20] = AddStaticVehicleEx(405,2495.39990234,-1665.30004883,13.39999962,91.99401855,86,1,15); //Sentinel
  351.     Groove[21] = AddStaticVehicleEx(550,2486.89990234,-1668.69995117,13.19999981,89.99755859,86,1,15); //Sunrise
  352.     Groove[22] = AddStaticVehicleEx(550,2481.69995117,-1692.40002441,13.19999981,169.99700928,86,1,15); //Sunrise
  353.     Groove[23] = AddStaticVehicleEx(567,2504.69995117,-1663.50000000,13.39999962,125.99536133,86,1,15); //Savanna
  354.     Groove[24] = AddStaticVehicleEx(581,2491.10009766,-1686.50000000,13.19999981,0.00000000,86,1,15); //BF-400
  355.     Groove[25] = AddStaticVehicleEx(581,2492.19995117,-1686.69995117,13.19999981,0.00000000,86,1,15); //BF-400
  356.     Groove[26] = AddStaticVehicleEx(522,2484.30004883,-1686.00000000,13.19999981,0.00000000,86,1,15); //NRG-500
  357.     Groove[27] = AddStaticVehicleEx(522,2483.00000000,-1686.00000000,13.19999981,0.00000000,86,1,15); //NRG-500
  358.  
  359.     //[CARROS]AztecaS
  360.     Aztecas[1] = AddStaticVehicleEx(411,1886.50000000,-2021.09997559,13.19999981,180.00000000,2,1,15); //Infernus
  361.     Aztecas[2] = AddStaticVehicleEx(506,1886.59960938,-2029.59960938,13.19999981,180.00000000,2,1,15); //Super GT
  362.     Aztecas[3] = AddStaticVehicleEx(560,1886.79980469,-2038.19921875,13.19999981,181.99951172,2,1,15); //Sultan
  363.     Aztecas[4] = AddStaticVehicleEx(567,1878.90002441,-2021.09997559,13.39999962,180.00000000,2,1,15); //Savanna
  364.     Aztecas[5] = AddStaticVehicleEx(540,1878.69921875,-2029.59960938,13.50000000,180.00000000,2,1,15); //Vincent
  365.     Aztecas[6] = AddStaticVehicleEx(550,1878.90002441,-2038.69995117,13.30000019,182.00000000,2,1,15); //Sunrise
  366.     Aztecas[7] = AddStaticVehicleEx(522,1895.09997559,-2029.09997559,13.19999981,90.00000000,2,1,15); //NRG-500
  367.     Aztecas[8] = AddStaticVehicleEx(522,1895.09997559,-2030.50000000,13.19999981,90.00000000,2,1,15); //NRG-500
  368.     Aztecas[9] = AddStaticVehicleEx(522,1895.00000000,-2031.89941406,13.19999981,90.00000000,2,1,15); //NRG-500
  369.     Aztecas[10] = AddStaticVehicleEx(581,1894.90002441,-2034.30004883,13.19999981,92.00000000,2,1,15); //BF-400
  370.     Aztecas[11] = AddStaticVehicleEx(581,1894.80004883,-2035.59997559,13.19999981,91.99951172,2,1,15); //BF-400
  371.     Aztecas[12] = AddStaticVehicleEx(581,1894.79980469,-2036.79980469,13.19999981,91.99951172,2,1,15); //BF-400
  372.     Aztecas[13] = AddStaticVehicleEx(560,1893.90002441,-2048.50000000,13.19999981,267.99951172,2,1,15); //Sultan
  373.     Aztecas[14] = AddStaticVehicleEx(560,1894.00000000,-2056.60009766,13.19999981,267.99499512,2,1,15); //Sultan
  374.     Aztecas[15] = AddStaticVehicleEx(560,1871.30004883,-2055.89990234,13.19999981,267.99499512,2,1,15); //Sultan
  375.     Aztecas[16] = AddStaticVehicleEx(560,1871.90002441,-2048.39990234,13.19999981,267.99499512,2,1,15); //Sultan
  376.     Aztecas[17] = AddStaticVehicleEx(540,1865.09997559,-2044.80004883,13.50000000,180.00000000,2,1,15); //Vincent
  377.     Aztecas[18] = AddStaticVehicleEx(540,1862.09997559,-2044.90002441,13.50000000,180.00000000,2,1,15); //Vincent
  378.     Aztecas[19] = AddStaticVehicleEx(540,1859.00000000,-2044.80004883,13.50000000,180.00000000,2,1,15); //Vincent
  379.     Aztecas[20] = AddStaticVehicleEx(506,1901.69995117,-2044.90002441,13.19999981,180.00000000,2,1,15); //Super GT
  380.     Aztecas[21] = AddStaticVehicleEx(506,1905.19995117,-2045.00000000,13.19999981,180.00000000,2,1,15); //Super GT
  381.     Aztecas[22] = AddStaticVehicleEx(506,1908.69995117,-2045.09997559,13.19999981,180.00000000,2,1,15); //Super GT
  382.     Aztecas[23] = AddStaticVehicleEx(581,1894.69995117,-2037.80004883,13.19999981,91.99951172,2,1,15); //BF-400
  383.     Aztecas[24] = AddStaticVehicleEx(581,1894.59997559,-2038.80004883,13.19999981,91.99951172,2,1,15); //BF-400
  384.     Aztecas[25] = AddStaticVehicleEx(522,1894.90002441,-2033.09997559,13.19999981,90.00000000,2,1,15); //NRG-500
  385.     Aztecas[26] = AddStaticVehicleEx(522,1892.69995117,-2027.69995117,13.19999981,90.00000000,2,1,15); //NRG-500
  386.     Aztecas[27] = AddStaticVehicleEx(522,1892.80004883,-2026.19995117,13.19999981,90.00000000,2,1,15); //NRG-500
  387. //[Objetos x1 gaiolas[
  388.     CreateObject(980,-2147.60009766,-753.20001221,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (1)
  389.     CreateObject(980,-2136.19995117,-753.09997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (2)
  390.     CreateObject(980,-2136.10009766,-768.09997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (3)
  391.     CreateObject(980,-2147.60009766,-768.09997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (4)
  392.     CreateObject(980,-2147.60009766,-780.29998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (5)
  393.     CreateObject(980,-2136.19995117,-780.29998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (6)
  394.     CreateObject(980,-2136.10009766,-792.09997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (7)
  395.     CreateObject(980,-2147.50000000,-792.09997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (8)
  396.     CreateObject(980,-2147.39990234,-804.09997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (9)
  397.     CreateObject(980,-2135.89990234,-804.00000000,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (10)
  398.     CreateObject(980,-2135.80004883,-816.29998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (11)
  399.     CreateObject(980,-2147.19995117,-816.29998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (12)
  400.     CreateObject(980,-2146.89990234,-829.50000000,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (13)
  401.     CreateObject(980,-2135.39990234,-829.50000000,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (14)
  402.     CreateObject(980,-2136.10009766,-842.40002441,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (15)
  403.     CreateObject(980,-2147.50000000,-842.40002441,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (16)
  404.     CreateObject(980,-2147.89990234,-855.59997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (17)
  405.     CreateObject(980,-2136.39990234,-855.59997559,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (18)
  406.     CreateObject(980,-2135.80004883,-870.79998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (19)
  407.     CreateObject(980,-2147.39990234,-883.79998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (21)
  408.     CreateObject(980,-2135.89990234,-883.79998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (22)
  409.     CreateObject(980,-2147.30004883,-870.79998779,33.79999924,0.00000000,0.00000000,0.00000000); //object(airportgate) (28)
  410.     CreateObject(7371,-2153.10009766,-765.29998779,31.00000000,0.00000000,0.00000000,0.00000000); //object(vgsnelec_fence_02) (1)
  411.     CreateObject(7371,-2129.89990234,-765.09997559,31.00000000,0.00000000,0.00000000,0.00000000); //object(vgsnelec_fence_02) (2)
  412.     return 1;
  413. }
  414. public OnPlayerRequestClass(playerid, classid)
  415. {
  416.     Cameras(playerid);
  417.     ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5.0, 1, 0, 0, 0, 0);
  418.     if(classid == 0)
  419.     {
  420.         GameTextForPlayer(playerid, "~n~~r~Ballas", 2000, 3);
  421.         SetPlayerColor(playerid, CorBallas);
  422.         Info[playerid][Time] = 0;
  423.     }
  424.     else if(classid == 1)
  425.     {
  426.         GameTextForPlayer(playerid, "~n~~r~Vagos", 2000, 3);
  427.         SetPlayerColor(playerid, CorVagos);
  428.         Info[playerid][Time] = 1;
  429.     }
  430.     else if(classid == 2)
  431.     {
  432.         GameTextForPlayer(playerid, "~n~~r~Groove", 2000, 3);
  433.         SetPlayerColor(playerid, CorGroove);
  434.         Info[playerid][Time] = 2;
  435.     }
  436.     else if(classid == 3)
  437.     {
  438.         GameTextForPlayer(playerid, "~n~~r~Aztecas", 2000, 3);
  439.         SetPlayerColor(playerid, CorAztecas);
  440.         Info[playerid][Time] = 3;
  441.     }
  442.     return 1;
  443. }
  444. public OnPlayerConnect(playerid)//{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n
  445. {
  446.     new BanidoString[100];
  447.     SendDeathMessage(playerid, GetPlayerColor(playerid), 200);//ChatKill
  448.     format(String, sizeof(String), CONTAS, PlayerName(playerid));
  449.     format(BanidoString, sizeof(BanidoString), BANIDOS, PlayerName(playerid));
  450.     if(dini_Exists(BanidoString))
  451.     {
  452.         format(StringDialogos, sizeof(StringDialogos), "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{F60000}Você está banido do servidor!\n{F68D00} - Motivo: %s\n{F68D00} - Admin: %s\n{F68D00} - Data: %s\n{F68D00} - Horario: %s", dini_Get(BanidoString,"Motivo"), dini_Get(BanidoString,"Admin"), dini_Get(BanidoString,"Data"), dini_Get(BanidoString,"Hora"));
  453.         ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Banimentos - Mata-Mata TEM REGRA", StringDialogos, "Sair", "Sair");
  454.         Kick(playerid);
  455.         return 1;
  456.     }
  457.     if(!dini_Exists(String))
  458.     {
  459.         format(StringDialogos, sizeof(StringDialogos), "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{737373}Status da Conta:{F60000} Não Registrada\n{00F600}Digite sua senha para registrar");
  460.         ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", StringDialogos, "Registrar", "Cancelar");
  461.     }
  462.     else
  463.     {
  464.         format(StringDialogos, sizeof(StringDialogos), "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{737373}Status da Conta:{9CF600} Registrada\n{00F600}Digite sua senha para logar");
  465.         ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Logar", StringDialogos, "Logar", "Cancelar");
  466.     }
  467.     Cameras(playerid);
  468.     GameTextForPlayer(playerid, "~g~BRASIL ~y~MATA~w~-~b~MATA ~w~ 2012", 5000, 1);
  469.     //[Text Draws]
  470.     InfosPlayer[playerid] = TextDrawCreate(498.000000, 107.000000, "~b~Matou: ~w~00000~n~~y~Morreu: ~w~00000");
  471.     TextDrawBackgroundColor(InfosPlayer[playerid], 255);
  472.     TextDrawFont(InfosPlayer[playerid], 3);
  473.     TextDrawLetterSize(InfosPlayer[playerid], 0.460000, 1.799999);
  474.     TextDrawColor(InfosPlayer[playerid], -1);
  475.     TextDrawSetOutline(InfosPlayer[playerid], 1);
  476.     TextDrawSetProportional(InfosPlayer[playerid], 1);
  477.     TextDrawShowForPlayer(playerid, LogoServer);
  478.    
  479.     velo[playerid] = TextDrawCreate(466.000000, 413.000000, "~l~-~w~ Velocidade: ~g~%i KM/h ~n~~l~- ~w~Carro: ~b~%s ~n~~l~- ~w~Lataria: ~r~%.0f%");
  480.     TextDrawBackgroundColor(velo[playerid], 255);
  481.     TextDrawFont(velo[playerid], 1);
  482.     TextDrawLetterSize(velo[playerid], 0.300000, 0.899999);
  483.     TextDrawColor(velo[playerid], -1);
  484.     TextDrawSetOutline(velo[playerid], 1);
  485.     TextDrawSetProportional(velo[playerid], 1);
  486.     TextDrawUseBox(velo[playerid], 1);
  487.     TextDrawBoxColor(velo[playerid], 336860220);
  488.     TextDrawTextSize(velo[playerid], 625.000000, -31.000000);
  489.     //[Gzs]
  490.     GangZoneShowForPlayer(playerid, GZAztecas, CorAztecas);
  491.     GangZoneShowForPlayer(playerid, GZVagos, CorVagos);
  492.     GangZoneShowForPlayer(playerid, GZBallas, CorBallas);
  493.     GangZoneShowForPlayer(playerid, GZGroove, CorGroove);
  494.     return 1;
  495. }
  496. public Velocimetro()
  497. {
  498.         foreach (Player, i)
  499.         {
  500.             new aname[MAX_PLAYER_NAME];
  501.             GetPlayerName(i, aname, MAX_PLAYER_NAME);
  502.             if(IsPlayerInAnyVehicle(i))
  503.             {
  504.                     new Float:X, Float:Y, Float:Z, Float:Speed, Float:vcarro, velocidade, string[256], nocarro[30];
  505.                     new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
  506.                     GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
  507.                     Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 200.0);
  508.                     GetVehicleHealth(GetPlayerVehicleID(i), vcarro);
  509.                     velocidade = floatround(Speed, floatround_floor);
  510.                     PlayerVehicleModelID -= 400;
  511.                     format(nocarro,30,NomeCarro[PlayerVehicleModelID]);
  512.                     format(string, 256,"~l~~>~~w~ Velocidade: ~g~%i KM/h ~n~~l~~>~ ~w~Carro: ~b~%s ~n~~l~~>~ ~w~Lataria: ~r~%.0f%",velocidade,nocarro,vcarro);
  513.                     TextDrawSetString(velo[i],string);
  514.                     TextDrawShowForPlayer(i,velo[i]);
  515.             }
  516.             else
  517.             {
  518.                 TextDrawHideForPlayer(i, velo[i]);
  519.             }
  520.         }
  521. }
  522. public OnGameModeExit()
  523. {
  524.     TextDrawHideForAll(LogoServer);
  525.     TextDrawDestroy(LogoServer);
  526.     foreach (Player, playerid)
  527.     {
  528.         TextDrawHideForAll(InfosPlayer[playerid]);
  529.         TextDrawDestroy(InfosPlayer[playerid]);
  530.         SalvarPlayer(playerid);
  531.     }
  532.     return 1;
  533. }
  534. forward AtualizarTextos();
  535. public AtualizarTextos()
  536. {
  537.     foreach (Player, i)
  538.     {
  539.         TextDrawHideForPlayer(i, InfosPlayer[i]);
  540.         format(String, sizeof(String), "~w~Matou: ~r~%05d~n~~w~Morreu: ~r~%05d", Info[i][Matou], Info[i][Morreu]);
  541.         TextDrawSetString(InfosPlayer[i], String);
  542.         TextDrawShowForPlayer(i, InfosPlayer[i]);
  543.     }
  544. }
  545. public OnPlayerDisconnect(playerid, reason)
  546. {
  547.     SendDeathMessage(playerid, GetPlayerColor(playerid), 201);//ChatKill
  548.     PrimeiroSpawn[playerid] = 0;
  549.     SalvarPlayer(playerid);
  550.     return 1;
  551. }
  552. public OnPlayerDeath(playerid, killerid, reason)
  553. {
  554.     SendDeathMessage(killerid, playerid, reason);
  555.     if(IsPlayerConnected(killerid))
  556.     {
  557.         Info[killerid][Matou] += 1;
  558.     }
  559.     Info[playerid][Morreu] += 1;
  560.     ChecarRank(killerid);
  561.     return 1;
  562. }
  563. public ChecarRank(killerid)
  564. {
  565.     switch(Info[killerid][Matou])
  566.     {
  567.         case 50://Balas
  568.         {
  569.             SendClientMessage(killerid,0x3F1583AA,"{979C9C}[Info >>] {E80000}Você ganhou titulo de: {E88E00}Assasino Oportuno");
  570.             GivePlayerMoney(killerid, 10000);
  571.             Info[killerid][Titulo] = 1;
  572.         }
  573.         case 100://Vagos
  574.         {
  575.             SendClientMessage(killerid,0x3F1583AA,"{979C9C}[Info >>] {E80000}Você ganhou titulo de: {E88E00}Assasino Profissional");
  576.             GivePlayerMoney(killerid, 30000);
  577.             Info[killerid][Titulo] = 2;
  578.         }
  579.         case 300://Groove
  580.         {
  581.             SendClientMessage(killerid,0x3F1583AA,"{979C9C}[Info >>] {E80000}Você ganhou titulo de: {E88E00}Matador de Aluguel");
  582.             GivePlayerMoney(killerid, 90000);
  583.             Info[killerid][Titulo] = 3;
  584.         }
  585.         case 600://Aztecas
  586.         {
  587.             SendClientMessage(killerid,0x3F1583AA,"{979C9C}[Info >>] {E80000}Você ganhou titulo de: {E88E00}Inspirante a Chefão");
  588.             GivePlayerMoney(killerid, 200000);
  589.             Info[killerid][Titulo] = 4;
  590.         }
  591.         case 1100://Aztecas
  592.         {
  593.             SendClientMessage(killerid,0x3F1583AA,"{979C9C}[Info >>] {E80000}Você ganhou titulo de: {E88E00}Vice-Chefão");
  594.             GivePlayerMoney(killerid, 500000);
  595.             Info[killerid][Titulo] = 6;
  596.         }
  597.         case 1500://Aztecas
  598.         {
  599.             format(String, sizeof(String), "{979C9C}[Info >>] {E80000}Cuidado! {979C9C}%s {E80000}já matou tanta gente, que virou {E88E00}chefão dos assasinos!(2000+)", PlayerName(killerid));
  600.             SendClientMessage(killerid,0x3F1583AA,"{979C9C}[Info >>] {E80000}Você ganhou titulo de: {E88E00}Chefão");
  601.             GivePlayerMoney(killerid, 1000000);
  602.             Info[killerid][Titulo] = 7;
  603.         }
  604.     }
  605.     return 1;
  606. }
  607. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  608. {
  609.     switch(dialogid)
  610.     {
  611.         case REGISTRO:
  612.         {
  613.             if(response)
  614.             {
  615.                 if(!strlen(inputtext))
  616.                 {
  617.                     new Nome[MAX_PLAYER_NAME];
  618.                     GetPlayerName(playerid, Nome, sizeof(Nome));
  619.                     format(String, sizeof(String), "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{F60000}Senha invalida, digite uma senha válida\n{737373}Status da Conta:{F60000} Não Registrada\n{00F600}Digite Sua Senha Para Registrar", Nome);
  620.                     ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
  621.                     return 1;
  622.                 }
  623.                 new Nome[MAX_PLAYER_NAME];
  624.                 GetPlayerName(playerid, Nome, sizeof(Nome));
  625.                 format(String, sizeof(String), CONTAS, Nome);
  626.                 dini_Create(String);
  627.                 dini_Set(String,"Senha",inputtext);
  628.                 dini_IntSet(String,"Dinheiro",0);
  629.                 dini_IntSet(String,"Level",0);
  630.                 dini_IntSet(String,"Matou",0);
  631.                 dini_IntSet(String,"Morreu",0);
  632.                 dini_IntSet(String,"Admin",0);
  633.                 dini_IntSet(String,"Titulo",0);
  634.                 ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{737373}Status da Conta:{9CF600} Registrada\n{00F600}Digite Sua Senha Para Logar", "Logar", "Cancelar");
  635.                 return 1;
  636.             }
  637.             else
  638.             {
  639.                 SendClientMessage(playerid, 0xFF0000AA, "Você Foi Kickado Porque Não Quis Se Registrar!!");
  640.                 Kick(playerid);
  641.                 return 1;
  642.             }
  643.         }
  644.         case LOGIN:
  645.         {
  646.             if(response)
  647.             {
  648.                 if(!strlen(inputtext))
  649.                 {
  650.                     format(String, sizeof(String), "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{BFD100}%s:{F60000} sua senha está incorreta!\n{737373}Status da Conta:{9CF600}{F60000} Registrada\n{00F600}Digite Sua Senha Para Logar", PlayerName(playerid));
  651.                     ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Cancelar");
  652.                     return 1;
  653.                 }
  654.                 format(String, sizeof(String), CONTAS, PlayerName(playerid));
  655.                 if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
  656.                 {
  657.                     SetarPlayer(playerid);
  658.                     PularLinhas(50, playerid);
  659.                     SendClientMessage(playerid,0x3F1583AA,"{F6F6F6}[Info >>]{979C9C}Você acaba de se logar, {E88E00}Bom Jogo!");
  660.                     return 1;
  661.                 }
  662.                 else
  663.                 {
  664.                     format(String, sizeof(String), "{F6D600}Brasil {95F600}Mata{F6F6F6}-{0080F6}Mata {F6F6F6}[2012]\n{F60000}Senha incorreta digite-a novamente\n{737373}Status da Conta:{9CF600} Registrada\n{00F600}Digite Sua Senha Para Logar");
  665.                     ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Cancelar");
  666.                 }
  667.                 return 1;
  668.             }
  669.             else
  670.             {
  671.                 SendClientMessage(playerid, 0xFF0000AA, "Você não quis se logar, por este motivo será Kickado");
  672.                 Kick(playerid);
  673.                 return 1;
  674.             }
  675.         }
  676.     }
  677.     return 1;
  678. }
  679. public PularLinhas(quantidade, playerid)
  680. {
  681.     for (new linha = 0; linha != quantidade; ++linha)
  682.     {
  683.         SendClientMessage(playerid,0x3F1583AA," ");
  684.     }
  685.     return 1;
  686. }
  687. public MensagemAdmins(COR, const Mensagem[])
  688. {
  689.     for(new i = 0; i < GetMaxPlayers(); i++)
  690.     {
  691.         if(IsPlayerConnected(i))
  692.         {
  693.             if (Info[i][Admin] > 0)
  694.             {
  695.                 SendClientMessage(i, COR, Mensagem);
  696.             }
  697.         }
  698.     }
  699.     return true;
  700. }
  701. stock ArmasBasicas(playerid)
  702. {
  703.     GivePlayerWeapon(playerid, 4, 1);
  704.     GivePlayerWeapon(playerid, 24, 150);
  705.     GivePlayerWeapon(playerid, 32, 200);
  706. }
  707. stock Logs(LogName[], Text[])
  708. {
  709.     new LogFile[64], File:Log, Write_Text[128], Hoje[6];
  710.     format(LogFile, sizeof(LogFile), "%s%s.txt", LOGS, LogName);
  711.     if(fexist(LogFile)) Log = fopen(LogFile, io_append);
  712.     else Log = fopen(LogFile, io_write);
  713.     getdate(Hoje[2], Hoje[1], Hoje[0]);
  714.     gettime(Hoje[3], Hoje[4], Hoje[5]);
  715.     format(Write_Text, sizeof(Write_Text), "[%02d/%02d/%04d - %02d:%02d:%02d] %s\r\n", Hoje[0], Hoje[1], Hoje[2], Hoje[3], Hoje[4], Hoje[5], Text);
  716.     fwrite(Log, Write_Text);
  717.     fclose(Log);
  718. }
  719. stock Kickar(idplayer, motivo[])
  720. {
  721.     Logs("Kicks", motivo);
  722.     Kick(idplayer);
  723. }
  724. stock Banir(idplayer, idadmin, motivo[])
  725. {
  726.     new StringData[50], StringHora[50];
  727.     format(String, sizeof(String), BANIDOS, PlayerName(idplayer));
  728.     getdate(Ano, Mes, Dia);
  729.     format(StringData, sizeof(StringData), " %d/%d/%d", Ano, Mes, Dia);
  730.     gettime(Hora, Minuto, Segundo);
  731.     format(StringHora, sizeof(StringHora), " %d:%d:%d", Hora, Minuto, Segundo);
  732.     dini_Create(String);
  733.     dini_Set(String,"Admin",PlayerName(idadmin));
  734.     dini_Set(String,"Data",StringData);
  735.     dini_Set(String,"Hora",StringHora);
  736.     dini_Set(String,"Motivo",motivo);
  737.     Logs("Bans", motivo);
  738.     Kick(idplayer);
  739. }
  740. stock DarSkils(playerid)
  741. {
  742.     SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
  743.     SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
  744.     SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
  745.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 999);
  746.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
  747.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 999);
  748.     SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
  749.     SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 999);
  750.     SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
  751.     SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
  752.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
  753. }
  754. stock NomeTimeID(playerid)
  755. {
  756.     if(Info[playerid][Time] == 0)
  757.     {
  758.         String = "Ballas";
  759.     }
  760.     if(Info[playerid][Time] == 1)
  761.     {
  762.         String = "Vagos";
  763.     }
  764.     if(Info[playerid][Time] == 2)
  765.     {
  766.         String = "Groove";
  767.     }
  768.     if(Info[playerid][Time] == 3)
  769.     {
  770.         String = "Aztecas";
  771.     }
  772.     return String;
  773. }
  774. stock NomeTime(ID)
  775. {
  776.     switch(ID)
  777.     {
  778.         case 0://Balas
  779.         {
  780.             String = "Ballas";
  781.         }
  782.         case 1://Vagos
  783.         {
  784.             String = "Vagos";
  785.         }
  786.         case 2://Groove
  787.         {
  788.             String = "Groove";
  789.         }
  790.         case 3://Aztecas
  791.         {
  792.             String = "Aztecas";
  793.         }
  794.     }
  795.     return String;
  796. }
  797. stock Cameras(playerid)
  798. {
  799.     SetPlayerPos(playerid, 1968.5687,1343.2820,10.8203);
  800.     SetPlayerCameraPos(playerid, 1964.5570,1342.8541,12.2578);
  801.     SetPlayerCameraLookAt(playerid, 1968.5687,1343.2820,10.8203);
  802.     SetPlayerFacingAngle(playerid, 90.0);
  803. }
  804. stock SalvarPlayer(playerid)
  805. {
  806.     format(String, sizeof(String), CONTAS, PlayerName(playerid));
  807.     dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
  808.     dini_IntSet(String,"Level", Info[playerid][Level]);
  809.     dini_IntSet(String,"Matou", Info[playerid][Matou]);
  810.     dini_IntSet(String,"Morreu",Info[playerid][Morreu]);
  811.     dini_IntSet(String,"Admin", Info[playerid][Admin]);
  812.     dini_IntSet(String,"Titulo", Info[playerid][Titulo]);
  813.     return 1;
  814. }
  815.  
  816. stock SetarPlayer(playerid)
  817. {
  818.     format(String, sizeof(String), CONTAS, PlayerName(playerid));
  819.     GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
  820.     Info[playerid][Level] =  dini_Int(String, "Level");
  821.     Info[playerid][Matou] =  dini_Int(String, "Matou");
  822.     Info[playerid][Morreu] = dini_Int(String, "Morreu");
  823.     Info[playerid][Admin] =  dini_Int(String,"Admin");
  824.     Info[playerid][Titulo] =  dini_Int(String,"Titulo");
  825.     return 1;
  826. }
  827. stock PlayerName(playerid)
  828. {
  829.     new Nome[MAX_PLAYER_NAME];
  830.     GetPlayerName(playerid, Nome, sizeof(Nome));
  831.     return Nome;
  832. }
  833. stock MostrarCreditos(tipo, playerid)
  834. {
  835.     new s1[150],s2[150],s3[150],s4[150],s5[150];
  836.     //[Scripters]
  837.     format(s1, sizeof(s1), "{979C9C}Scripter Principal: {0072F6}%s", ScripterGM);
  838.     format(s2, sizeof(s2), "{979C9C}Scripter Secundario: {0072F6}%s", Scripter2GM);
  839.     format(s3, sizeof(s3), "{979C9C}Scripter Auxiliar: {0072F6}%s", Scripter3GM);
  840.     //[Mappers]
  841.     format(s4, sizeof(s4), "{979C9C}Mapper Primario: {0072F6}%s", MapperGM);
  842.     format(s5, sizeof(s5), "{979C9C}Admin Responsavel: {0072F6}%s", ResponsavelGM);
  843.     if(tipo == 1)//dialogo
  844.     {
  845.         format(String, sizeof(String), "{A5ACA8}Scripter Principal: {005EA8}%s\n{A5ACA8}Scripter Secundario: {005EA8}%s\n{A5ACA8}Scripter Auxiliar: {005EA8}%s\n{A5ACA8}Mapper Primario: {005EA8}%s\n{A5ACA8}Admin Responsavel: {005EA8}%s\n", ScripterGM, Scripter2GM, Scripter3GM, MapperGM, ResponsavelGM);
  846.         ShowPlayerDialog(playerid, CREDITOS, DIALOG_STYLE_INPUT, "{8B8C8E}Brasil MATA-MATA {A500A8}[2012] - Creditos", String, "Sair", "Sair");
  847.     }
  848.     else if(tipo == 2)//Mensagem
  849.     {
  850.         SendClientMessage(playerid,0x3F1583AA,s1);
  851.         SendClientMessage(playerid,0x3F1583AA,s2);
  852.         SendClientMessage(playerid,0x3F1583AA,s3);
  853.         SendClientMessage(playerid,0x3F1583AA,s4);
  854.         SendClientMessage(playerid,0x3F1583AA,s5);
  855.     }
  856. }
  857. CMD:ajudaadmin(playerid, params[])
  858. {
  859.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  860.     SendClientMessage(playerid,-1,"{000000}=======================================================");
  861.     SendClientMessage(playerid,-1,"{49494C}---------------{C5F600}Comandos administrativos{49494C}----------------");
  862.     SendClientMessage(playerid,-1,"{A9ABE3}/setvida - /setcolete - /a - /dardinheiro - /setdinheiro - /setadmin");
  863.     SendClientMessage(playerid,-1,"{A9ABE3}/ban");
  864.     SendClientMessage(playerid,-1,"{000000}=======================================================");
  865.     return 1;
  866. }
  867. CMD:ajuda(playerid, params[])
  868. {
  869.     SendClientMessage(playerid,-1,"{000000}=======================================================");
  870.     SendClientMessage(playerid,-1,"{49494C}---------------{C5F600} Comandos Para Players  {49494C}----------------");
  871.     SendClientMessage(playerid,-1,"{A9ABE3}/admins - ");
  872.     SendClientMessage(playerid,-1,"{000000}=======================================================");
  873.     return 1;
  874. }
  875. CMD:setvida(playerid, params[])
  876. {
  877.     new id,vida;
  878.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  879.     if(sscanf(params,"ud",id,vida)) return SendClientMessage(playerid,-1,"Use /SetVida [ID/Nome][Quantia]");
  880.     SetPlayerHealth(id,vida);
  881.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}setou sua vida para {86F600}%d!", PlayerName(playerid), vida);
  882.     SendClientMessage(id,-1,String);
  883.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você setou a vida de {86F600}%s, {5F6264}para {86F600}%d!", PlayerName(id), vida);
  884.     SendClientMessage(playerid,-1,String);
  885.     return 1;
  886. }
  887. CMD:admins(playerid, params[])
  888. {
  889.     foreach (Player, i)
  890.     {
  891.         if(Info[i][Admin] >= 1)
  892.         {
  893.             SendClientMessage(playerid,-1,"{F60000}[Info >>] {86F600}Admins Onlines:");
  894.             format(String, sizeof(String), "{5F6264}Admin {86F600}%s {5F6264}- Nivel {86F600}%d", PlayerName(i), Info[i][Admin]);
  895.             SendClientMessage(playerid,-1,String);
  896.         }
  897.     }
  898.     return 1;
  899. }
  900. CMD:setcolete(playerid, params[])
  901. {
  902.     new id,colete;
  903.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  904.     if(sscanf(params,"ud",id,colete)) return SendClientMessage(playerid,-1,"Use /SetColete [ID/Nome][Quantia]");
  905.     SetPlayerArmour(id,colete);
  906.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}setou seu colete para {86F600}%d!", PlayerName(playerid), colete);
  907.     SendClientMessage(id,-1,String);
  908.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você setou o colete de {86F600}%s {5F6264}para {86F600}%d!", PlayerName(id), colete);
  909.     SendClientMessage(playerid,-1,String);
  910.     return 1;
  911. }
  912. CMD:dardinheiro(playerid, params[])
  913. {
  914.     new id,dinheiro;
  915.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  916.     if(sscanf(params,"ud",id,dinheiro)) return SendClientMessage(playerid,-1,"Use /DarDinheiro [ID/Nome][Quantia]");
  917.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}deu {86F600}%d {5F6264} de dinheiro para você!", PlayerName(playerid), dinheiro);
  918.     SendClientMessage(id,-1,String);
  919.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você deu para {86F600}%s ,%d {5F6264}de dinheiro!", PlayerName(id), dinheiro);
  920.     SendClientMessage(playerid,-1,String);
  921.     GivePlayerMoney(id ,dinheiro);
  922.     return 1;
  923. }
  924. CMD:setdinheiro(playerid, params[])
  925. {
  926.     new id,dinheiro;
  927.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  928.     if(sscanf(params,"ud",id,dinheiro)) return SendClientMessage(playerid,-1,"Use /SetDinheiro [ID/Nome][Quantia]");
  929.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}setou {86F600}%d {5F6264} de dinheiro para você!", PlayerName(playerid), dinheiro);
  930.     SendClientMessage(id,-1,String);
  931.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você setou para {86F600}%s ,%d {5F6264}de dinheiro!", PlayerName(id), dinheiro);
  932.     SendClientMessage(playerid,-1,String);
  933.     ResetPlayerMoney(id);
  934.     GivePlayerMoney(id ,dinheiro);
  935.     return 1;
  936. }
  937. CMD:setadmin(playerid, params[])
  938. {
  939.     new id,nivel;
  940.     if(Info[playerid][Admin] <= 5) return SendClientMessage(playerid,-1, ADMININVALIDO);
  941.     if(sscanf(params,"ud",id,nivel)) return SendClientMessage(playerid,-1,"Use /SetAdmin [ID/Nome][Nivel]");
  942.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}setou nivel{86F600}%d {5F6264}de admin para você!", PlayerName(playerid), nivel);
  943.     SendClientMessage(id,-1,String);
  944.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você setou para {86F600}%s ,%d {5F6264}de nivel administrativo!", PlayerName(id), nivel);
  945.     SendClientMessage(playerid,-1,String);
  946.     Info[id][Admin] = nivel;
  947.     return 1;
  948. }
  949. CMD:pegaradmin(playerid, params[])
  950. {
  951.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, ADMININVALIDO);
  952.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você recebeu nivel {86F600}6 {5F6264}de administrador");
  953.     SendClientMessage(playerid,-1,String);
  954.     Info[playerid][Admin] = 6;
  955.     return 1;
  956. }
  957. CMD:a(playerid, params[])
  958. {
  959.     new Mensagem;
  960.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  961.     if(sscanf(params, "s[128]",Mensagem)) return SendClientMessage(playerid, -1,"Use: /a [Texto]");
  962.     format(String, sizeof(String),"%s{2641FE} [Level: {33FF00}%d{2641FE}] -{33FF00} %s",PlayerName(playerid), Info[playerid][Admin], Mensagem);
  963.     MensagemAdmins(0x2641FEAA, String);
  964.     return 1;
  965. }
  966. CMD:ban(playerid, params[])
  967. {
  968.     new id, motivo[300];
  969.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  970.     if(sscanf(params,"us",id,motivo)) return SendClientMessage(playerid,-1,"Use /Ban [ID/Nome] [Motivo]");
  971.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}baniu você, Motivo: {86F600}%s!", PlayerName(playerid), motivo);
  972.     SendClientMessage(id,-1,String);
  973.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você baniu {86F600}%s!", PlayerName(id));
  974.     SendClientMessage(playerid,-1,String);
  975.     Banir(id, playerid, motivo);
  976.     return 1;
  977. }
  978. CMD:kick(playerid, params[])
  979. {
  980.     new id, motivo[300];
  981.     if(Info[playerid][Admin] == 0) return SendClientMessage(playerid,-1, ADMININVALIDO);
  982.     if(sscanf(params,"us",id,motivo)) return SendClientMessage(playerid,-1,"Use /Kick [ID/Nome] [Motivo]");
  983.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}O Administrador {86F600}%s {5F6264}kick você, Motivo: {86F600}%s!", PlayerName(playerid), motivo);
  984.     SendClientMessage(id,-1,String);
  985.     format(String, sizeof(String), "{F60000}[Info >>] {5F6264}Você kick {86F600}%s!", PlayerName(id));
  986.     SendClientMessage(playerid,-1,String);
  987.     Kickar(id, motivo);
  988.     return 1;
  989. }
  990. CMD:irguuh(playerid, params[])
  991. {
  992.     SetPlayerPos(playerid,-2147.60009766,-753.20001221,33.79999924);
  993.     return 1;
  994. }
  995. //Banir(idplayer, idadmin, motivo[])-2147.60009766,-753.20001221,33.79999924
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement