Advertisement
Chip7

[GM] GameMode Brasil Zombie Games LS - BASE

Aug 14th, 2012
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 48.83 KB | None | 0 0
  1. /*VISITE NOSSO SITE: http://www.sampknd.com/
  2.   SAMP KND MELHOR BLOG DE SAMP DO BRASIL
  3. */
  4.  
  5. //------------------INCLUDES------------------
  6. #include    a_samp
  7. #include    DOF2
  8. #include    sscanf2
  9. #include    zcmd
  10.  
  11. //------------------DEFINES------------------
  12. #if defined MAX_VEHICLES
  13.     #undef MAX_VEHICLES
  14.     #define MAX_VEHICLES (100) //Número de CARROS
  15. #endif
  16. #if defined MAX_PLAYERS
  17.     #undef MAX_PLAYERS
  18.     #define MAX_PLAYERS (51) //Número de Slots + 1
  19. #endif
  20. //-------------------------------------------
  21. #define     DIALOG_REGISTRO     1
  22. #define     DIALOG_LOGIN        2
  23. #define     DIALOG_ADMINS       3
  24. //-------------------------------------------
  25. #define     ZOMBIE              1
  26. #define     SOBREVIVENTE        2
  27. //-------------------------------------------
  28. #define     COR_CINZA           0xBEBEBEFF
  29. #define     COR_VERMELHO        0xFF0000FF
  30. #define     COR_VERDE           0x32CD32FF
  31. #define     COR_SKYBLUE         0x00BFFFFF
  32. #define     COR_SPINGREEN       0x00FF7FFF
  33. #define     COR_TOMATO          0xFF6347FF
  34. #define     COR_LARANJA         0xFF4500FF
  35. #define     COR_BRANCO          0xFFFFFFFF
  36. #define     COR_AMARELO         0xFFFF00FF
  37. //-------------------------------------------
  38. #define     Veh(%0,%1,%2)       GetPlayerVehicleID(%0) >= Carro[%1] && GetPlayerVehicleID(%0) <= Carro[%2]
  39. //------------------ENUMS------------------
  40. enum pInfo
  41. {
  42.     pSenha[20],
  43.     pAdmin,
  44.     pSkin,
  45.     bool:pTrampando,
  46.     pVip,
  47.     pKills,
  48.     pDeath,
  49.     pExp,
  50.     pLevel,
  51.     pMordidas,
  52.     pMordido,
  53.     pEquipe,
  54.     bool:Morreu,
  55. }
  56.  
  57. //------------------NEWS------------------
  58. static bool:Logado[MAX_PLAYERS];
  59. new PlayerInfo[MAX_PLAYERS][pInfo];
  60. new Text3D:label[MAX_PLAYERS];
  61. new Carro[70];
  62. new timerinfectados;
  63. new Text:status[MAX_PLAYERS];
  64. new Text:bemvindo, Text:cima, Text:baixo, Text:lszombie, Text:antidoto;
  65. new Float:SpawnZombie[44][3] =
  66. {
  67.     {836.1734, -1101.9551, 26.4229}, {838.5415, -1094.0393, 26.4229}, {843.2672, -1093.6980, 26.4229}, {848.6511, -1093.2462, 26.4229},
  68.     {858.1096, -1093.1776, 26.4229}, {838.0835, -1113.7402, 26.4229}, {843.0709, -1114.5990, 26.4229}, {848.6172, -1114.2725, 26.4229},
  69.     {851.7316, -1114.5531, 26.4229}, {858.0530, -1114.3837, 26.4229}, {2530.3794, -1545.4868, 25.3064}, {2534.1062, -1542.2336, 25.3064},
  70.     {2534.1272, -1537.7250, 25.3064}, {2525.9597, -1537.8176, 25.3064}, {2526.0503, -1542.0000, 25.3064}, {2512.6179, -1541.8892, 25.3064},
  71.     {2517.3477, -1539.7266, 25.3064}, {2517.2639, -1534.5876, 25.3064}, {2509.5103, -1536.7826, 25.3064}, {2520.5103, -1551.2627, 25.3064},
  72.     {2118.9448, -1924.8828, 15.6893}, {2114.7327, -1922.8312, 15.6893}, {2114.9233, -1920.2969, 15.6893}, {2122.8245, -1922.4473, 15.6893},
  73.     {2123.2239, -1918.2350, 15.6893}, {2118.4258, -1933.6508, 15.6893}, {2114.3250, -1913.0472, 15.6893}, {2122.4663, -1912.6233, 15.6893},
  74.     {2122.2239, -1907.4479, 15.6893}, {2113.6804, -1909.3613, 15.6893}, {1691.4183, -1011.8914, 27.6193}, {1687.1150, -1015.6617, 27.6193},
  75.     {1694.8616, -1017.2549, 27.6193}, {1687.0587, -1023.3969, 27.6193}, {1694.6317, -1025.1316, 27.6193}, {1686.8806, -1029.6344, 27.6193},
  76.     {1723.9949, -1014.4910, 27.6193}, {1719.9021, -1017.8657, 27.6193}, {1727.9048, -1018.3012, 27.6193}, {1727.3323, -1024.7170, 27.6193},
  77.     {1719.5500, -1023.8514, 27.6193}, {1726.8396, -1026.7395, 27.6193}, {1719.1688, -1029.6111, 27.6193}, {1686.6157, -1055.4481, 27.6193}
  78. };
  79. new Float:SpawnSobrevivente[14][3] =
  80. {
  81.     {1628.6871, -1510.7421, 17.7631}, {1791.4050, -1424.7606, 14.3843}, {2028.4742, -1283.7611, 22.0454}, {2045.2028, -1009.7589, 42.6196},
  82.     {1233.2827, -1085.7629, 31.5107}, {721.7937, -1277.0675, 18.6249}, {670.0783, -1647.1565, 17.0778}, {277.6506, -1434.0728, 15.1065},
  83.     {540.0300, -1814.3829, 7.9677}, {529.0888, -1765.7784, 18.9507}, {1068.2498, -1630.2069, 21.4583}, {1233.8923, -1654.1741, 19.1407},
  84.     {1579.7363, -1635.2448, 14.6757}, {1654.6130, -1657.1188, 23.8309}
  85. };
  86.  
  87. main()
  88. {
  89.     print("\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  90.     print("-=| Brasil Zombie Games LS |=-");
  91.     print("-=| Criado por Edit_pawn |=-");
  92.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
  93.     print("-=| Não retire os créditos! |=-");
  94.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
  95. }
  96.  
  97. //------------------PUBLICS------------------
  98. public OnGameModeInit()
  99. {
  100.     //--------------ZOMBIES--------------
  101.     AddPlayerClass(77,0,0,0,0,0,0,0,0,0,0);
  102.     AddPlayerClass(78,0,0,0,0,0,0,0,0,0,0);
  103.     AddPlayerClass(79,0,0,0,0,0,0,0,0,0,0);
  104.     AddPlayerClass(135,0,0,0,0,0,0,0,0,0,0);
  105.     AddPlayerClass(137,0,0,0,0,0,0,0,0,0,0);
  106.     AddPlayerClass(160,0,0,0,0,0,0,0,0,0,0);
  107.     AddPlayerClass(162,0,0,0,0,0,0,0,0,0,0);
  108.     //--------------HUMANOS--------------
  109.     AddPlayerClass(288,0,0,0,0,0,0,0,0,0,0);
  110.     AddPlayerClass(287,0,0,0,0,0,0,0,0,0,0);
  111.     AddPlayerClass(286,0,0,0,0,0,0,0,0,0,0);
  112.     AddPlayerClass(285,0,0,0,0,0,0,0,0,0,0);
  113.     AddPlayerClass(240,0,0,0,0,0,0,0,0,0,0);
  114.     AddPlayerClass(185,0,0,0,0,0,0,0,0,0,0);
  115.     AddPlayerClass(165,0,0,0,0,0,0,0,0,0,0);
  116.     //-------------------------------------
  117.     Carro[0] = CreateVehicle(425, 2205.7964, -2601.5713, 15.2047, 300.2174, -1, -1, -1);
  118.     Carro[1] = CreateVehicle(432, 2205.9734, -2626.1995, 13.8974, 268.1765, -1, -1, -1);
  119.     Carro[2] = CreateVehicle(433, 2207.0818, -2576.6833, 14.3347, 270.0705, -1, -1, -1);
  120.     Carro[3] = CreateVehicle(455, 2235.8777, -2556.0872, 16.7021, 32.3252, -1, -1, -1);
  121.     Carro[4] = CreateVehicle(470, 2228.8953, -2543.1643, 14.0238, 39.3313, -1, -1, -1);
  122.     Carro[5] = CreateVehicle(548, 2221.1809, -2625.7900, 16.3556, 351.0120, -1, -1, -1);
  123.     Carro[6] = CreateVehicle(432, 2219.6140, -2601.2637, 13.8974, 298.6396, -1, -1, -1);
  124.     Carro[7] = CreateVehicle(432, 2206.3523, -2611.6177, 13.8974, 268.1765, -1, -1, -1);
  125.     Carro[8] = CreateVehicle(432, 2206.1389, -2618.5601, 13.8974, 268.1765, -1, -1, -1);
  126.     Carro[9] = CreateVehicle(433, 2233.5540, -2580.2695, 14.2957, 324.7043, -1, -1, -1);
  127.     Carro[10] = CreateVehicle(433, 2219.3289, -2575.4768, 14.3547, 357.4059, -1, -1, -1);
  128.     Carro[11] = CreateVehicle(470, 2208.3135, -2559.6108, 14.0238, 271.5002, -1, -1, -1);
  129.     Carro[12] = CreateVehicle(470, 2208.1987, -2555.6953, 14.0238, 271.5002, -1, -1, -1);
  130.     Carro[13] = CreateVehicle(470, 2208.0867, -2551.8975, 14.0238, 271.5002, -1, -1, -1);
  131.     Carro[14] = CreateVehicle(470, 2207.9531, -2547.8540, 14.0238, 271.5002, -1, -1, -1);
  132.     Carro[15] = CreateVehicle(548, 2213.2468, -2533.5466, 16.3556, 206.3101, -1, -1, -1);
  133.     Carro[16] = CreateVehicle(425, 2232.0059, -2532.3997, 15.2047, 50.2128, -1, -1, -1);
  134.     Carro[17] = CreateVehicle(425, 2208.7627, -2586.3896, 15.2047, 300.2174, -1, -1, -1);
  135.     Carro[18] = CreateVehicle(548, 2235.4976, -2613.5532, 16.3556, 54.1722, -1, -1, -1);
  136.     Carro[19] = CreateVehicle(446, 346.1541, -2006.9304, 6.8810, 29.3121, -1, -1, -1);
  137.     Carro[20] = CreateVehicle(446, 193.0346, -1909.1675, 6.8810, 297.7152, -1, -1, -1);
  138.     Carro[21] = CreateVehicle(468, 166.5993, -1870.5837, 2.9807, 311.3822, -1, -1, -1);
  139.     Carro[22] = CreateVehicle(468, 166.6317, -1873.0739, 2.9807, 293.3457, -1, -1, -1);
  140.     Carro[23] = CreateVehicle(471, 164.1486, -1880.1073, 5.7328, 254.7601, -1, -1, -1);
  141.     Carro[24] = CreateVehicle(500, 247.4742, -1867.0563, 3.6231, 122.5231, -1, -1, -1);
  142.     Carro[25] = CreateVehicle(500, 202.4003, -1881.8672, 2.4987, 326.0000, -1, -1, -1);
  143.     Carro[26] = CreateVehicle(605, 355.6978, -1828.4116, 4.6166, 35.1670, -1, -1, -1);
  144.     Carro[27] = CreateVehicle(604, 310.8645, -1628.4619, 34.6247, 342.2196, -1, -1, -1);
  145.     Carro[28] = CreateVehicle(588, 500.7606, -1579.9359, 16.9958, 0.0000, -1, -1, -1);
  146.     Carro[29] = CreateVehicle(583, 633.5965, -1850.0237, 5.8774, 0.0000, -1, -1, -1);
  147.     Carro[30] = CreateVehicle(603, 847.4252, -2034.9385, 13.8568, 351.3365, -1, -1, -1);
  148.     Carro[31] = CreateVehicle(555, 1017.3526, -2041.8062, 13.9318, 342.6939, -1, -1, -1);
  149.     Carro[32] = CreateVehicle(552, 1120.3849, -1878.0208, 14.2739, 6.2661, -1, -1, -1);
  150.     Carro[33] = CreateVehicle(546, 1254.1627, -1800.9672, 14.0440, 0.0000, -1, -1, -1);
  151.     Carro[34] = CreateVehicle(416, 2035.6638, -1411.5822, 19.6009, 9.9148, -1, -1, -1);
  152.     Carro[35] = CreateVehicle(455, 1613.5441, -1879.7257, 14.5926, 16.3739, -1, -1, -1);
  153.     Carro[36] = CreateVehicle(456, 1932.4481, -1781.0778, 14.1326, 335.7611, -1, -1, -1);
  154.     Carro[37] = CreateVehicle(458, 2141.9807, -1680.1421, 16.0648, 356.0237, -1, -1, -1);
  155.     Carro[38] = CreateVehicle(445, 1890.1085, -1161.8015, 26.6478, 11.2574, -1, -1, -1);
  156.     Carro[39] = CreateVehicle(439, 1433.5450, -1021.8253, 24.2084, 351.9252, -1, -1, -1);
  157.     Carro[40] = CreateVehicle(438, 1321.6984, -914.9293, 37.2570, 32.2953, -1, -1, -1);
  158.     Carro[41] = CreateVehicle(422, 739.7659, -1139.8473, 19.4733, 359.0469, -1, -1, -1);
  159.     Carro[42] = CreateVehicle(408, 562.6777, -1248.1298, 18.5212, 0.0000, -1, -1, -1);
  160.     Carro[43] = CreateVehicle(404, 263.7034, -1455.4384, 23.7472, 0.0000, -1, -1, -1);
  161.     Carro[44] = CreateVehicle(402, 167.6340, -1563.9324, 13.0723, 19.2067, -1, -1, -1);
  162.     Carro[45] = CreateVehicle(400, 243.0518, -1637.2518, 35.1983, 0.0000, -1, -1, -1);
  163.     Carro[46] = CreateVehicle(515, 868.4933, -1671.6573, 15.3685, 331.7634, -1, -1, -1);
  164.     Carro[47] = CreateVehicle(517, 1066.4572, -1624.9633, 21.2715, 0.6437, -1, -1, -1);
  165.     Carro[48] = CreateVehicle(508, 1279.6697, -1568.9061, 15.4689, 109.5266, -1, -1, -1);
  166.     Carro[49] = CreateVehicle(505, 1487.8722, -1650.4080, 15.5012, 0.0000, -1, -1, -1);
  167.     Carro[50] = CreateVehicle(525, 1576.9286, -1616.9972, 30.0462, 3.4488, -1, -1, -1);
  168.     Carro[51] = CreateVehicle(523, 1659.3014, -1689.6359, 25.9981, 0.0000, -1, -1, -1);
  169.     Carro[52] = CreateVehicle(528, 1610.1472, -1678.8452, 6.4830, 15.5981, -1, -1, -1);
  170.     Carro[53] = CreateVehicle(427, 1531.3712, -1674.0092, 6.9617, 341.3008, -1, -1, -1);
  171.     Carro[54] = CreateVehicle(428, 1351.2856, -1598.9846, 15.5094, 251.0000, -1, -1, -1);
  172.     Carro[55] = CreateVehicle(431, 1449.7185, -937.9919, 39.5769, 153.7971, -1, -1, -1);
  173.     Carro[56] = CreateVehicle(482, 2169.7954, -1045.6193, 60.7030, 352.0719, -1, -1, -1);
  174.     Carro[57] = CreateVehicle(531, 2319.4048, -1170.1780, 29.0404, 0.0000, -1, -1, -1);
  175.     Carro[58] = CreateVehicle(530, 2292.3291, -1358.7319, 23.7029, 0.0000, -1, -1, -1);
  176.     Carro[59] = CreateVehicle(544, 2427.6064, -1445.8141, 25.3729, 7.3407, -1, -1, -1);
  177.     Carro[60] = CreateVehicle(598, 2454.3030, -1224.0614, 30.7822, 0.0000, -1, -1, -1);
  178.     Carro[61] = CreateVehicle(599, 2716.8650, -1179.0126, 71.5653, 6.7004, -1, -1, -1);
  179.     Carro[62] = CreateVehicle(596, 2894.1270, -1092.4778, 13.0179, 6.1183, -1, -1, -1);
  180.     Carro[63] = CreateVehicle(597, 2894.9900, -1092.1405, 15.5791, 52.7703, -1, -1, -1);
  181.     Carro[64] = CreateVehicle(601, 2882.3406, -1945.5427, 9.0440, 42.3836, -1, -1, -1);
  182.     Carro[65] = CreateVehicle(568, 2701.8054, -1941.5140, 16.4178, 6.7293, -1, -1, -1);
  183.     Carro[66] = CreateVehicle(566, 2552.7061, -1968.8751, 5.9133, 1.4331, -1, -1, -1);
  184.     Carro[67] = CreateVehicle(524, 2416.6729, -1803.6486, 32.4104, 164.2336, -1, -1, -1);
  185.     Carro[68] = CreateVehicle(486, 2366.1091, -1587.3159, 19.3224, 7.1499, -1, -1, -1);
  186.     Carro[69] = CreateVehicle(459, 1953.5948, -1383.6039, 19.0282, 0.0000, -1, -1, -1);
  187.     //-------------------------------------
  188.     timerinfectados = SetTimer("AtualizarInfectados", 5000, true);
  189.     SetGameModeText("LS Zombie v1.0");
  190.     SendRconCommand("mapname [LS Zombie]");
  191.     ShowNameTags(1);
  192.     AllowInteriorWeapons(0);
  193.     LimitPlayerMarkerRadius(40.0);
  194.     ShowPlayerMarkers(2);
  195.     SetWeather(9);
  196.     TextDraw();
  197.     AtualizarInfectados();
  198.     return 1;
  199. }
  200.  
  201. public OnGameModeExit()
  202. {
  203.     for(new i; i < 100; ++i)
  204.     {
  205.         i++;
  206.         if(DOF2_FileExists(PegarConta(i)))
  207.         {
  208.             DOF2_SetInt(PegarConta(i), "Equipe", 0);
  209.             DOF2_SetInt(PegarConta(i), "Mordido", 0);
  210.         }
  211.     }
  212.     TextDrawDestroy(bemvindo);
  213.     TextDrawDestroy(cima);
  214.     TextDrawDestroy(baixo);
  215.     TextDrawDestroy(antidoto);
  216.     KillTimer(timerinfectados);
  217.     DOF2_Exit();
  218.     return 1;
  219. }
  220.  
  221. public OnPlayerRequestClass(playerid, classid)
  222. {
  223.     if(Logado[playerid] == false)
  224.     {
  225.         SetPlayerColor(playerid, 0xBEBEBEFF);
  226.         SetPlayerPos(playerid, 2924.9727, -1563.8043, 11.0469);
  227.         SetPlayerFacingAngle(playerid, 86.8798);
  228.         SetPlayerCameraPos(playerid, 2920.7109, -1563.5922, 12.0877);
  229.         SetPlayerCameraLookAt(playerid, 2924.9727, -1563.8043, 11.0469);
  230.         CarregarConta(playerid);
  231.         switch(classid)
  232.         {
  233.             case 0 .. 6:
  234.             {
  235.                 GameTextForPlayer(playerid, "~r~Zombie", 5000, 4);
  236.                 PlayerInfo[playerid][pEquipe] = ZOMBIE;
  237.             }
  238.             case 7 .. 13:
  239.             {
  240.                 GameTextForPlayer(playerid, "~g~Sobrevivente", 5000, 4);
  241.                 PlayerInfo[playerid][pEquipe] = SOBREVIVENTE;
  242.             }
  243.         }
  244.         return 1;
  245.     }
  246.     else if(Logado[playerid] == true)
  247.     {
  248.         SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  249.         SpawnPlayer(playerid);
  250.         return 1;
  251.     }
  252.     return 0;
  253. }
  254.  
  255. public OnPlayerSpawn(playerid)
  256. {
  257.     TextDrawShowForPlayer(playerid, antidoto);
  258.     TextDrawShowForPlayer(playerid, lszombie);
  259.     TextDrawHideForPlayer(playerid, cima);
  260.     TextDrawHideForPlayer(playerid, baixo);
  261.     TextDrawHideForPlayer(playerid, bemvindo);
  262.     StopAudioStreamForPlayer(playerid);
  263.     Logado[playerid] = true;
  264.     PlayerInfo[playerid][Morreu] = false;
  265.     if(PlayerInfo[playerid][pEquipe] == ZOMBIE || PlayerInfo[playerid][pMordido] > 0)
  266.     {
  267.         PlayerInfo[playerid][pEquipe] = ZOMBIE;
  268.         new randz = random(sizeof(SpawnZombie));
  269.         SetPlayerPos(playerid,SpawnZombie[randz][0],SpawnZombie[randz][1],SpawnZombie[randz][2]);
  270.     }
  271.     else if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE)
  272.     {
  273.         PlayerInfo[playerid][pEquipe] = SOBREVIVENTE;
  274.         new rands = random(sizeof(SpawnSobrevivente));
  275.         SetPlayerPos(playerid,SpawnSobrevivente[rands][0],SpawnSobrevivente[rands][1],SpawnSobrevivente[rands][2]);
  276.     }
  277.     AtualizarExp(playerid);
  278.     DarArmas(playerid);
  279.     Status(playerid);
  280.     SetSkin(playerid, false, false);
  281.     return 1;
  282. }
  283.  
  284. public OnPlayerConnect(playerid)
  285. {
  286.     TextDrawShowForPlayer(playerid, cima);
  287.     TextDrawShowForPlayer(playerid, baixo);
  288.     TextDrawShowForPlayer(playerid, bemvindo);
  289.     PlayerInfo[playerid][pAdmin] = 0;
  290.     PlayerInfo[playerid][pVip] = 0;
  291.     PlayerInfo[playerid][pKills] = 0;
  292.     PlayerInfo[playerid][pDeath] = 0;
  293.     PlayerInfo[playerid][pExp] = 0;
  294.     PlayerInfo[playerid][pLevel] = 0;
  295.     PlayerInfo[playerid][pMordidas] = 0;
  296.     PlayerInfo[playerid][pMordido] = 0;
  297.     PlayerInfo[playerid][pEquipe] = 0;
  298.     PlayerInfo[playerid][Morreu] = false;
  299.     PlayerInfo[playerid][pTrampando] = false;
  300.     Logado[playerid] = false;
  301.     //--------------------------------------------------------------------------
  302.     SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
  303.     SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
  304.     SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
  305.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 999);
  306.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
  307.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 999);
  308.     SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
  309.     SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 999);
  310.     SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
  311.     SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
  312.     SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
  313.     //--------------------------------------------------------------------------
  314.     SetPlayerTime(playerid, 0, 0);
  315.     CarregarConta(playerid);
  316.     new arquivo[30], arquivo2[30];
  317.     format(arquivo, sizeof(arquivo), "Banidos/%s.sav", GetName(playerid));
  318.     format(arquivo2, sizeof(arquivo2), "IPs Banidos/%s.sav", GetIp(playerid));
  319.     if(DOF2_FileExists(arquivo))
  320.     {
  321.         SendClientMessage(playerid, COR_VERMELHO, "Você foi banido do servidor!");
  322.         SendClientMessage(playerid, COR_VERMELHO, "Vá ao forum e peça para ser Desbanido!");
  323.         return Kick(playerid);
  324.     }
  325.     if(DOF2_FileExists(arquivo2))
  326.     {
  327.         SendClientMessage(playerid, COR_VERMELHO, "Você foi banido do servidor!");
  328.         SendClientMessage(playerid, COR_VERMELHO, "Vá ao forum e peça para ser Desbanido!");
  329.         return Kick(playerid);
  330.     }
  331.     if(!DOF2_FileExists(PegarConta(playerid)))
  332.     {
  333.         new Str[180];
  334.         format(Str, sizeof(Str), "{BEBEBE}SEU NOME: {FF0000}%s\n{BEBEBE}CONTA {FF0000}NÃO REGISTRADA\n{BEBEBE}IP: {FF0000}%s\n{BEBEBE}CONTA: %s\n\n{BEBEBE}Digite sua senha para se Registrar!\n", GetName(playerid), GetIp(playerid), Vip(playerid));
  335.         ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FFFF00}Legend {FF0000}Zombie {0000FF}Games", Str, "Registrar", "Cancelar");
  336.     }
  337.     else
  338.     {
  339.         new Str[180];
  340.         format(Str, sizeof(Str), "{BEBEBE}SEU NOME: {FF0000}%s\n{BEBEBE}CONTA {32CD32}REGISTRADA\n{BEBEBE}IP: {FF0000}%s\n{BEBEBE}CONTA: %s\n\n{BEBEBE}Digite sua senha para Logar!\n", GetName(playerid), GetIp(playerid), Vip(playerid));
  341.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FFFF00}Legend {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
  342.     }
  343.     return 1;
  344. }
  345.  
  346. public OnPlayerDisconnect(playerid, reason)
  347. {
  348.     TextDrawHideForPlayer(playerid, status[playerid]);
  349.     TextDrawHideForPlayer(playerid, antidoto);
  350.     Logado[playerid] = false;
  351.     PlayerInfo[playerid][Morreu] = false;
  352.     SalvarConta(playerid);
  353.     return 1;
  354. }
  355.  
  356. public OnPlayerDeath(playerid, killerid, reason)
  357. {
  358.     new Str[10], Float:X, Float:Y, Float:Z;
  359.     new exprandom = RandomEx(4,8);
  360.     PlayerInfo[playerid][Morreu] = true;
  361.     PlayerInfo[playerid][pMordido] = 0;
  362.     switch(PlayerInfo[playerid][pEquipe])
  363.     {
  364.         case ZOMBIE:
  365.         {
  366.             if(PlayerInfo[killerid][pEquipe] == SOBREVIVENTE)
  367.             {
  368.                 PlayerInfo[killerid][pKills]++;
  369.                 PlayerInfo[playerid][pDeath]++;
  370.                 PlayerInfo[killerid][pExp] += exprandom;
  371.                 format(Str, sizeof(Str), "~w~+%d EXP", exprandom);
  372.                 GameTextForPlayer(killerid, Str, 2000, 5);
  373.                 PlayAudioStreamForPlayer(playerid,"http://pamp3.site40.net/zombie/attack2.mp3");
  374.             }
  375.         }
  376.         case SOBREVIVENTE:
  377.         {
  378.             new i;
  379.             for(killerid = i; i < MAX_PLAYERS; ++i)
  380.             {
  381.                 GetPlayerPos(playerid, X, Y, Z);
  382.                 if(PlayerInfo[i][pEquipe] == ZOMBIE && IsPlayerInRangeOfPoint(i, 1.5, X, Y, Z))
  383.                 {
  384.                     PlayerInfo[i][pKills]++;
  385.                     PlayerInfo[playerid][pDeath]++;
  386.                     PlayerInfo[i][pExp] += exprandom;
  387.                     format(Str, sizeof(Str), "~w~+%d EXP", exprandom);
  388.                     GameTextForPlayer(i, Str, 2000, 5);
  389.                     PlayAudioStreamForPlayer(playerid,"http://pamp3.site40.net/zombie/die.wav");
  390.                     PlayerInfo[playerid][pEquipe] = ZOMBIE;
  391.                     GameTextForPlayer(playerid, "~r~INFECTADO", 3000, 3);
  392.                 }
  393.             }
  394.         }
  395.     }
  396.     DarLevel(killerid);
  397.     AtualizarExp(killerid);
  398.     Status(killerid);
  399.     return 1;
  400. }
  401.  
  402. public OnPlayerStateChange(playerid, newstate, oldstate)
  403. {
  404.     if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT && newstate != PLAYER_STATE_PASSENGER)
  405.         if(PlayerInfo[playerid][pEquipe] == ZOMBIE) RemovePlayerFromVehicle(playerid), SendClientMessage(playerid, COR_VERMELHO, "Zombies não podem dirigir veículos!");
  406.     return 1;
  407. }
  408.  
  409. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  410. {
  411.     switch(dialogid)
  412.     {
  413.         case DIALOG_REGISTRO:
  414.         {
  415.             if(!strlen(inputtext))
  416.             {
  417.                 new Str[180];
  418.                 format(Str, sizeof(Str), "{BEBEBE}SEU NOME: {FF0000}%s\n{BEBEBE}CONTA {FF0000}NÃO REGISTRADA\n{BEBEBE}IP: {FF0000}%s\n{BEBEBE}CONTA: %s\n\n{BEBEBE}Digite sua senha para se Registrar!\n", GetName(playerid), GetIp(playerid), Vip(playerid));
  419.                 ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Registrar", "Cancelar");
  420.                 return 1;
  421.             }
  422.             if(response)
  423.             {
  424.                 PlayerInfo[playerid][pSenha] = strlen(inputtext);
  425.                 if(!DOF2_FileExists(PegarConta(playerid)))
  426.                 {
  427.                     PlayerInfo[playerid][pLevel] = 1;
  428.                     DOF2_CreateFile(PegarConta(playerid));
  429.                     DOF2_SetString(PegarConta(playerid), "Senha", inputtext);
  430.                     SalvarConta(playerid);
  431.                 }
  432.                 new Str[180];
  433.                 format(Str, sizeof(Str), "{BEBEBE}SEU NOME: {FF0000}%s\n{BEBEBE}CONTA {32CD32}REGISTRADA\n{BEBEBE}IP: {FF0000}%s\n{BEBEBE}CONTA: %s\n\n{BEBEBE}Digite sua senha para Logar!\n", GetName(playerid), GetIp(playerid), Vip(playerid));
  434.                 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
  435.             }
  436.         }
  437.         case DIALOG_LOGIN:
  438.         {
  439.             if(!strlen(inputtext))
  440.             {
  441.                 new Str[180];
  442.                 format(Str, sizeof(Str), "{BEBEBE}SEU NOME: {FF0000}%s\n{BEBEBE}CONTA {32CD32}REGISTRADA\n{BEBEBE}IP: {FF0000}%s\n{BEBEBE}CONTA: %s\n\n{BEBEBE}Digite sua senha para Logar!\n", GetName(playerid), GetIp(playerid), Vip(playerid));
  443.                 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
  444.                 return 1;
  445.             }
  446.             if(response)
  447.             {
  448.                 if(strcmp(inputtext, DOF2_GetString(PegarConta(playerid), "Senha", PlayerInfo[playerid][pSenha]), true) == 0)
  449.                 {
  450.                     if(PlayerInfo[playerid][pEquipe] == ZOMBIE || PlayerInfo[playerid][pEquipe] == SOBREVIVENTE) Logado[playerid] = true;
  451.                     SetSkin(playerid, true, false);
  452.                 }
  453.                 else
  454.                 {
  455.                     new Str[180];
  456.                     format(Str, sizeof(Str), "{BEBEBE}SEU NOME: {FF0000}%s\n{BEBEBE}CONTA {32CD32}REGISTRADA\n{BEBEBE}IP: {FF0000}%s\n{BEBEBE}CONTA: %s\n\n{BEBEBE}Digite sua senha para Logar!\n", GetName(playerid), GetIp(playerid), Vip(playerid));
  457.                     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
  458.                 }
  459.             }
  460.         }
  461.     }
  462.     return 1;
  463. }
  464.  
  465. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  466. {
  467.     if(!success) SendClientMessage(playerid, COR_VERMELHO, "** COMANDO INVÁLIDO **");
  468.     return 1;
  469. }
  470.  
  471. forward TextDraw();
  472. public TextDraw()
  473. {
  474.     bemvindo = TextDrawCreate(56.000000, 34.000000, "~w~Bem vindo ao ~g~brasil ~r~zombie ~b~games");
  475.     TextDrawBackgroundColor(bemvindo, -1);
  476.     TextDrawFont(bemvindo, 2);
  477.     TextDrawLetterSize(bemvindo, 0.549999, 2.399999);
  478.     TextDrawColor(bemvindo, 255);
  479.     TextDrawSetOutline(bemvindo, 1);
  480.     TextDrawSetProportional(bemvindo, 1);
  481.  
  482.     cima = TextDrawCreate(0.000000,-1.000000,"                                    ");
  483.     TextDrawUseBox(cima,1);
  484.     TextDrawBoxColor(cima,0x000000ff);
  485.     TextDrawTextSize(cima,639.000000,13.000000);
  486.     TextDrawAlignment(cima,0);
  487.     TextDrawBackgroundColor(cima,0x000000ff);
  488.     TextDrawFont(cima,3);
  489.     TextDrawLetterSize(cima,2.000000,12.000000);
  490.     TextDrawColor(cima,0x00000000);
  491.     TextDrawSetOutline(cima,1);
  492.     TextDrawSetProportional(cima,1);
  493.     TextDrawSetShadow(cima,1);
  494.  
  495.     baixo = TextDrawCreate(-1.000000,343.000000,"                                    ");
  496.     TextDrawUseBox(baixo,1);
  497.     TextDrawBoxColor(baixo,0x000000ff);
  498.     TextDrawTextSize(baixo,639.000000,13.000000);
  499.     TextDrawAlignment(baixo,0);
  500.     TextDrawBackgroundColor(baixo,0x000000ff);
  501.     TextDrawFont(baixo,3);
  502.     TextDrawLetterSize(baixo,2.000000,12.000000);
  503.     TextDrawColor(baixo,0x00000000);
  504.     TextDrawSetOutline(baixo,1);
  505.     TextDrawSetProportional(baixo,1);
  506.     TextDrawSetShadow(baixo,1);
  507.  
  508.     lszombie = TextDrawCreate(6.000000, 287.000000, "      ~r~LS Zombie v1.0 ~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~                   http://forum.sa-mp.com");
  509.     TextDrawBackgroundColor(lszombie, 255);
  510.     TextDrawFont(lszombie, 1);
  511.     TextDrawLetterSize(lszombie, 0.500000, 1.300000);
  512.     TextDrawColor(lszombie, -1);
  513.     TextDrawSetOutline(lszombie, 0);
  514.     TextDrawSetProportional(lszombie, 1);
  515.     TextDrawSetShadow(lszombie, 1);
  516.  
  517.     antidoto = TextDrawCreate(19.000000, 309.000000, "~w~ ~n~Infectados: ~r~%d%");
  518.     TextDrawBackgroundColor(antidoto, 255);
  519.     TextDrawFont(antidoto, 2);
  520.     TextDrawLetterSize(antidoto, 0.300000, 1.300000);
  521.     TextDrawColor(antidoto, -1);
  522.     TextDrawSetOutline(antidoto, 0);
  523.     TextDrawSetProportional(antidoto, 1);
  524.     TextDrawSetShadow(antidoto, 1);
  525.     TextDrawUseBox(antidoto, 1);
  526.     TextDrawBoxColor(antidoto, 0x00000020);
  527.     TextDrawTextSize(antidoto, 223.000000, 0.000000);
  528.  
  529.     for(new i; i < MAX_PLAYERS; ++i)
  530.     {
  531.         status[i] = TextDrawCreate(1.000000, 433.000000, "   nome: %s ] level: %d ] exp: %d/%d ] matou: %d ] mortes: %d ] mordidas: %d");
  532.         TextDrawBackgroundColor(status[i], 255);
  533.         TextDrawFont(status[i], 2);
  534.         TextDrawLetterSize(status[i], 0.29000, 1.500000);
  535.         TextDrawColor(status[i], -1);
  536.         TextDrawSetOutline(status[i], 0);
  537.         TextDrawSetProportional(status[i], 1);
  538.         TextDrawSetShadow(status[i], 1);
  539.         TextDrawUseBox(status[i], 1);
  540.         TextDrawBoxColor(status[i], 153);
  541.         TextDrawTextSize(status[i], 672.000000, 0.000000);
  542.     }
  543. }
  544.  
  545. forward Status(playerid);
  546. public Status(playerid)
  547. {
  548.     TextDrawHideForPlayer(playerid, status[playerid]);
  549.     new Str[128]; format(Str, sizeof(Str), "   nome: ~r~%s ~w~] level: ~r~%d ~w~] exp: %d~r~/%d ~w~] matou: ~r~%d ~w~] mortes: ~r~%d ~w~] mordidas: ~r~%d", GetName(playerid), GetPlayerScore(playerid), PlayerInfo[playerid][pExp], Experiencia(GetPlayerScore(playerid)), PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeath], PlayerInfo[playerid][pMordidas]);
  550.     TextDrawSetString(status[playerid], Str); TextDrawShowForPlayer(playerid, status[playerid]);
  551.     return 1;
  552. }
  553.  
  554. forward AtualizarInfectados();
  555. public AtualizarInfectados()
  556. {
  557.     new Str[80], Float:infect, Float:conectados;
  558.     for(new i; i < MAX_PLAYERS; ++i)
  559.     {
  560.         if(IsPlayerConnected(i) && Logado[i] == true)
  561.         {
  562.             if(PlayerInfo[i][pEquipe] == ZOMBIE) infect++;
  563.             conectados++;
  564.         }
  565.     }
  566.     if(infect == 0)
  567.     {
  568.         new rand = RandomEx(0,50);
  569.         PlayerInfo[rand][pEquipe] = ZOMBIE;
  570.         SetSkin(rand, true, false);
  571.         SendClientMessage(rand, COR_VERMELHO, "Você foi setado para Zombie aleatóriamente para começar o Round!");
  572.     }
  573.     format(Str, sizeof(Str), "~w~ ~n~Infectados: ~r~%d%", floatround((infect*100)/conectados));
  574.     TextDrawSetString(antidoto, Str); TextDrawShowForAll(antidoto);
  575.     return 1;
  576. }
  577.  
  578. forward AtualizarExp(playerid);
  579. public AtualizarExp(playerid)
  580. {
  581.     Delete3DTextLabel(label[playerid]);
  582.     new Str[30];
  583.     format(Str, sizeof(Str), "Level: %d  EXP: %d/%d", GetPlayerScore(playerid), PlayerInfo[playerid][pExp], Experiencia(GetPlayerScore(playerid)));
  584.     if(PlayerInfo[playerid][pEquipe] == ZOMBIE) label[playerid] = Create3DTextLabel(Str, 0xFF0000FF, 30.0, 40.0, 50.0, 40.0, 0);
  585.     else if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE) label[playerid] = Create3DTextLabel(Str, 0x32CD32FF, 30.0, 40.0, 50.0, 40.0, 0);
  586.     Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.3);
  587. }
  588.  
  589. //------------------STOCKS------------------
  590. stock GetPlayerDistanceVehicle(playerid, vehicleid, Float:Distance)
  591. {
  592.     new Float:Pos[3];
  593.     GetVehiclePos(vehicleid, Pos[0], Pos[1], Pos[2]);
  594.     return IsPlayerInRangeOfPoint(playerid, Distance, Pos[0], Pos[1], Pos[2]);
  595. }
  596.  
  597. stock GivePlayerAW(playerid, Float:armour, arma1, ammo1, arma2, ammo2, arma3, ammo3, arma4, ammo4, arma5, ammo5, arma6, ammo6, arma7, ammo7, arma8, ammo8, arma9, ammo9)
  598. {
  599.     ResetPlayerWeapons(playerid), SetPlayerHealth(playerid, 100), SetPlayerArmour(playerid, armour), GivePlayerWeapon(playerid, arma1, ammo1),
  600.     GivePlayerWeapon(playerid, arma2, ammo2), GivePlayerWeapon(playerid, arma3, ammo3), GivePlayerWeapon(playerid, arma4, ammo4), GivePlayerWeapon(playerid, arma5, ammo5),
  601.     GivePlayerWeapon(playerid, arma6, ammo6), GivePlayerWeapon(playerid, arma7, ammo7), GivePlayerWeapon(playerid, arma8, ammo8), GivePlayerWeapon(playerid, arma9, ammo9);
  602. }
  603.  
  604. stock Vip(playerid)
  605. {
  606.     new text[20];
  607.     if(PlayerInfo[playerid][pVip] == 0) text = "{FFFFFF}Grátis";
  608.     else if(PlayerInfo[playerid][pVip] == 1) text = "{DAA520}Vip Bronze";
  609.     else if(PlayerInfo[playerid][pVip] == 2) text = "{BEBEBE}Vip Prata";
  610.     else if(PlayerInfo[playerid][pVip] == 3) text = "{FFD700}Vip Ouro";
  611.     return text;
  612. }
  613.  
  614. stock DarLevel(playerid)
  615. {
  616.     if(PlayerInfo[playerid][pExp] >= Experiencia(GetPlayerScore(playerid)))
  617.     {
  618.         SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
  619.         PlayerInfo[playerid][pLevel] = GetPlayerScore(playerid)+1;
  620.         PlayerInfo[playerid][pExp] = 0;
  621.         GameTextForPlayer(playerid, "Level UP!", 5000, 5);
  622.         DarArmas(playerid);
  623.     }
  624. }
  625.  
  626. stock DarArmas(playerid)
  627. {
  628.     ResetPlayerWeapons(playerid);
  629.     SetPlayerHealth(playerid, 100);
  630.     SetPlayerArmour(playerid, 0);
  631.     if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE)
  632.     {
  633.         new lvl = GetPlayerScore(playerid);
  634.         switch(lvl)
  635.         {
  636.             case 1: GivePlayerAW(playerid,0,1,1,23,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
  637.             case 2: GivePlayerAW(playerid,0,1,1,23,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
  638.             case 3: GivePlayerAW(playerid,0,1,1,23,140,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
  639.             case 4: GivePlayerAW(playerid,0,1,1,23,160,2,1,0,0,0,0,0,0,0,0,0,0,0,0); //Ganhou 2
  640.             case 5: GivePlayerAW(playerid,0,1,1,22,180,2,1,0,0,0,0,0,0,0,0,0,0,0,0);
  641.             case 6: GivePlayerAW(playerid,0,1,1,22,200,2,1,0,0,0,0,0,0,0,0,0,0,0,0);
  642.             case 7: GivePlayerAW(playerid,0,1,1,22,220,2,1,0,0,0,0,0,0,0,0,0,0,0,0);
  643.             case 8: GivePlayerAW(playerid,0,1,1,22,240,2,1,6,1,0,0,0,0,0,0,0,0,0,0);
  644.             case 9: GivePlayerAW(playerid,0,1,1,22,240,2,1,6,1,28,90,0,0,0,0,0,0,0,0); //Ganhou 28
  645.             case 10: GivePlayerAW(playerid,0,1,1,22,260,2,1,6,1,28,110,0,0,0,0,0,0,0,0);
  646.             case 11: GivePlayerAW(playerid,0,1,1,22,280,2,1,6,1,28,130,0,0,0,0,0,0,0,0);
  647.             case 12: GivePlayerAW(playerid,0,1,1,22,300,2,1,6,1,28,150,0,0,0,0,0,0,0,0);
  648.             case 13: GivePlayerAW(playerid,0,1,1,22,300,2,1,6,1,28,150,25,50,0,0,0,0,0,0); //Ganhou 25
  649.             case 14: GivePlayerAW(playerid,0,1,1,22,320,2,1,6,1,28,170,25,60,0,0,0,0,0,0);
  650.             case 15: GivePlayerAW(playerid,0,1,1,22,340,2,1,6,1,28,190,25,70,0,0,0,0,0,0);
  651.             case 16: GivePlayerAW(playerid,0,1,1,24,300,2,1,6,1,28,190,25,80,0,0,0,0,0,0); //Ganhou 24
  652.             case 17: GivePlayerAW(playerid,0,1,1,24,320,2,1,6,1,28,210,25,90,0,0,0,0,0,0);
  653.             case 18: GivePlayerAW(playerid,0,1,1,24,320,2,1,6,1,28,210,25,90,33,40,0,0,0,0); //Ganhou 33
  654.             case 19: GivePlayerAW(playerid,0,1,1,24,340,2,1,6,1,28,230,25,100,33,50,0,0,0,0);
  655.             case 20: GivePlayerAW(playerid,0,1,1,24,360,2,1,6,1,28,250,25,110,33,60,0,0,0,0);
  656.             case 21: GivePlayerAW(playerid,0,1,1,24,360,2,1,6,1,28,250,25,110,33,60,16,1,0,0); //Ganhou 16
  657.             case 22: GivePlayerAW(playerid,0,1,1,24,380,2,1,6,1,28,270,25,120,33,70,16,1,0,0);
  658.             case 23: GivePlayerAW(playerid,0,1,1,24,400,2,1,6,1,28,290,25,130,33,80,16,2,0,0);
  659.             case 24: GivePlayerAW(playerid,0,1,1,24,420,2,1,6,1,28,310,25,140,33,90,16,2,0,0);
  660.             case 25: GivePlayerAW(playerid,0,1,1,24,420,2,1,6,1,32,310,25,140,33,90,16,2,18,1); //Ganhou 18 & 32
  661.             case 26: GivePlayerAW(playerid,0,1,1,24,440,2,1,6,1,32,330,25,150,33,100,16,2,18,1);
  662.             case 27: GivePlayerAW(playerid,0,1,1,24,460,2,1,6,1,32,350,25,160,33,110,16,2,18,1);
  663.             case 28: GivePlayerAW(playerid,0,1,1,24,480,2,1,6,1,32,370,25,170,33,120,16,3,18,1);
  664.             case 29: GivePlayerAW(playerid,0,1,1,24,500,2,1,6,1,32,390,25,180,34,120,16,3,18,1); //Ganhou 34
  665.             case 30: GivePlayerAW(playerid,0,1,1,24,500,2,1,6,1,32,410,25,190,34,130,16,3,18,1);
  666.             case 31: GivePlayerAW(playerid,0,1,1,24,500,2,1,6,1,32,410,26,190,34,130,16,3,18,1); //Ganhou 26
  667.             case 32: GivePlayerAW(playerid,0,1,1,24,520,2,1,6,1,32,430,26,200,34,140,16,3,18,1);
  668.             case 33: GivePlayerAW(playerid,0,2,1,24,520,6,1,9,1,32,430,26,200,34,140,16,3,18,2); //Ganhou 9
  669.             case 34: GivePlayerAW(playerid,0,2,1,24,540,6,1,9,1,32,450,26,210,34,150,16,3,18,2);
  670.             case 35: GivePlayerAW(playerid,0,2,1,24,560,6,1,9,1,32,470,26,220,34,160,16,3,18,2);
  671.         }
  672.     }
  673. }
  674.  
  675. stock SetSkin(playerid, bool:Valor, bool:morte)
  676. {
  677.     if(PlayerInfo[playerid][pEquipe] == ZOMBIE)
  678.     {
  679.         static skin1;
  680.         switch(RandomEx(0,6))
  681.         {
  682.             case 0: skin1 = 77;
  683.             case 1: skin1 = 78;
  684.             case 2: skin1 = 79;
  685.             case 3: skin1 = 135;
  686.             case 4: skin1 = 137;
  687.             case 5: skin1 = 160;
  688.             case 6: skin1 = 162;
  689.         }
  690.         if(PlayerInfo[playerid][Morreu] == morte)
  691.         {
  692.             SetPlayerTime(playerid, 23, 0);
  693.             SetPlayerWeather(playerid, 700);
  694.             SetPlayerColor(playerid, 0xFF0000FF);
  695.             SetPlayerSkin(playerid, skin1);
  696.             PlayerInfo[playerid][pSkin] = skin1;
  697.             return 1;
  698.         }
  699.         else if(Valor == true) SetSpawnInfo(playerid, ZOMBIE, skin1, 0.0,0.0,0.0,0,0,0,0,0,0,0), SpawnPlayer(playerid);
  700.     }
  701.     else if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE)
  702.     {
  703.         static skin2;
  704.         switch(RandomEx(0,6))
  705.         {
  706.             case 0: skin2 = 288;
  707.             case 1: skin2 = 287;
  708.             case 2: skin2 = 286;
  709.             case 3: skin2 = 285;
  710.             case 4: skin2 = 240;
  711.             case 5: skin2 = 185;
  712.             case 6: skin2 = 165;
  713.         }
  714.         if(PlayerInfo[playerid][Morreu] == morte)
  715.         {
  716.             SetPlayerTime(playerid, 0, 0);
  717.             SetPlayerWeather(playerid, 9);
  718.             SetPlayerColor(playerid, 0x006400FF);
  719.             SetPlayerSkin(playerid, skin2);
  720.             PlayerInfo[playerid][pSkin] = skin2;
  721.             return 1;
  722.         }
  723.         else if(Valor == true) SetSpawnInfo(playerid, SOBREVIVENTE, skin2, 0.0,0.0,0.0,0,0,0,0,0,0,0), SpawnPlayer(playerid);
  724.     }
  725.     PlayerInfo[playerid][Morreu] = false;
  726.     return 1;
  727. }
  728.  
  729. stock RandomEx(min, max)
  730. {
  731.     new rand = random(max-min)+min;
  732.     return rand;
  733. }
  734.  
  735. stock GetName(playerid)
  736. {
  737.     static name[MAX_PLAYER_NAME];
  738.     GetPlayerName(playerid, name, sizeof(name));
  739.     return name;
  740. }
  741.  
  742. stock GetIp(playerid)
  743. {
  744.     static Ip[20];
  745.     GetPlayerIp(playerid, Ip, sizeof(Ip));
  746.     return Ip;
  747. }
  748.  
  749. stock Experiencia(inicio)
  750. {
  751.     if(inicio == 0) inicio = 1;
  752.     return (inicio*100)+100;
  753. }
  754.  
  755. stock ZBan(playerid, text[])
  756. {
  757.     new arquivo[30], Str[30], dia, mes, ano, hora, minuto;
  758.     getdate(ano, mes, dia);
  759.     gettime(hora, minuto);
  760.     format(arquivo, sizeof(arquivo), "Banidos/%s.sav", GetName(playerid));
  761.     DOF2_CreateFile(arquivo);
  762.     format(Str, sizeof(Str), "%d/%d/%d - %d:%dhrs", dia, mes, ano, hora, minuto);
  763.     DOF2_SetString(arquivo, "Data", Str);
  764.     DOF2_SetString(arquivo, "IP", GetIp(playerid));
  765.     DOF2_SetString(arquivo, "Motivo", text);
  766.     DOF2_SaveFile();
  767.     ZBanIp(playerid);
  768. }
  769.  
  770. stock ZBanIp(playerid)
  771. {
  772.     new arquivo[30];
  773.     format(arquivo, sizeof(arquivo), "IPs Banidos/%s.sav", GetIp(playerid));
  774.     DOF2_CreateFile(arquivo);
  775.     DOF2_SetString(arquivo, "Nome", GetName(playerid));
  776.     DOF2_SaveFile();
  777. }
  778.  
  779. stock PegarConta(playerid)
  780. {
  781.     static arquivo[30];
  782.     format(arquivo, sizeof(arquivo), "Contas/%s.sav", GetName(playerid));
  783.     return arquivo;
  784. }
  785.  
  786. stock SalvarConta(playerid)
  787. {
  788.     DOF2_SetInt(PegarConta(playerid), "Admin", PlayerInfo[playerid][pAdmin]);
  789.     DOF2_SetInt(PegarConta(playerid), "Equipe", PlayerInfo[playerid][pEquipe]);
  790.     DOF2_SetInt(PegarConta(playerid), "Vip", PlayerInfo[playerid][pVip]);
  791.     DOF2_SetInt(PegarConta(playerid), "Kills", PlayerInfo[playerid][pKills]);
  792.     DOF2_SetInt(PegarConta(playerid), "Death", PlayerInfo[playerid][pDeath]);
  793.     DOF2_SetInt(PegarConta(playerid), "Experiência", PlayerInfo[playerid][pExp]);
  794.     DOF2_SetInt(PegarConta(playerid), "Level", GetPlayerScore(playerid));
  795.     DOF2_SetInt(PegarConta(playerid), "Mordidas", PlayerInfo[playerid][pMordidas]);
  796.     DOF2_SetInt(PegarConta(playerid), "Skin", GetPlayerSkin(playerid));
  797.     DOF2_SetInt(PegarConta(playerid), "Mordido", PlayerInfo[playerid][pMordido]);
  798.     DOF2_SaveFile();
  799. }
  800.  
  801. stock CarregarConta(playerid)
  802. {
  803.     if(DOF2_FileExists(PegarConta(playerid)))
  804.     {
  805.         PlayerInfo[playerid][pAdmin] = DOF2_GetInt(PegarConta(playerid), "Admin");
  806.         PlayerInfo[playerid][pVip] = DOF2_GetInt(PegarConta(playerid), "Vip");
  807.         PlayerInfo[playerid][pEquipe] = DOF2_GetInt(PegarConta(playerid), "Equipe");
  808.         PlayerInfo[playerid][pKills] = DOF2_GetInt(PegarConta(playerid), "Kills");
  809.         PlayerInfo[playerid][pDeath] = DOF2_GetInt(PegarConta(playerid), "Death");
  810.         PlayerInfo[playerid][pExp] = DOF2_GetInt(PegarConta(playerid), "Experiência");
  811.         PlayerInfo[playerid][pLevel] = DOF2_GetInt(PegarConta(playerid), "Level");
  812.         PlayerInfo[playerid][pMordidas] = DOF2_GetInt(PegarConta(playerid), "Mordidas");
  813.         PlayerInfo[playerid][pSkin] = DOF2_GetInt(PegarConta(playerid), "Skin");
  814.         PlayerInfo[playerid][pMordido] = DOF2_GetInt(PegarConta(playerid), "Mordido");
  815.         SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  816.         if(PlayerInfo[playerid][pLevel] == 0) PlayerInfo[playerid][pLevel] = 1, SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  817.     }
  818. }
  819.  
  820. //---------------------------ADMINISTRADORES---------------------------
  821. CMD:daradmin(playerid, params[])
  822. {
  823.     if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] < 5)
  824.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5 ou não está logado na RCON!");
  825.  
  826.     new id, level, Str[70];
  827.     if(sscanf(params, "id", id, level))
  828.         return SendClientMessage(playerid, COR_CINZA, "USE: /daradmin [Id do Player] [Nivel do Admin]");
  829.  
  830.     if(!IsPlayerConnected(id))
  831.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  832.  
  833.     PlayerInfo[id][pAdmin] = level;
  834.     format(Str, sizeof(Str), "Você deu ao %s, %d niveis de Administrador!", GetName(id), level);
  835.     SendClientMessage(playerid, COR_SKYBLUE, Str);
  836.     format(Str, sizeof(Str), "Você ganhou %d leveis de Administrador!", level);
  837.     SendClientMessage(id, COR_SKYBLUE, Str);
  838.     return 1;
  839. }
  840.  
  841. CMD:av(playerid, params[])
  842. {
  843.     return cmd_aviso(playerid, params);
  844. }
  845.  
  846. CMD:aviso(playerid, params[])
  847. {
  848.     if(PlayerInfo[playerid][pAdmin] < 1)
  849.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  850.  
  851.     new texto[150];
  852.     if(sscanf(params, "s[150]", texto))
  853.         return SendClientMessage(playerid, COR_CINZA, "USE: /aviso [Texto] ou /av [Texto]");
  854.  
  855.     format(texto, sizeof(texto), "** AVISO DA ADMINISTRAÇÃO ** %s: %s **", GetName(playerid), texto);
  856.     SendClientMessageToAll(COR_VERMELHO, texto);
  857.     return 1;
  858. }
  859.  
  860. CMD:setar(playerid, params[])
  861. {
  862.     if(PlayerInfo[playerid][pAdmin] < 3)
  863.         return SendClientMessage(playerid, COR_CINZA, "Você não tem permissão para usar esse comando!");
  864.  
  865.     new id, time, Str[128], nometime[13];
  866.     if(sscanf(params, "id", id, time))
  867.         return SendClientMessage(playerid, COR_CINZA, "USE: /setar [Id do Player] [1 ou 2] (1 = Zombie | 2 = Sobrevivente)");
  868.  
  869.     if(!IsPlayerConnected(id))
  870.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  871.  
  872.     PlayerInfo[id][pEquipe] = time;
  873.     if(time == 1) nometime = "Zombie";
  874.     else if(time == 2) nometime = "Sobrevivente";
  875.     format(Str, sizeof(Str), "** AVISO DA ADMINISTRAÇÃO ** %s setou %s para %s **", GetName(playerid), GetName(id), nometime);
  876.     SendClientMessageToAll(COR_VERMELHO, Str);
  877.     SpawnPlayer(id);
  878.     DarArmas(id);
  879.     AtualizarExp(id);
  880.     return 1;
  881. }
  882.  
  883. CMD:a(playerid, params[])
  884. {
  885.     if(PlayerInfo[playerid][pAdmin] < 1)
  886.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  887.  
  888.     new texto[150];
  889.     if(sscanf(params, "s[150]", texto))
  890.         return SendClientMessage(playerid, COR_CINZA, "USE: /a [Texto]");
  891.  
  892.     format(texto, sizeof(texto), "** %s: %s **", GetName(playerid), texto);
  893.     for(new i; i < MAX_PLAYERS; ++i)
  894.         if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) SendClientMessage(i, COR_TOMATO, texto);
  895.     return 1;
  896. }
  897.  
  898. CMD:congelar(playerid, params[])
  899. {
  900.     if(PlayerInfo[playerid][pAdmin] < 1)
  901.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  902.  
  903.     new id, Float:X, Float:Y, Float:Z, Str[100];
  904.     GetPlayerPos(id, X, Y, Z);
  905.     if(sscanf(params, "i", id))
  906.         return SendClientMessage(playerid, COR_CINZA, "USE: /congelar [Id do Player]");
  907.  
  908.     if(!IsPlayerConnected(id))
  909.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  910.  
  911.     SetPlayerPos(id, X, Y, Z+1);
  912.     TogglePlayerControllable(id, false);
  913.     format(Str, sizeof(Str), "** %s foi congelado pelo Administrador %s **", GetName(id), GetName(playerid));
  914.     SendClientMessageToAll(COR_VERMELHO, Str);
  915.     return 1;
  916. }
  917.  
  918. CMD:descongelar(playerid, params[])
  919. {
  920.     if(PlayerInfo[playerid][pAdmin] < 1)
  921.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  922.  
  923.     new id, Str[100];
  924.     if(sscanf(params, "i", id))
  925.         return SendClientMessage(playerid, COR_CINZA, "USE: /descongelar [Id do Player]");
  926.  
  927.     if(!IsPlayerConnected(id))
  928.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  929.  
  930.     TogglePlayerControllable(id, true);
  931.     format(Str, sizeof(Str), "** %s foi descongelado pelo Administrador %s **", GetName(id), GetName(playerid));
  932.     SendClientMessageToAll(COR_VERMELHO, Str);
  933.     return 1;
  934. }
  935.  
  936. CMD:veh(playerid, params[])
  937. {
  938.     if(PlayerInfo[playerid][pAdmin] < 2)
  939.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 2!");
  940.  
  941.     new car;
  942.     if(sscanf(params, "d", car))
  943.         return SendClientMessage(playerid, COR_CINZA, "USE: /veh [Modelo do Veículo]");
  944.  
  945.     new Float:X, Float:Y, Float:Z, Float:A;
  946.     GetPlayerPos(playerid, X, Y, Z);
  947.     GetPlayerFacingAngle(playerid, A);
  948.     CreateVehicle(car, X+1, Y, Z, A, 0, 0, -1);
  949.     return 1;
  950. }
  951.  
  952. CMD:trazer(playerid, params[])
  953. {
  954.     if(PlayerInfo[playerid][pAdmin] < 1)
  955.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  956.  
  957.     new id, Float:X, Float:Y, Float:Z, Str[40];
  958.     GetPlayerPos(playerid, X, Y, Z);
  959.     if(sscanf(params, "i", id))
  960.         return SendClientMessage(playerid, COR_CINZA, "USE: /trazer [Id do Player]");
  961.  
  962.     if(!IsPlayerConnected(id))
  963.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  964.  
  965.     if(IsPlayerInAnyVehicle(id) && GetPlayerState(id) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(id), X+1, Y, Z), PutPlayerInVehicle(id, GetPlayerVehicleID(id), 0);
  966.     else SetPlayerPos(id, X+1, Y, Z);
  967.     format(Str, sizeof(Str), "%s te trouxe até ele.", GetName(playerid));
  968.     SendClientMessage(id, COR_SKYBLUE, Str);
  969.     return 1;
  970. }
  971.  
  972. CMD:ir(playerid, params[])
  973. {
  974.     if(PlayerInfo[playerid][pAdmin] < 1)
  975.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  976.  
  977.     new id, Float:X, Float:Y, Float:Z, Str[40];
  978.     if(sscanf(params, "i", id))
  979.         return SendClientMessage(playerid, COR_CINZA, "USE: /ir [Id do Player]");
  980.  
  981.     if(!IsPlayerConnected(id))
  982.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  983.  
  984.     GetPlayerPos(id, X, Y, Z);
  985.     if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), X+1, Y, Z), PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
  986.     else SetPlayerPos(playerid, X+1, Y, Z);
  987.     format(Str, sizeof(Str), "%s veio até voce.", GetName(playerid));
  988.     SendClientMessage(id, COR_SKYBLUE, Str);
  989.     return 1;
  990. }
  991.  
  992. CMD:trazertodos(playerid, params[])
  993. {
  994.     if(PlayerInfo[playerid][pAdmin] < 3)
  995.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 3!");
  996.  
  997.     new equipe, Float:X, Float:Y, Float:Z;
  998.     GetPlayerPos(playerid, X, Y, Z);
  999.     if(sscanf(params, "d", equipe))
  1000.         return SendClientMessage(playerid, COR_CINZA, "USE: /trazertodos [1 ou 2] (1 = Zombies | 2 = Sobreviventes)");
  1001.  
  1002.     new rand = random(3);
  1003.     for(new i; i < MAX_PLAYERS; ++i)
  1004.         if(PlayerInfo[i][pEquipe] == equipe) SendClientMessage(playerid, COR_VERMELHO, "O Administrador trouxe você até ele!"), SetPlayerPos(i, X+rand, Y+rand, Z);
  1005.     return 1;
  1006. }
  1007.  
  1008. CMD:gmx(playerid)
  1009. {
  1010.     if(PlayerInfo[playerid][pAdmin] < 4)
  1011.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 4!");
  1012.     SendRconCommand("gmx");
  1013.     return 1;
  1014. }
  1015.  
  1016. CMD:kick(playerid, params[])
  1017. {
  1018.     if(PlayerInfo[playerid][pAdmin] < 1)
  1019.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  1020.  
  1021.     new id, motivo[30], Str[100];
  1022.     if(sscanf(params, "is[30]", id, motivo))
  1023.         return SendClientMessage(playerid, COR_CINZA, "USE: /kick [Id do Player]");
  1024.  
  1025.     if(!IsPlayerConnected(id))
  1026.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  1027.  
  1028.     format(Str, sizeof(Str), "** AVISO ** %s foi kickado por %s. Motivo: %s **", GetName(id), GetName(playerid), motivo);
  1029.     SendClientMessageToAll(COR_VERMELHO, Str);
  1030.     Kick(id);
  1031.     return 1;
  1032. }
  1033.  
  1034. CMD:ban(playerid, params[])
  1035. {
  1036.     if(PlayerInfo[playerid][pAdmin] < 1)
  1037.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  1038.  
  1039.     new id, motivo[30], Str[100];
  1040.     if(sscanf(params, "is[30]", id, motivo))
  1041.         return SendClientMessage(playerid, COR_CINZA, "USE: /ban [Id do Player] [Motivo]");
  1042.  
  1043.     if(!IsPlayerConnected(id))
  1044.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  1045.  
  1046.     format(Str, sizeof(Str), "** AVISO ** %s foi banido por %s. Motivo: %s **", GetName(id), GetName(playerid), motivo);
  1047.     SendClientMessageToAll(COR_VERMELHO, Str);
  1048.     ZBan(id, motivo);
  1049.     Kick(id);
  1050.     return 1;
  1051. }
  1052.  
  1053. CMD:desban(playerid, params[])
  1054. {
  1055.     if(PlayerInfo[playerid][pAdmin] < 5)
  1056.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5!");
  1057.  
  1058.     new id, nome[MAX_PLAYER_NAME], arquivo[50], arquivo2[50], ip[32], Str[50];
  1059.     GetPlayerName(id, nome, sizeof(nome));
  1060.     if(sscanf(params, "s[32]", nome))
  1061.         return SendClientMessage(playerid, COR_CINZA, "USE: /desban [Nome do Player]");
  1062.  
  1063.     format(arquivo2, sizeof(arquivo2), "IPs Banidos/%s.sav", GetIp(id));
  1064.     format(arquivo, sizeof(arquivo), "Banidos/%s.sav", nome);
  1065.     if(DOF2_FileExists(arquivo))
  1066.     {
  1067.         if(strcmp(arquivo, nome, true) == 0)
  1068.         {
  1069.             DOF2_RemoveFile(arquivo);
  1070.             if(strcmp(DOF2_GetString(arquivo, ip, "Ip"), arquivo2, true) == 0) DOF2_RemoveFile(arquivo2);
  1071.             format(Str, sizeof(Str), "Você desbaniu a conta de %s.", nome);
  1072.             SendClientMessage(playerid, COR_VERMELHO, Str);
  1073.         }
  1074.     }
  1075.     else SendClientMessage(playerid, COR_VERMELHO, "Esse nome não esta Banido!");
  1076.     return 1;
  1077. }
  1078.  
  1079. CMD:setlevel(playerid, params[])
  1080. {
  1081.     if(PlayerInfo[playerid][pAdmin] < 5)
  1082.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5!");
  1083.  
  1084.     new id, level, Str[100];
  1085.     if(sscanf(params, "id", id, level))
  1086.         return SendClientMessage(playerid, COR_CINZA, "USE: /setlevel [Id do Player] [Numero do Level]");
  1087.  
  1088.     if(!IsPlayerConnected(id))
  1089.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  1090.  
  1091.     PlayerInfo[id][pLevel] = level;
  1092.     SetPlayerScore(id, level);
  1093.     format(Str, sizeof(Str), "** Administrador %s setou seu level para %d. **", GetName(playerid), level);
  1094.     SendClientMessage(id, COR_VERMELHO, Str);
  1095.     DarArmas(id);
  1096.     AtualizarExp(id);
  1097.     Status(id);
  1098.     return 1;
  1099. }
  1100.  
  1101. CMD:trabalhar(playerid)
  1102. {
  1103.     if(PlayerInfo[playerid][pAdmin] < 1)
  1104.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
  1105.  
  1106.     new Str[70];
  1107.     if(PlayerInfo[playerid][pTrampando] == true)
  1108.     {
  1109.         PlayerInfo[playerid][pTrampando] = false;
  1110.         format(Str, sizeof(Str), "** Administrador %s[ID %d] está de Folga **", GetName(playerid), playerid);
  1111.     }
  1112.     else
  1113.     {
  1114.         format(Str, sizeof(Str), "** Administrador %s[ID %d] está Trabalhando **", GetName(playerid), playerid);
  1115.         PlayerInfo[playerid][pTrampando] = true;
  1116.     }
  1117.     SendClientMessageToAll(COR_VERMELHO, Str);
  1118.     return 1;
  1119. }
  1120.  
  1121. CMD:darvip(playerid, params[])
  1122. {
  1123.     if(PlayerInfo[playerid][pAdmin] < 5)
  1124.         return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5!");
  1125.  
  1126.     new id, vip, Str[100];
  1127.     if(sscanf(params, "id", id, vip))
  1128.         return SendClientMessage(playerid, COR_CINZA, "USE: /darvip [Id do Player] [Nivel do Vip] (1 à 3)");
  1129.  
  1130.     if(0 < vip > 3)
  1131.         return SendClientMessage(playerid, COR_CINZA, "O Vip não pode ser menor que 0 e maior que 3!");
  1132.  
  1133.     PlayerInfo[id][pVip] = vip;
  1134.     format(Str, sizeof(Str), "Administrador %s deu %s {FF0000}para você.", GetName(playerid), Vip(id));
  1135.     SendClientMessage(id, COR_VERMELHO, Str);
  1136.     return 1;
  1137. }
  1138.  
  1139. //---------------------------JOGADORES---------------------------
  1140. CMD:reportar(playerid, params[])
  1141. {
  1142.     if(Logado[playerid] == false) return true;
  1143.     new id, texto[128];
  1144.     if(sscanf(params, "is[128]", id, texto))
  1145.         return SendClientMessage(playerid, COR_CINZA, "USE: /reportar [Id do Player] [Texto/Motivo]");
  1146.  
  1147.     if(!IsPlayerConnected(id))
  1148.         return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
  1149.  
  1150.     SendClientMessage(playerid, COR_LARANJA, "O jogador foi reportado, Obrigado.");
  1151.     format(texto, sizeof(texto), "** %s[%d] reportou o %s[%d] >> %s << **", GetName(playerid), playerid, GetName(id), id, texto);
  1152.     for(new i; i < MAX_PLAYERS; ++i)
  1153.         if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1) SendClientMessage(i, COR_SPINGREEN, texto);
  1154.     return 1;
  1155. }
  1156.  
  1157. CMD:admins(playerid)
  1158. {
  1159.     new Str[128];
  1160.     if(Logado[playerid] == false) return true;
  1161.     for(new i; i < MAX_PLAYERS; ++i)
  1162.         if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0 && PlayerInfo[i][pTrampando] == true) format(Str, sizeof(Str), "  {FFFFFF}[Level %d]    -    {FF0000}%s[ID %d]    {FFFFFF}-    Trabalhando", PlayerInfo[i][pAdmin], GetName(i), i);
  1163.         else if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0 && PlayerInfo[i][pTrampando] == false) format(Str, sizeof(Str), "  {FFFFFF}[Level %d]    -    {FF0000}%s[ID %d]    {FFFFFF}-    De Folga", PlayerInfo[i][pAdmin], GetName(i), i);
  1164.     ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "{FF0000}Administradores Online", Str, "Ok", "");
  1165.     return 1;
  1166. }
  1167.  
  1168. CMD:mp(playerid, params[])
  1169. {
  1170.     new Str[150], texto[128], id;
  1171.     if(Logado[playerid] == false) return true;
  1172.     if(sscanf(params, "is[128]", id, texto))
  1173.         return SendClientMessage(playerid, COR_CINZA, "USE: /mp [Id do Player] [Mensagem]");
  1174.  
  1175.     format(Str, sizeof(Str), "MP de %d[ID %d]: %s.", GetName(playerid), playerid, texto);
  1176.     SendClientMessage(id, COR_AMARELO, Str);
  1177.     return 1;
  1178. }
  1179.  
  1180. CMD:creditos(playerid)
  1181. {
  1182.     ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "Créditos do GameMode Zombie","Este GameMode foi totalmente criado e identado por Edit_Pawn.\n\n\nBom Jogo!", "Ok", "");
  1183.     return 1;
  1184. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement