Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------INCLUDES------------------
- #include a_samp
- #include DOF2
- #include sscanf2
- #include zcmd
- //------------------DEFINES------------------
- #if defined MAX_VEHICLES
- #undef MAX_VEHICLES
- #define MAX_VEHICLES (100) //Número de CARROS
- #endif
- #if defined MAX_PLAYERS
- #undef MAX_PLAYERS
- #define MAX_PLAYERS (51) //Número de Slots + 1
- #endif
- //-------------------------------------------
- #define DIALOG_REGISTRO 1
- #define DIALOG_LOGIN 2
- #define DIALOG_ADMINS 3
- //-------------------------------------------
- #define ZOMBIE 1
- #define SOBREVIVENTE 2
- //-------------------------------------------
- #define COR_CINZA 0xBEBEBEFF
- #define COR_VERMELHO 0xFF0000FF
- #define COR_VERDE 0x32CD32FF
- #define COR_SKYBLUE 0x00BFFFFF
- #define COR_SPINGREEN 0x00FF7FFF
- #define COR_TOMATO 0xFF6347FF
- #define COR_LARANJA 0xFF4500FF
- #define COR_BRANCO 0xFFFFFFFF
- #define COR_AMARELO 0xFFFF00FF
- //-------------------------------------------
- #define Veh(%0,%1,%2) GetPlayerVehicleID(%0) >= Carro[%1] && GetPlayerVehicleID(%0) <= Carro[%2]
- //------------------ENUMS------------------
- enum pInfo
- {
- pSenha[20],
- pAdmin,
- pSkin,
- bool:pTrampando,
- pVip,
- pKills,
- pDeath,
- pExp,
- pLevel,
- pMordidas,
- pMordido,
- pEquipe,
- bool:Morreu,
- }
- //------------------NEWS------------------
- static bool:Logado[MAX_PLAYERS];
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new Text3D:label[MAX_PLAYERS];
- new Carro[70];
- new timerinfectados;
- new Text:status[MAX_PLAYERS];
- new Text:bemvindo, Text:cima, Text:baixo, Text:lszombie, Text:antidoto;
- new Float:SpawnZombie[44][3] =
- {
- {836.1734, -1101.9551, 26.4229}, {838.5415, -1094.0393, 26.4229}, {843.2672, -1093.6980, 26.4229}, {848.6511, -1093.2462, 26.4229},
- {858.1096, -1093.1776, 26.4229}, {838.0835, -1113.7402, 26.4229}, {843.0709, -1114.5990, 26.4229}, {848.6172, -1114.2725, 26.4229},
- {851.7316, -1114.5531, 26.4229}, {858.0530, -1114.3837, 26.4229}, {2530.3794, -1545.4868, 25.3064}, {2534.1062, -1542.2336, 25.3064},
- {2534.1272, -1537.7250, 25.3064}, {2525.9597, -1537.8176, 25.3064}, {2526.0503, -1542.0000, 25.3064}, {2512.6179, -1541.8892, 25.3064},
- {2517.3477, -1539.7266, 25.3064}, {2517.2639, -1534.5876, 25.3064}, {2509.5103, -1536.7826, 25.3064}, {2520.5103, -1551.2627, 25.3064},
- {2118.9448, -1924.8828, 15.6893}, {2114.7327, -1922.8312, 15.6893}, {2114.9233, -1920.2969, 15.6893}, {2122.8245, -1922.4473, 15.6893},
- {2123.2239, -1918.2350, 15.6893}, {2118.4258, -1933.6508, 15.6893}, {2114.3250, -1913.0472, 15.6893}, {2122.4663, -1912.6233, 15.6893},
- {2122.2239, -1907.4479, 15.6893}, {2113.6804, -1909.3613, 15.6893}, {1691.4183, -1011.8914, 27.6193}, {1687.1150, -1015.6617, 27.6193},
- {1694.8616, -1017.2549, 27.6193}, {1687.0587, -1023.3969, 27.6193}, {1694.6317, -1025.1316, 27.6193}, {1686.8806, -1029.6344, 27.6193},
- {1723.9949, -1014.4910, 27.6193}, {1719.9021, -1017.8657, 27.6193}, {1727.9048, -1018.3012, 27.6193}, {1727.3323, -1024.7170, 27.6193},
- {1719.5500, -1023.8514, 27.6193}, {1726.8396, -1026.7395, 27.6193}, {1719.1688, -1029.6111, 27.6193}, {1686.6157, -1055.4481, 27.6193}
- };
- new Float:SpawnSobrevivente[14][3] =
- {
- {1628.6871, -1510.7421, 17.7631}, {1791.4050, -1424.7606, 14.3843}, {2028.4742, -1283.7611, 22.0454}, {2045.2028, -1009.7589, 42.6196},
- {1233.2827, -1085.7629, 31.5107}, {721.7937, -1277.0675, 18.6249}, {670.0783, -1647.1565, 17.0778}, {277.6506, -1434.0728, 15.1065},
- {540.0300, -1814.3829, 7.9677}, {529.0888, -1765.7784, 18.9507}, {1068.2498, -1630.2069, 21.4583}, {1233.8923, -1654.1741, 19.1407},
- {1579.7363, -1635.2448, 14.6757}, {1654.6130, -1657.1188, 23.8309}
- };
- main()
- {
- print("\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
- print("-=| Brasil Zombie Games LS |=-");
- print("-=| Criado por Edit_pawn |=-");
- print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
- print("-=| Não retire os créditos! |=-");
- print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
- }
- //------------------PUBLICS------------------
- public OnGameModeInit()
- {
- //--------------ZOMBIES--------------
- AddPlayerClass(77,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(78,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(79,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(135,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(137,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(160,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(162,0,0,0,0,0,0,0,0,0,0);
- //--------------HUMANOS--------------
- AddPlayerClass(288,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(287,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(286,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(285,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(240,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(185,0,0,0,0,0,0,0,0,0,0);
- AddPlayerClass(165,0,0,0,0,0,0,0,0,0,0);
- //-------------------------------------
- Carro[0] = CreateVehicle(425, 2205.7964, -2601.5713, 15.2047, 300.2174, -1, -1, -1);
- Carro[1] = CreateVehicle(432, 2205.9734, -2626.1995, 13.8974, 268.1765, -1, -1, -1);
- Carro[2] = CreateVehicle(433, 2207.0818, -2576.6833, 14.3347, 270.0705, -1, -1, -1);
- Carro[3] = CreateVehicle(455, 2235.8777, -2556.0872, 16.7021, 32.3252, -1, -1, -1);
- Carro[4] = CreateVehicle(470, 2228.8953, -2543.1643, 14.0238, 39.3313, -1, -1, -1);
- Carro[5] = CreateVehicle(548, 2221.1809, -2625.7900, 16.3556, 351.0120, -1, -1, -1);
- Carro[6] = CreateVehicle(432, 2219.6140, -2601.2637, 13.8974, 298.6396, -1, -1, -1);
- Carro[7] = CreateVehicle(432, 2206.3523, -2611.6177, 13.8974, 268.1765, -1, -1, -1);
- Carro[8] = CreateVehicle(432, 2206.1389, -2618.5601, 13.8974, 268.1765, -1, -1, -1);
- Carro[9] = CreateVehicle(433, 2233.5540, -2580.2695, 14.2957, 324.7043, -1, -1, -1);
- Carro[10] = CreateVehicle(433, 2219.3289, -2575.4768, 14.3547, 357.4059, -1, -1, -1);
- Carro[11] = CreateVehicle(470, 2208.3135, -2559.6108, 14.0238, 271.5002, -1, -1, -1);
- Carro[12] = CreateVehicle(470, 2208.1987, -2555.6953, 14.0238, 271.5002, -1, -1, -1);
- Carro[13] = CreateVehicle(470, 2208.0867, -2551.8975, 14.0238, 271.5002, -1, -1, -1);
- Carro[14] = CreateVehicle(470, 2207.9531, -2547.8540, 14.0238, 271.5002, -1, -1, -1);
- Carro[15] = CreateVehicle(548, 2213.2468, -2533.5466, 16.3556, 206.3101, -1, -1, -1);
- Carro[16] = CreateVehicle(425, 2232.0059, -2532.3997, 15.2047, 50.2128, -1, -1, -1);
- Carro[17] = CreateVehicle(425, 2208.7627, -2586.3896, 15.2047, 300.2174, -1, -1, -1);
- Carro[18] = CreateVehicle(548, 2235.4976, -2613.5532, 16.3556, 54.1722, -1, -1, -1);
- Carro[19] = CreateVehicle(446, 346.1541, -2006.9304, 6.8810, 29.3121, -1, -1, -1);
- Carro[20] = CreateVehicle(446, 193.0346, -1909.1675, 6.8810, 297.7152, -1, -1, -1);
- Carro[21] = CreateVehicle(468, 166.5993, -1870.5837, 2.9807, 311.3822, -1, -1, -1);
- Carro[22] = CreateVehicle(468, 166.6317, -1873.0739, 2.9807, 293.3457, -1, -1, -1);
- Carro[23] = CreateVehicle(471, 164.1486, -1880.1073, 5.7328, 254.7601, -1, -1, -1);
- Carro[24] = CreateVehicle(500, 247.4742, -1867.0563, 3.6231, 122.5231, -1, -1, -1);
- Carro[25] = CreateVehicle(500, 202.4003, -1881.8672, 2.4987, 326.0000, -1, -1, -1);
- Carro[26] = CreateVehicle(605, 355.6978, -1828.4116, 4.6166, 35.1670, -1, -1, -1);
- Carro[27] = CreateVehicle(604, 310.8645, -1628.4619, 34.6247, 342.2196, -1, -1, -1);
- Carro[28] = CreateVehicle(588, 500.7606, -1579.9359, 16.9958, 0.0000, -1, -1, -1);
- Carro[29] = CreateVehicle(583, 633.5965, -1850.0237, 5.8774, 0.0000, -1, -1, -1);
- Carro[30] = CreateVehicle(603, 847.4252, -2034.9385, 13.8568, 351.3365, -1, -1, -1);
- Carro[31] = CreateVehicle(555, 1017.3526, -2041.8062, 13.9318, 342.6939, -1, -1, -1);
- Carro[32] = CreateVehicle(552, 1120.3849, -1878.0208, 14.2739, 6.2661, -1, -1, -1);
- Carro[33] = CreateVehicle(546, 1254.1627, -1800.9672, 14.0440, 0.0000, -1, -1, -1);
- Carro[34] = CreateVehicle(416, 2035.6638, -1411.5822, 19.6009, 9.9148, -1, -1, -1);
- Carro[35] = CreateVehicle(455, 1613.5441, -1879.7257, 14.5926, 16.3739, -1, -1, -1);
- Carro[36] = CreateVehicle(456, 1932.4481, -1781.0778, 14.1326, 335.7611, -1, -1, -1);
- Carro[37] = CreateVehicle(458, 2141.9807, -1680.1421, 16.0648, 356.0237, -1, -1, -1);
- Carro[38] = CreateVehicle(445, 1890.1085, -1161.8015, 26.6478, 11.2574, -1, -1, -1);
- Carro[39] = CreateVehicle(439, 1433.5450, -1021.8253, 24.2084, 351.9252, -1, -1, -1);
- Carro[40] = CreateVehicle(438, 1321.6984, -914.9293, 37.2570, 32.2953, -1, -1, -1);
- Carro[41] = CreateVehicle(422, 739.7659, -1139.8473, 19.4733, 359.0469, -1, -1, -1);
- Carro[42] = CreateVehicle(408, 562.6777, -1248.1298, 18.5212, 0.0000, -1, -1, -1);
- Carro[43] = CreateVehicle(404, 263.7034, -1455.4384, 23.7472, 0.0000, -1, -1, -1);
- Carro[44] = CreateVehicle(402, 167.6340, -1563.9324, 13.0723, 19.2067, -1, -1, -1);
- Carro[45] = CreateVehicle(400, 243.0518, -1637.2518, 35.1983, 0.0000, -1, -1, -1);
- Carro[46] = CreateVehicle(515, 868.4933, -1671.6573, 15.3685, 331.7634, -1, -1, -1);
- Carro[47] = CreateVehicle(517, 1066.4572, -1624.9633, 21.2715, 0.6437, -1, -1, -1);
- Carro[48] = CreateVehicle(508, 1279.6697, -1568.9061, 15.4689, 109.5266, -1, -1, -1);
- Carro[49] = CreateVehicle(505, 1487.8722, -1650.4080, 15.5012, 0.0000, -1, -1, -1);
- Carro[50] = CreateVehicle(525, 1576.9286, -1616.9972, 30.0462, 3.4488, -1, -1, -1);
- Carro[51] = CreateVehicle(523, 1659.3014, -1689.6359, 25.9981, 0.0000, -1, -1, -1);
- Carro[52] = CreateVehicle(528, 1610.1472, -1678.8452, 6.4830, 15.5981, -1, -1, -1);
- Carro[53] = CreateVehicle(427, 1531.3712, -1674.0092, 6.9617, 341.3008, -1, -1, -1);
- Carro[54] = CreateVehicle(428, 1351.2856, -1598.9846, 15.5094, 251.0000, -1, -1, -1);
- Carro[55] = CreateVehicle(431, 1449.7185, -937.9919, 39.5769, 153.7971, -1, -1, -1);
- Carro[56] = CreateVehicle(482, 2169.7954, -1045.6193, 60.7030, 352.0719, -1, -1, -1);
- Carro[57] = CreateVehicle(531, 2319.4048, -1170.1780, 29.0404, 0.0000, -1, -1, -1);
- Carro[58] = CreateVehicle(530, 2292.3291, -1358.7319, 23.7029, 0.0000, -1, -1, -1);
- Carro[59] = CreateVehicle(544, 2427.6064, -1445.8141, 25.3729, 7.3407, -1, -1, -1);
- Carro[60] = CreateVehicle(598, 2454.3030, -1224.0614, 30.7822, 0.0000, -1, -1, -1);
- Carro[61] = CreateVehicle(599, 2716.8650, -1179.0126, 71.5653, 6.7004, -1, -1, -1);
- Carro[62] = CreateVehicle(596, 2894.1270, -1092.4778, 13.0179, 6.1183, -1, -1, -1);
- Carro[63] = CreateVehicle(597, 2894.9900, -1092.1405, 15.5791, 52.7703, -1, -1, -1);
- Carro[64] = CreateVehicle(601, 2882.3406, -1945.5427, 9.0440, 42.3836, -1, -1, -1);
- Carro[65] = CreateVehicle(568, 2701.8054, -1941.5140, 16.4178, 6.7293, -1, -1, -1);
- Carro[66] = CreateVehicle(566, 2552.7061, -1968.8751, 5.9133, 1.4331, -1, -1, -1);
- Carro[67] = CreateVehicle(524, 2416.6729, -1803.6486, 32.4104, 164.2336, -1, -1, -1);
- Carro[68] = CreateVehicle(486, 2366.1091, -1587.3159, 19.3224, 7.1499, -1, -1, -1);
- Carro[69] = CreateVehicle(459, 1953.5948, -1383.6039, 19.0282, 0.0000, -1, -1, -1);
- //-------------------------------------
- timerinfectados = SetTimer("AtualizarInfectados", 5000, true);
- SetGameModeText("LS Zombie v1.0");
- SendRconCommand("mapname [LS Zombie]");
- ShowNameTags(1);
- AllowInteriorWeapons(0);
- LimitPlayerMarkerRadius(40.0);
- ShowPlayerMarkers(2);
- SetWeather(9);
- TextDraw();
- AtualizarInfectados();
- return 1;
- }
- public OnGameModeExit()
- {
- for(new i; i < 100; ++i)
- {
- i++;
- if(DOF2_FileExists(PegarConta(i)))
- {
- DOF2_SetInt(PegarConta(i), "Equipe", 0);
- DOF2_SetInt(PegarConta(i), "Mordido", 0);
- }
- }
- TextDrawDestroy(bemvindo);
- TextDrawDestroy(cima);
- TextDrawDestroy(baixo);
- TextDrawDestroy(antidoto);
- KillTimer(timerinfectados);
- DOF2_Exit();
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(Logado[playerid] == false)
- {
- SetPlayerColor(playerid, 0xBEBEBEFF);
- SetPlayerPos(playerid, 2924.9727, -1563.8043, 11.0469);
- SetPlayerFacingAngle(playerid, 86.8798);
- SetPlayerCameraPos(playerid, 2920.7109, -1563.5922, 12.0877);
- SetPlayerCameraLookAt(playerid, 2924.9727, -1563.8043, 11.0469);
- CarregarConta(playerid);
- switch(classid)
- {
- case 0 .. 6:
- {
- GameTextForPlayer(playerid, "~r~Zombie", 5000, 4);
- PlayerInfo[playerid][pEquipe] = ZOMBIE;
- }
- case 7 .. 13:
- {
- GameTextForPlayer(playerid, "~g~Sobrevivente", 5000, 4);
- PlayerInfo[playerid][pEquipe] = SOBREVIVENTE;
- }
- }
- return 1;
- }
- else if(Logado[playerid] == true)
- {
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- SpawnPlayer(playerid);
- return 1;
- }
- return 0;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, antidoto);
- TextDrawShowForPlayer(playerid, lszombie);
- TextDrawHideForPlayer(playerid, cima);
- TextDrawHideForPlayer(playerid, baixo);
- TextDrawHideForPlayer(playerid, bemvindo);
- StopAudioStreamForPlayer(playerid);
- Logado[playerid] = true;
- PlayerInfo[playerid][Morreu] = false;
- if(PlayerInfo[playerid][pEquipe] == ZOMBIE || PlayerInfo[playerid][pMordido] > 0)
- {
- PlayerInfo[playerid][pEquipe] = ZOMBIE;
- new randz = random(sizeof(SpawnZombie));
- SetPlayerPos(playerid,SpawnZombie[randz][0],SpawnZombie[randz][1],SpawnZombie[randz][2]);
- }
- else if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE)
- {
- PlayerInfo[playerid][pEquipe] = SOBREVIVENTE;
- new rands = random(sizeof(SpawnSobrevivente));
- SetPlayerPos(playerid,SpawnSobrevivente[rands][0],SpawnSobrevivente[rands][1],SpawnSobrevivente[rands][2]);
- }
- AtualizarExp(playerid);
- DarArmas(playerid);
- Status(playerid);
- SetSkin(playerid, false, false);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawShowForPlayer(playerid, cima);
- TextDrawShowForPlayer(playerid, baixo);
- TextDrawShowForPlayer(playerid, bemvindo);
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pVip] = 0;
- PlayerInfo[playerid][pKills] = 0;
- PlayerInfo[playerid][pDeath] = 0;
- PlayerInfo[playerid][pExp] = 0;
- PlayerInfo[playerid][pLevel] = 0;
- PlayerInfo[playerid][pMordidas] = 0;
- PlayerInfo[playerid][pMordido] = 0;
- PlayerInfo[playerid][pEquipe] = 0;
- PlayerInfo[playerid][Morreu] = false;
- PlayerInfo[playerid][pTrampando] = false;
- Logado[playerid] = false;
- //--------------------------------------------------------------------------
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
- SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
- //--------------------------------------------------------------------------
- SetPlayerTime(playerid, 0, 0);
- CarregarConta(playerid);
- new arquivo[30], arquivo2[30];
- format(arquivo, sizeof(arquivo), "Banidos/%s.sav", GetName(playerid));
- format(arquivo2, sizeof(arquivo2), "IPs Banidos/%s.sav", GetIp(playerid));
- if(DOF2_FileExists(arquivo))
- {
- SendClientMessage(playerid, COR_VERMELHO, "Você foi banido do servidor!");
- SendClientMessage(playerid, COR_VERMELHO, "Vá ao forum e peça para ser Desbanido!");
- return Kick(playerid);
- }
- if(DOF2_FileExists(arquivo2))
- {
- SendClientMessage(playerid, COR_VERMELHO, "Você foi banido do servidor!");
- SendClientMessage(playerid, COR_VERMELHO, "Vá ao forum e peça para ser Desbanido!");
- return Kick(playerid);
- }
- if(!DOF2_FileExists(PegarConta(playerid)))
- {
- new Str[180];
- 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));
- ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FFFF00}Legend {FF0000}Zombie {0000FF}Games", Str, "Registrar", "Cancelar");
- }
- else
- {
- new Str[180];
- 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));
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FFFF00}Legend {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, status[playerid]);
- TextDrawHideForPlayer(playerid, antidoto);
- Logado[playerid] = false;
- PlayerInfo[playerid][Morreu] = false;
- SalvarConta(playerid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new Str[10], Float:X, Float:Y, Float:Z;
- new exprandom = RandomEx(4,8);
- PlayerInfo[playerid][Morreu] = true;
- PlayerInfo[playerid][pMordido] = 0;
- switch(PlayerInfo[playerid][pEquipe])
- {
- case ZOMBIE:
- {
- if(PlayerInfo[killerid][pEquipe] == SOBREVIVENTE)
- {
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeath]++;
- PlayerInfo[killerid][pExp] += exprandom;
- format(Str, sizeof(Str), "~w~+%d EXP", exprandom);
- GameTextForPlayer(killerid, Str, 2000, 5);
- PlayAudioStreamForPlayer(playerid,"http://pamp3.site40.net/zombie/attack2.mp3");
- }
- }
- case SOBREVIVENTE:
- {
- new i;
- for(killerid = i; i < MAX_PLAYERS; ++i)
- {
- GetPlayerPos(playerid, X, Y, Z);
- if(PlayerInfo[i][pEquipe] == ZOMBIE && IsPlayerInRangeOfPoint(i, 1.5, X, Y, Z))
- {
- PlayerInfo[i][pKills]++;
- PlayerInfo[playerid][pDeath]++;
- PlayerInfo[i][pExp] += exprandom;
- format(Str, sizeof(Str), "~w~+%d EXP", exprandom);
- GameTextForPlayer(i, Str, 2000, 5);
- PlayAudioStreamForPlayer(playerid,"http://pamp3.site40.net/zombie/die.wav");
- PlayerInfo[playerid][pEquipe] = ZOMBIE;
- GameTextForPlayer(playerid, "~r~INFECTADO", 3000, 3);
- }
- }
- }
- }
- DarLevel(killerid);
- AtualizarExp(killerid);
- Status(killerid);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT && newstate != PLAYER_STATE_PASSENGER)
- if(PlayerInfo[playerid][pEquipe] == ZOMBIE) RemovePlayerFromVehicle(playerid), SendClientMessage(playerid, COR_VERMELHO, "Zombies não podem dirigir veículos!");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DIALOG_REGISTRO:
- {
- if(!strlen(inputtext))
- {
- new Str[180];
- 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));
- ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Registrar", "Cancelar");
- return 1;
- }
- if(response)
- {
- PlayerInfo[playerid][pSenha] = strlen(inputtext);
- if(!DOF2_FileExists(PegarConta(playerid)))
- {
- PlayerInfo[playerid][pLevel] = 1;
- DOF2_CreateFile(PegarConta(playerid));
- DOF2_SetString(PegarConta(playerid), "Senha", inputtext);
- SalvarConta(playerid);
- }
- new Str[180];
- 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));
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
- }
- }
- case DIALOG_LOGIN:
- {
- if(!strlen(inputtext))
- {
- new Str[180];
- 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));
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
- return 1;
- }
- if(response)
- {
- if(strcmp(inputtext, DOF2_GetString(PegarConta(playerid), "Senha", PlayerInfo[playerid][pSenha]), true) == 0)
- {
- if(PlayerInfo[playerid][pEquipe] == ZOMBIE || PlayerInfo[playerid][pEquipe] == SOBREVIVENTE) Logado[playerid] = true;
- SetSkin(playerid, true, false);
- }
- else
- {
- new Str[180];
- 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));
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{00FF00}Brasil {FF0000}Zombie {0000FF}Games", Str, "Logar", "Cancelar");
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success) SendClientMessage(playerid, COR_VERMELHO, "** COMANDO INVÁLIDO **");
- return 1;
- }
- forward TextDraw();
- public TextDraw()
- {
- bemvindo = TextDrawCreate(56.000000, 34.000000, "~w~Bem vindo ao ~g~brasil ~r~zombie ~b~games");
- TextDrawBackgroundColor(bemvindo, -1);
- TextDrawFont(bemvindo, 2);
- TextDrawLetterSize(bemvindo, 0.549999, 2.399999);
- TextDrawColor(bemvindo, 255);
- TextDrawSetOutline(bemvindo, 1);
- TextDrawSetProportional(bemvindo, 1);
- cima = TextDrawCreate(0.000000,-1.000000," ");
- TextDrawUseBox(cima,1);
- TextDrawBoxColor(cima,0x000000ff);
- TextDrawTextSize(cima,639.000000,13.000000);
- TextDrawAlignment(cima,0);
- TextDrawBackgroundColor(cima,0x000000ff);
- TextDrawFont(cima,3);
- TextDrawLetterSize(cima,2.000000,12.000000);
- TextDrawColor(cima,0x00000000);
- TextDrawSetOutline(cima,1);
- TextDrawSetProportional(cima,1);
- TextDrawSetShadow(cima,1);
- baixo = TextDrawCreate(-1.000000,343.000000," ");
- TextDrawUseBox(baixo,1);
- TextDrawBoxColor(baixo,0x000000ff);
- TextDrawTextSize(baixo,639.000000,13.000000);
- TextDrawAlignment(baixo,0);
- TextDrawBackgroundColor(baixo,0x000000ff);
- TextDrawFont(baixo,3);
- TextDrawLetterSize(baixo,2.000000,12.000000);
- TextDrawColor(baixo,0x00000000);
- TextDrawSetOutline(baixo,1);
- TextDrawSetProportional(baixo,1);
- TextDrawSetShadow(baixo,1);
- 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");
- TextDrawBackgroundColor(lszombie, 255);
- TextDrawFont(lszombie, 1);
- TextDrawLetterSize(lszombie, 0.500000, 1.300000);
- TextDrawColor(lszombie, -1);
- TextDrawSetOutline(lszombie, 0);
- TextDrawSetProportional(lszombie, 1);
- TextDrawSetShadow(lszombie, 1);
- antidoto = TextDrawCreate(19.000000, 309.000000, "~w~ ~n~Infectados: ~r~%d%");
- TextDrawBackgroundColor(antidoto, 255);
- TextDrawFont(antidoto, 2);
- TextDrawLetterSize(antidoto, 0.300000, 1.300000);
- TextDrawColor(antidoto, -1);
- TextDrawSetOutline(antidoto, 0);
- TextDrawSetProportional(antidoto, 1);
- TextDrawSetShadow(antidoto, 1);
- TextDrawUseBox(antidoto, 1);
- TextDrawBoxColor(antidoto, 0x00000020);
- TextDrawTextSize(antidoto, 223.000000, 0.000000);
- for(new i; i < MAX_PLAYERS; ++i)
- {
- status[i] = TextDrawCreate(1.000000, 433.000000, " nome: %s ] level: %d ] exp: %d/%d ] matou: %d ] mortes: %d ] mordidas: %d");
- TextDrawBackgroundColor(status[i], 255);
- TextDrawFont(status[i], 2);
- TextDrawLetterSize(status[i], 0.29000, 1.500000);
- TextDrawColor(status[i], -1);
- TextDrawSetOutline(status[i], 0);
- TextDrawSetProportional(status[i], 1);
- TextDrawSetShadow(status[i], 1);
- TextDrawUseBox(status[i], 1);
- TextDrawBoxColor(status[i], 153);
- TextDrawTextSize(status[i], 672.000000, 0.000000);
- }
- }
- forward Status(playerid);
- public Status(playerid)
- {
- TextDrawHideForPlayer(playerid, status[playerid]);
- 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]);
- TextDrawSetString(status[playerid], Str); TextDrawShowForPlayer(playerid, status[playerid]);
- return 1;
- }
- forward AtualizarInfectados();
- public AtualizarInfectados()
- {
- new Str[80], Float:infect, Float:conectados;
- for(new i; i < MAX_PLAYERS; ++i)
- {
- if(IsPlayerConnected(i) && Logado[i] == true)
- {
- if(PlayerInfo[i][pEquipe] == ZOMBIE) infect++;
- conectados++;
- }
- }
- if(infect == 0)
- {
- new rand = RandomEx(0,50);
- PlayerInfo[rand][pEquipe] = ZOMBIE;
- SetSkin(rand, true, false);
- SendClientMessage(rand, COR_VERMELHO, "Você foi setado para Zombie aleatóriamente para começar o Round!");
- }
- format(Str, sizeof(Str), "~w~ ~n~Infectados: ~r~%d%", floatround((infect*100)/conectados));
- TextDrawSetString(antidoto, Str); TextDrawShowForAll(antidoto);
- return 1;
- }
- forward AtualizarExp(playerid);
- public AtualizarExp(playerid)
- {
- Delete3DTextLabel(label[playerid]);
- new Str[30];
- format(Str, sizeof(Str), "Level: %d EXP: %d/%d", GetPlayerScore(playerid), PlayerInfo[playerid][pExp], Experiencia(GetPlayerScore(playerid)));
- if(PlayerInfo[playerid][pEquipe] == ZOMBIE) label[playerid] = Create3DTextLabel(Str, 0xFF0000FF, 30.0, 40.0, 50.0, 40.0, 0);
- else if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE) label[playerid] = Create3DTextLabel(Str, 0x32CD32FF, 30.0, 40.0, 50.0, 40.0, 0);
- Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.3);
- }
- //------------------STOCKS------------------
- stock GetPlayerDistanceVehicle(playerid, vehicleid, Float:Distance)
- {
- new Float:Pos[3];
- GetVehiclePos(vehicleid, Pos[0], Pos[1], Pos[2]);
- return IsPlayerInRangeOfPoint(playerid, Distance, Pos[0], Pos[1], Pos[2]);
- }
- stock GivePlayerAW(playerid, Float:armour, arma1, ammo1, arma2, ammo2, arma3, ammo3, arma4, ammo4, arma5, ammo5, arma6, ammo6, arma7, ammo7, arma8, ammo8, arma9, ammo9)
- {
- ResetPlayerWeapons(playerid), SetPlayerHealth(playerid, 100), SetPlayerArmour(playerid, armour), GivePlayerWeapon(playerid, arma1, ammo1),
- GivePlayerWeapon(playerid, arma2, ammo2), GivePlayerWeapon(playerid, arma3, ammo3), GivePlayerWeapon(playerid, arma4, ammo4), GivePlayerWeapon(playerid, arma5, ammo5),
- GivePlayerWeapon(playerid, arma6, ammo6), GivePlayerWeapon(playerid, arma7, ammo7), GivePlayerWeapon(playerid, arma8, ammo8), GivePlayerWeapon(playerid, arma9, ammo9);
- }
- stock Vip(playerid)
- {
- new text[20];
- if(PlayerInfo[playerid][pVip] == 0) text = "{FFFFFF}Grátis";
- else if(PlayerInfo[playerid][pVip] == 1) text = "{DAA520}Vip Bronze";
- else if(PlayerInfo[playerid][pVip] == 2) text = "{BEBEBE}Vip Prata";
- else if(PlayerInfo[playerid][pVip] == 3) text = "{FFD700}Vip Ouro";
- return text;
- }
- stock DarLevel(playerid)
- {
- if(PlayerInfo[playerid][pExp] >= Experiencia(GetPlayerScore(playerid)))
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
- PlayerInfo[playerid][pLevel] = GetPlayerScore(playerid)+1;
- PlayerInfo[playerid][pExp] = 0;
- GameTextForPlayer(playerid, "Level UP!", 5000, 5);
- DarArmas(playerid);
- }
- }
- stock DarArmas(playerid)
- {
- ResetPlayerWeapons(playerid);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE)
- {
- new lvl = GetPlayerScore(playerid);
- switch(lvl)
- {
- case 1: GivePlayerAW(playerid,0,1,1,23,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
- case 2: GivePlayerAW(playerid,0,1,1,23,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
- case 3: GivePlayerAW(playerid,0,1,1,23,140,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
- 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
- case 5: GivePlayerAW(playerid,0,1,1,22,180,2,1,0,0,0,0,0,0,0,0,0,0,0,0);
- case 6: GivePlayerAW(playerid,0,1,1,22,200,2,1,0,0,0,0,0,0,0,0,0,0,0,0);
- case 7: GivePlayerAW(playerid,0,1,1,22,220,2,1,0,0,0,0,0,0,0,0,0,0,0,0);
- case 8: GivePlayerAW(playerid,0,1,1,22,240,2,1,6,1,0,0,0,0,0,0,0,0,0,0);
- 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
- case 10: GivePlayerAW(playerid,0,1,1,22,260,2,1,6,1,28,110,0,0,0,0,0,0,0,0);
- case 11: GivePlayerAW(playerid,0,1,1,22,280,2,1,6,1,28,130,0,0,0,0,0,0,0,0);
- case 12: GivePlayerAW(playerid,0,1,1,22,300,2,1,6,1,28,150,0,0,0,0,0,0,0,0);
- 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
- case 14: GivePlayerAW(playerid,0,1,1,22,320,2,1,6,1,28,170,25,60,0,0,0,0,0,0);
- case 15: GivePlayerAW(playerid,0,1,1,22,340,2,1,6,1,28,190,25,70,0,0,0,0,0,0);
- 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
- case 17: GivePlayerAW(playerid,0,1,1,24,320,2,1,6,1,28,210,25,90,0,0,0,0,0,0);
- 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
- case 19: GivePlayerAW(playerid,0,1,1,24,340,2,1,6,1,28,230,25,100,33,50,0,0,0,0);
- case 20: GivePlayerAW(playerid,0,1,1,24,360,2,1,6,1,28,250,25,110,33,60,0,0,0,0);
- 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
- case 22: GivePlayerAW(playerid,0,1,1,24,380,2,1,6,1,28,270,25,120,33,70,16,1,0,0);
- case 23: GivePlayerAW(playerid,0,1,1,24,400,2,1,6,1,28,290,25,130,33,80,16,2,0,0);
- case 24: GivePlayerAW(playerid,0,1,1,24,420,2,1,6,1,28,310,25,140,33,90,16,2,0,0);
- 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
- case 26: GivePlayerAW(playerid,0,1,1,24,440,2,1,6,1,32,330,25,150,33,100,16,2,18,1);
- case 27: GivePlayerAW(playerid,0,1,1,24,460,2,1,6,1,32,350,25,160,33,110,16,2,18,1);
- case 28: GivePlayerAW(playerid,0,1,1,24,480,2,1,6,1,32,370,25,170,33,120,16,3,18,1);
- 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
- case 30: GivePlayerAW(playerid,0,1,1,24,500,2,1,6,1,32,410,25,190,34,130,16,3,18,1);
- 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
- case 32: GivePlayerAW(playerid,0,1,1,24,520,2,1,6,1,32,430,26,200,34,140,16,3,18,1);
- 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
- case 34: GivePlayerAW(playerid,0,2,1,24,540,6,1,9,1,32,450,26,210,34,150,16,3,18,2);
- case 35: GivePlayerAW(playerid,0,2,1,24,560,6,1,9,1,32,470,26,220,34,160,16,3,18,2);
- }
- }
- }
- stock SetSkin(playerid, bool:Valor, bool:morte)
- {
- if(PlayerInfo[playerid][pEquipe] == ZOMBIE)
- {
- static skin1;
- switch(RandomEx(0,6))
- {
- case 0: skin1 = 77;
- case 1: skin1 = 78;
- case 2: skin1 = 79;
- case 3: skin1 = 135;
- case 4: skin1 = 137;
- case 5: skin1 = 160;
- case 6: skin1 = 162;
- }
- if(PlayerInfo[playerid][Morreu] == morte)
- {
- SetPlayerTime(playerid, 23, 0);
- SetPlayerWeather(playerid, 700);
- SetPlayerColor(playerid, 0xFF0000FF);
- SetPlayerSkin(playerid, skin1);
- PlayerInfo[playerid][pSkin] = skin1;
- return 1;
- }
- else if(Valor == true) SetSpawnInfo(playerid, ZOMBIE, skin1, 0.0,0.0,0.0,0,0,0,0,0,0,0), SpawnPlayer(playerid);
- }
- else if(PlayerInfo[playerid][pEquipe] == SOBREVIVENTE)
- {
- static skin2;
- switch(RandomEx(0,6))
- {
- case 0: skin2 = 288;
- case 1: skin2 = 287;
- case 2: skin2 = 286;
- case 3: skin2 = 285;
- case 4: skin2 = 240;
- case 5: skin2 = 185;
- case 6: skin2 = 165;
- }
- if(PlayerInfo[playerid][Morreu] == morte)
- {
- SetPlayerTime(playerid, 0, 0);
- SetPlayerWeather(playerid, 9);
- SetPlayerColor(playerid, 0x006400FF);
- SetPlayerSkin(playerid, skin2);
- PlayerInfo[playerid][pSkin] = skin2;
- return 1;
- }
- else if(Valor == true) SetSpawnInfo(playerid, SOBREVIVENTE, skin2, 0.0,0.0,0.0,0,0,0,0,0,0,0), SpawnPlayer(playerid);
- }
- PlayerInfo[playerid][Morreu] = false;
- return 1;
- }
- stock RandomEx(min, max)
- {
- new rand = random(max-min)+min;
- return rand;
- }
- stock GetName(playerid)
- {
- static name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- stock GetIp(playerid)
- {
- static Ip[20];
- GetPlayerIp(playerid, Ip, sizeof(Ip));
- return Ip;
- }
- stock Experiencia(inicio)
- {
- if(inicio == 0) inicio = 1;
- return (inicio*100)+100;
- }
- stock ZBan(playerid, text[])
- {
- new arquivo[30], Str[30], dia, mes, ano, hora, minuto;
- getdate(ano, mes, dia);
- gettime(hora, minuto);
- format(arquivo, sizeof(arquivo), "Banidos/%s.sav", GetName(playerid));
- DOF2_CreateFile(arquivo);
- format(Str, sizeof(Str), "%d/%d/%d - %d:%dhrs", dia, mes, ano, hora, minuto);
- DOF2_SetString(arquivo, "Data", Str);
- DOF2_SetString(arquivo, "IP", GetIp(playerid));
- DOF2_SetString(arquivo, "Motivo", text);
- DOF2_SaveFile();
- ZBanIp(playerid);
- }
- stock ZBanIp(playerid)
- {
- new arquivo[30];
- format(arquivo, sizeof(arquivo), "IPs Banidos/%s.sav", GetIp(playerid));
- DOF2_CreateFile(arquivo);
- DOF2_SetString(arquivo, "Nome", GetName(playerid));
- DOF2_SaveFile();
- }
- stock PegarConta(playerid)
- {
- static arquivo[30];
- format(arquivo, sizeof(arquivo), "Contas/%s.sav", GetName(playerid));
- return arquivo;
- }
- stock SalvarConta(playerid)
- {
- DOF2_SetInt(PegarConta(playerid), "Admin", PlayerInfo[playerid][pAdmin]);
- DOF2_SetInt(PegarConta(playerid), "Equipe", PlayerInfo[playerid][pEquipe]);
- DOF2_SetInt(PegarConta(playerid), "Vip", PlayerInfo[playerid][pVip]);
- DOF2_SetInt(PegarConta(playerid), "Kills", PlayerInfo[playerid][pKills]);
- DOF2_SetInt(PegarConta(playerid), "Death", PlayerInfo[playerid][pDeath]);
- DOF2_SetInt(PegarConta(playerid), "Experiência", PlayerInfo[playerid][pExp]);
- DOF2_SetInt(PegarConta(playerid), "Level", GetPlayerScore(playerid));
- DOF2_SetInt(PegarConta(playerid), "Mordidas", PlayerInfo[playerid][pMordidas]);
- DOF2_SetInt(PegarConta(playerid), "Skin", GetPlayerSkin(playerid));
- DOF2_SetInt(PegarConta(playerid), "Mordido", PlayerInfo[playerid][pMordido]);
- DOF2_SaveFile();
- }
- stock CarregarConta(playerid)
- {
- if(DOF2_FileExists(PegarConta(playerid)))
- {
- PlayerInfo[playerid][pAdmin] = DOF2_GetInt(PegarConta(playerid), "Admin");
- PlayerInfo[playerid][pVip] = DOF2_GetInt(PegarConta(playerid), "Vip");
- PlayerInfo[playerid][pEquipe] = DOF2_GetInt(PegarConta(playerid), "Equipe");
- PlayerInfo[playerid][pKills] = DOF2_GetInt(PegarConta(playerid), "Kills");
- PlayerInfo[playerid][pDeath] = DOF2_GetInt(PegarConta(playerid), "Death");
- PlayerInfo[playerid][pExp] = DOF2_GetInt(PegarConta(playerid), "Experiência");
- PlayerInfo[playerid][pLevel] = DOF2_GetInt(PegarConta(playerid), "Level");
- PlayerInfo[playerid][pMordidas] = DOF2_GetInt(PegarConta(playerid), "Mordidas");
- PlayerInfo[playerid][pSkin] = DOF2_GetInt(PegarConta(playerid), "Skin");
- PlayerInfo[playerid][pMordido] = DOF2_GetInt(PegarConta(playerid), "Mordido");
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- if(PlayerInfo[playerid][pLevel] == 0) PlayerInfo[playerid][pLevel] = 1, SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- }
- }
- //---------------------------ADMINISTRADORES---------------------------
- CMD:daradmin(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] < 5)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5 ou não está logado na RCON!");
- new id, level, Str[70];
- if(sscanf(params, "id", id, level))
- return SendClientMessage(playerid, COR_CINZA, "USE: /daradmin [Id do Player] [Nivel do Admin]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- PlayerInfo[id][pAdmin] = level;
- format(Str, sizeof(Str), "Você deu ao %s, %d niveis de Administrador!", GetName(id), level);
- SendClientMessage(playerid, COR_SKYBLUE, Str);
- format(Str, sizeof(Str), "Você ganhou %d leveis de Administrador!", level);
- SendClientMessage(id, COR_SKYBLUE, Str);
- return 1;
- }
- CMD:av(playerid, params[])
- {
- return cmd_aviso(playerid, params);
- }
- CMD:aviso(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new texto[150];
- if(sscanf(params, "s[150]", texto))
- return SendClientMessage(playerid, COR_CINZA, "USE: /aviso [Texto] ou /av [Texto]");
- format(texto, sizeof(texto), "** AVISO DA ADMINISTRAÇÃO ** %s: %s **", GetName(playerid), texto);
- SendClientMessageToAll(COR_VERMELHO, texto);
- return 1;
- }
- CMD:setar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- return SendClientMessage(playerid, COR_CINZA, "Você não tem permissão para usar esse comando!");
- new id, time, Str[128], nometime[13];
- if(sscanf(params, "id", id, time))
- return SendClientMessage(playerid, COR_CINZA, "USE: /setar [Id do Player] [1 ou 2] (1 = Zombie | 2 = Sobrevivente)");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- PlayerInfo[id][pEquipe] = time;
- if(time == 1) nometime = "Zombie";
- else if(time == 2) nometime = "Sobrevivente";
- format(Str, sizeof(Str), "** AVISO DA ADMINISTRAÇÃO ** %s setou %s para %s **", GetName(playerid), GetName(id), nometime);
- SendClientMessageToAll(COR_VERMELHO, Str);
- SpawnPlayer(id);
- DarArmas(id);
- AtualizarExp(id);
- return 1;
- }
- CMD:a(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new texto[150];
- if(sscanf(params, "s[150]", texto))
- return SendClientMessage(playerid, COR_CINZA, "USE: /a [Texto]");
- format(texto, sizeof(texto), "** %s: %s **", GetName(playerid), texto);
- for(new i; i < MAX_PLAYERS; ++i)
- if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) SendClientMessage(i, COR_TOMATO, texto);
- return 1;
- }
- CMD:congelar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new id, Float:X, Float:Y, Float:Z, Str[100];
- GetPlayerPos(id, X, Y, Z);
- if(sscanf(params, "i", id))
- return SendClientMessage(playerid, COR_CINZA, "USE: /congelar [Id do Player]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- SetPlayerPos(id, X, Y, Z+1);
- TogglePlayerControllable(id, false);
- format(Str, sizeof(Str), "** %s foi congelado pelo Administrador %s **", GetName(id), GetName(playerid));
- SendClientMessageToAll(COR_VERMELHO, Str);
- return 1;
- }
- CMD:descongelar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new id, Str[100];
- if(sscanf(params, "i", id))
- return SendClientMessage(playerid, COR_CINZA, "USE: /descongelar [Id do Player]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- TogglePlayerControllable(id, true);
- format(Str, sizeof(Str), "** %s foi descongelado pelo Administrador %s **", GetName(id), GetName(playerid));
- SendClientMessageToAll(COR_VERMELHO, Str);
- return 1;
- }
- CMD:veh(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 2!");
- new car;
- if(sscanf(params, "d", car))
- return SendClientMessage(playerid, COR_CINZA, "USE: /veh [Modelo do Veículo]");
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- CreateVehicle(car, X+1, Y, Z, A, 0, 0, -1);
- return 1;
- }
- CMD:trazer(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new id, Float:X, Float:Y, Float:Z, Str[40];
- GetPlayerPos(playerid, X, Y, Z);
- if(sscanf(params, "i", id))
- return SendClientMessage(playerid, COR_CINZA, "USE: /trazer [Id do Player]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- if(IsPlayerInAnyVehicle(id) && GetPlayerState(id) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(id), X+1, Y, Z), PutPlayerInVehicle(id, GetPlayerVehicleID(id), 0);
- else SetPlayerPos(id, X+1, Y, Z);
- format(Str, sizeof(Str), "%s te trouxe até ele.", GetName(playerid));
- SendClientMessage(id, COR_SKYBLUE, Str);
- return 1;
- }
- CMD:ir(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new id, Float:X, Float:Y, Float:Z, Str[40];
- if(sscanf(params, "i", id))
- return SendClientMessage(playerid, COR_CINZA, "USE: /ir [Id do Player]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- GetPlayerPos(id, X, Y, Z);
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), X+1, Y, Z), PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
- else SetPlayerPos(playerid, X+1, Y, Z);
- format(Str, sizeof(Str), "%s veio até voce.", GetName(playerid));
- SendClientMessage(id, COR_SKYBLUE, Str);
- return 1;
- }
- CMD:trazertodos(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 3!");
- new equipe, Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- if(sscanf(params, "d", equipe))
- return SendClientMessage(playerid, COR_CINZA, "USE: /trazertodos [1 ou 2] (1 = Zombies | 2 = Sobreviventes)");
- new rand = random(3);
- for(new i; i < MAX_PLAYERS; ++i)
- if(PlayerInfo[i][pEquipe] == equipe) SendClientMessage(playerid, COR_VERMELHO, "O Administrador trouxe você até ele!"), SetPlayerPos(i, X+rand, Y+rand, Z);
- return 1;
- }
- CMD:gmx(playerid)
- {
- if(PlayerInfo[playerid][pAdmin] < 4)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 4!");
- SendRconCommand("gmx");
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new id, motivo[30], Str[100];
- if(sscanf(params, "is[30]", id, motivo))
- return SendClientMessage(playerid, COR_CINZA, "USE: /kick [Id do Player]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- format(Str, sizeof(Str), "** AVISO ** %s foi kickado por %s. Motivo: %s **", GetName(id), GetName(playerid), motivo);
- SendClientMessageToAll(COR_VERMELHO, Str);
- Kick(id);
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new id, motivo[30], Str[100];
- if(sscanf(params, "is[30]", id, motivo))
- return SendClientMessage(playerid, COR_CINZA, "USE: /ban [Id do Player] [Motivo]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- format(Str, sizeof(Str), "** AVISO ** %s foi banido por %s. Motivo: %s **", GetName(id), GetName(playerid), motivo);
- SendClientMessageToAll(COR_VERMELHO, Str);
- ZBan(id, motivo);
- Kick(id);
- return 1;
- }
- CMD:desban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 5)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5!");
- new id, nome[MAX_PLAYER_NAME], arquivo[50], arquivo2[50], ip[32], Str[50];
- GetPlayerName(id, nome, sizeof(nome));
- if(sscanf(params, "s[32]", nome))
- return SendClientMessage(playerid, COR_CINZA, "USE: /desban [Nome do Player]");
- format(arquivo2, sizeof(arquivo2), "IPs Banidos/%s.sav", GetIp(id));
- format(arquivo, sizeof(arquivo), "Banidos/%s.sav", nome);
- if(DOF2_FileExists(arquivo))
- {
- if(strcmp(arquivo, nome, true) == 0)
- {
- DOF2_RemoveFile(arquivo);
- if(strcmp(DOF2_GetString(arquivo, ip, "Ip"), arquivo2, true) == 0) DOF2_RemoveFile(arquivo2);
- format(Str, sizeof(Str), "Você desbaniu a conta de %s.", nome);
- SendClientMessage(playerid, COR_VERMELHO, Str);
- }
- }
- else SendClientMessage(playerid, COR_VERMELHO, "Esse nome não esta Banido!");
- return 1;
- }
- CMD:setlevel(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 5)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5!");
- new id, level, Str[100];
- if(sscanf(params, "id", id, level))
- return SendClientMessage(playerid, COR_CINZA, "USE: /setlevel [Id do Player] [Numero do Level]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- PlayerInfo[id][pLevel] = level;
- SetPlayerScore(id, level);
- format(Str, sizeof(Str), "** Administrador %s setou seu level para %d. **", GetName(playerid), level);
- SendClientMessage(id, COR_VERMELHO, Str);
- DarArmas(id);
- AtualizarExp(id);
- Status(id);
- return 1;
- }
- CMD:trabalhar(playerid)
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador!");
- new Str[70];
- if(PlayerInfo[playerid][pTrampando] == true)
- {
- PlayerInfo[playerid][pTrampando] = false;
- format(Str, sizeof(Str), "** Administrador %s[ID %d] está de Folga **", GetName(playerid), playerid);
- }
- else
- {
- format(Str, sizeof(Str), "** Administrador %s[ID %d] está Trabalhando **", GetName(playerid), playerid);
- PlayerInfo[playerid][pTrampando] = true;
- }
- SendClientMessageToAll(COR_VERMELHO, Str);
- return 1;
- }
- CMD:darvip(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 5)
- return SendClientMessage(playerid, COR_CINZA, "Você não é Administrador Level 5!");
- new id, vip, Str[100];
- if(sscanf(params, "id", id, vip))
- return SendClientMessage(playerid, COR_CINZA, "USE: /darvip [Id do Player] [Nivel do Vip] (1 à 3)");
- if(0 < vip > 3)
- return SendClientMessage(playerid, COR_CINZA, "O Vip não pode ser menor que 0 e maior que 3!");
- PlayerInfo[id][pVip] = vip;
- format(Str, sizeof(Str), "Administrador %s deu %s {FF0000}para você.", GetName(playerid), Vip(id));
- SendClientMessage(id, COR_VERMELHO, Str);
- return 1;
- }
- //---------------------------JOGADORES---------------------------
- CMD:reportar(playerid, params[])
- {
- if(Logado[playerid] == false) return true;
- new id, texto[128];
- if(sscanf(params, "is[128]", id, texto))
- return SendClientMessage(playerid, COR_CINZA, "USE: /reportar [Id do Player] [Texto/Motivo]");
- if(!IsPlayerConnected(id))
- return SendClientMessage(playerid, COR_CINZA, "Esse jogador não esta conectado!");
- SendClientMessage(playerid, COR_LARANJA, "O jogador foi reportado, Obrigado.");
- format(texto, sizeof(texto), "** %s[%d] reportou o %s[%d] >> %s << **", GetName(playerid), playerid, GetName(id), id, texto);
- for(new i; i < MAX_PLAYERS; ++i)
- if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1) SendClientMessage(i, COR_SPINGREEN, texto);
- return 1;
- }
- CMD:admins(playerid)
- {
- new Str[128];
- if(Logado[playerid] == false) return true;
- for(new i; i < MAX_PLAYERS; ++i)
- 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);
- 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);
- ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "{FF0000}Administradores Online", Str, "Ok", "");
- return 1;
- }
- CMD:mp(playerid, params[])
- {
- new Str[150], texto[128], id;
- if(Logado[playerid] == false) return true;
- if(sscanf(params, "is[128]", id, texto))
- return SendClientMessage(playerid, COR_CINZA, "USE: /mp [Id do Player] [Mensagem]");
- format(Str, sizeof(Str), "MP de %d[ID %d]: %s.", GetName(playerid), playerid, texto);
- SendClientMessage(id, COR_AMARELO, Str);
- return 1;
- }
- CMD:creditos(playerid)
- {
- 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", "");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement