Advertisement
EditPawn

Brasil Zombie Games LS

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