Advertisement
Chip7

[GM] GameMode Brasil Zombie Games LS

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