Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <Dini>
- #pragma tabsize 0
- #define DIALOG_REGISTRO 2000
- #define DIALOG_LOGAR 2001
- #define BRANCO "{FFFFFF}"
- #define VERMELHO "{F81414}"
- #define VERDE 0x00FF00AA
- #define AZUL_CLARO "{00CED1}"
- #define VERDE_EXERCITO 0x007D2CFF
- #define MARROM_TERRORISTA 0x54292BFF
- #define BRANCO_CIVIL 0xFFFFFFFF
- #define VERMELHO_MORTO 0xF20006FF
- #define COLOR_WHITE 0xFFFFFFAA
- #define AMARELO 0xFFFF00AA
- #define Verde 0x00FF00AA
- #define FILTERSCRIPT
- #define CINZA 0xAFAFAFAA
- #define VERMELHA 0xAA3333AA
- #define BISQUE 0xFFE4C4AA
- #define AMARELO 0xFFFF00AA
- #define AZUL 0x0000BBAA
- #define AZULCLARO 0x33CCFFAA
- #define LARANJA 0xFF9900AA
- #define VERDECLARO 0x33FF33AA
- #define MAGENTA 0xFF00FFFF
- #define AZULMARINHO 0x000080AA
- #define AQUA 0xF0F8FFAA
- #define MOSCAAZUL 0x6495EDAA
- #define PRETO 0x000000AA
- #define CORAL 0xFF7F50AA
- #define VERDEMEDIO 0x38FF06FF
- #define CONTAS "CAdmin/Players/%s.ini"
- #define log "CAdmin/Admin/Administração.txt"
- #define REGISTRO 1
- #define LOGIN 2
- new Matou[MAX_PLAYERS];
- new Morreu[MAX_PLAYERS];
- new bool:VeiculoOcupado[MAX_VEHICLES];
- new carroadm;
- new god[MAX_PLAYERS];
- new Float:p[MAX_PLAYERS][3];
- new medalhas[MAX_PLAYERS];
- new bool:calado[MAX_PLAYERS];
- new bool:tv[MAX_PLAYERS];
- enum cInfo
- {
- cAdmin,
- cHelper
- }
- new PlayerInfo[MAX_PLAYERS][cInfo];
- new strinx[128];
- new pname[MAX_PLAYERS];
- new Text:ScoreTextDraw[MAX_PLAYERS];
- new Text:TempoRoYal;
- new HoraRoYal, MinutosRoYal;
- new StringRoYalTempo[32];
- new Text:textdraw;
- new pClass[MAX_PLAYERS];
- new playername[MAX_PLAYER_NAME];
- new AFK[MAX_PLAYERS];
- new Text:AfkText;
- new Text:AfkBackText;
- new ESTILOS;
- main()
- {
- print("----------------------------------");
- print(" Brasil Guerra no Samp [v3.0] ");
- print(" By : Leo_Gangster ");
- print("----------------------------------");
- }
- new count1 = 0;
- new ServidorNome[4][128] = {
- "Brasil Guerra no Samp *|* [v3.0]",
- "Servidor • Original",
- "Melhor servidor de Guerra!",
- "Venha jogar Conosco ===>"
- };
- forward NomeServer();
- public NomeServer()
- {
- new string[256];
- count1++; if(count1 > 4)count1 = 0;
- format(string, sizeof(string), "hostname %s", ServidorNome[count1]);
- SendRconCommand(string);
- }
- public OnGameModeInit()
- {
- UsePlayerPedAnims();
- SetTimer("NomeServer", 4000,1);
- //afk
- AfkText = TextDrawCreate(168.000000,319.000000,"Voce esta ausente ~p~/afk");
- TextDrawAlignment(AfkText,0);
- TextDrawBackgroundColor(AfkText,0x000000ff);
- TextDrawFont(AfkText,1);
- TextDrawLetterSize(AfkText,1.000000,2.699999);
- TextDrawColor(AfkText,0xffffffff);
- TextDrawSetOutline(AfkText,1);
- TextDrawSetProportional(AfkText,1);
- TextDrawSetShadow(AfkText,1);
- AfkBackText = TextDrawCreate(248.000000,351.000000,"Para voltar ao jogo digite ~p~/on");
- TextDrawAlignment(AfkBackText,0);
- TextDrawBackgroundColor(AfkBackText,0x000000ff);
- TextDrawFont(AfkBackText,1);
- TextDrawLetterSize(AfkBackText,0.299999,1.100000);
- TextDrawColor(AfkBackText,0xffffffff);
- TextDrawSetOutline(AfkBackText,1);
- TextDrawSetProportional(AfkBackText,1);
- TextDrawSetShadow(AfkBackText,1);
- TempoRoYal = TextDrawCreate(605.0,25.0,"00:00");
- TextDrawUseBox(TempoRoYal, 0);
- TextDrawFont(TempoRoYal, 1);
- TextDrawSetShadow(TempoRoYal,0);
- TextDrawSetOutline(TempoRoYal,2);
- TextDrawBackgroundColor(TempoRoYal,0x000000FF);
- TextDrawColor(TempoRoYal,0xFFFFFFFF);
- TextDrawAlignment(TempoRoYal,3);
- TextDrawLetterSize(TempoRoYal,0.5,1.5);
- Atualizartempo();
- SetTimer("Atualizartempo",1000 * 60,1);
- SetTimer("AtualizarScore", 1000, true);
- for(new x = 0; x < MAX_PLAYERS; x++)
- {
- ScoreTextDraw[x] = TextDrawCreate(32.000000, 317.000000, "Voce Matou : 0");
- TextDrawBackgroundColor(ScoreTextDraw[x], 255);
- TextDrawFont(ScoreTextDraw[x], 1);
- TextDrawLetterSize(ScoreTextDraw[x], 0.440000, 1.500000);
- TextDrawColor(ScoreTextDraw[x], -1);
- TextDrawSetOutline(ScoreTextDraw[x], 0);
- TextDrawSetProportional(ScoreTextDraw[x], 1);
- TextDrawSetShadow(ScoreTextDraw[x], 1);
- }
- textdraw = TextDrawCreate(4.000000,435.000000,"Guerra no samp v3.0");
- TextDrawFont(textdraw,3);
- TextDrawColor(textdraw,0x00FFFFFF);
- TextDrawLetterSize(textdraw,0.599999,1.000003);
- TextDrawSetOutline(textdraw,1);
- TextDrawSetShadow(textdraw,1);
- TextDrawSetProportional(textdraw,1);
- TextDrawBackgroundColor(textdraw,0x000000ff);
- AddStaticVehicleEx(601,-49.6000000,2350.1001000,24.1000000,180.0000000,245,245,15); //S.W.A.T. Van
- AddStaticVehicleEx(601,-45.6992200,2350.0000000,24.1000000,180.0000000,245,245,15); //S.W.A.T. Van
- AddStaticVehicleEx(432,-34.4000000,2323.0000000,24.2000000,2.0000000,95,10,15); //Rhino
- AddStaticVehicleEx(433,-41.5000000,2322.1999500,24.7000000,0.0000000,95,10,15); //Barracks
- AddStaticVehicleEx(520,-21.7000000,2330.3999000,25.1000000,80.0000000,-1,-1,15); //Hydra
- AddStaticVehicleEx(470,-47.2000000,2332.8000500,24.0000000,266.0000000,95,10,15); //Patriot
- AddStaticVehicleEx(470,-47.4000000,2337.3999000,24.3000000,265.9950000,95,10,15); //Patriot
- AddStaticVehicleEx(470,419.7000100,2466.1001000,16.6000000,88.0000000,95,10,15); //Patriot
- AddStaticVehicleEx(470,419.7000100,2460.6001000,16.6000000,87.9950000,95,10,15); //Patriot
- AddStaticVehicleEx(500,390.3999900,2461.8999000,16.7000000,266.0000000,32,32,15); //Mesa
- AddStaticVehicleEx(500,390.1992200,2458.5000000,16.7000000,265.9950000,32,32,15); //Mesa
- AddStaticVehicleEx(432,418.3999900,2448.8000500,16.6000000,92.0000000,95,10,15); //Rhino
- AddStaticVehicleEx(433,391.3999900,2445.1999500,17.1000000,312.0000000,95,10,15); //Barracks
- AddStaticVehicleEx(520,407.3999900,2503.5000000,17.4000000,88.0000000,-1,-1,15); //Hydra
- CreateObject(989,217.6000100,1876.0999800,14.0000000,0.0000000,0.0000000,286.0000000); //object(ac_apgate) (1)
- CreateObject(989,212.0996100,1876.1992200,14.0000000,0.0000000,0.0000000,285.9960000); //object(ac_apgate) (2)
- CreateObject(987,1994.6999500,-1309.9000200,20.0000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (1)
- CreateObject(987,2037.7998000,-1271.0996100,20.3000000,0.0000000,0.0000000,270.0000000); //object(elecfence_bar) (2)
- CreateObject(987,1972.4000200,-1308.9000200,22.8000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (3)
- CreateObject(987,-49.8000000,2048.3999000,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (4)
- CreateObject(987,-2.7000000,2048.6999500,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (9)
- CreateObject(987,-14.6000000,2048.8999000,16.6000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (10)
- CreateObject(987,-26.4000000,2048.6001000,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (11)
- CreateObject(987,-38.2000000,2048.6999500,16.8000000,0.0000000,0.0000000,0.0000000); //object(elecfence_bar) (12)
- CreateObject(987,-49.8000000,2036.8000500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (13)
- CreateObject(987,9.3000000,2048.5000000,16.8000000,0.0000000,0.0000000,266.0000000); //object(elecfence_bar) (18)
- CreateObject(987,-44.7000000,1858.6999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (19)
- CreateObject(987,-45.0000000,1868.5000000,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (20)
- CreateObject(987,-45.3000000,1879.1999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (21)
- CreateObject(987,-45.8000000,1889.0999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (22)
- CreateObject(987,-46.2000000,1899.5999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (23)
- CreateObject(987,-46.6000000,1911.1999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (24)
- CreateObject(987,-47.0000000,1922.6999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (25)
- CreateObject(987,-47.1000000,1933.8000500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (26)
- CreateObject(987,-47.6000000,1943.9000200,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (27)
- CreateObject(987,-48.2000000,1966.0999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (28)
- CreateObject(987,-49.0000000,1989.5999800,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (29)
- CreateObject(987,-49.2000000,2001.4000200,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (30)
- CreateObject(987,-49.7000000,2025.1999500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (31)
- CreateObject(987,-49.5000000,2013.0000000,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (32)
- CreateObject(987,-48.9000000,1978.0999800,16.2000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (33)
- CreateObject(987,-47.8000000,1954.8000500,16.6000000,0.0000000,0.0000000,92.0000000); //object(elecfence_bar) (34)
- CreateObject(987,8.8000000,2036.9000200,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (35)
- CreateObject(987,6.0000000,2001.4000200,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (38)
- CreateObject(987,6.9000000,2013.1999500,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (39)
- CreateObject(987,7.7000000,2025.0000000,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (40)
- CreateObject(987,17.8000000,2001.0000000,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (41)
- CreateObject(987,29.7000000,2000.5000000,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (42)
- CreateObject(987,41.4000000,1999.9000200,16.6000000,0.0000000,0.0000000,357.9950000); //object(elecfence_bar) (43)
- CreateObject(987,53.4000000,1999.3000500,16.6000000,0.0000000,0.0000000,266.0000000); //object(elecfence_bar) (44)
- CreateObject(987,49.6000000,1952.4000200,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (45)
- CreateObject(987,50.6000000,1963.9000200,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (46)
- CreateObject(987,51.6000000,1975.8000500,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (47)
- CreateObject(987,52.5000000,1987.5000000,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (48)
- CreateObject(987,48.7000000,1940.5999800,16.6000000,0.0000000,0.0000000,265.9950000); //object(elecfence_bar) (49)
- CreateObject(987,57.6000000,1922.5999800,16.6000000,0.0000000,0.0000000,327.9950000); //object(elecfence_bar) (50)
- CreateObject(987,47.6992200,1928.8994100,16.6000000,0.0000000,0.0000000,327.9910000); //object(elecfence_bar) (51)
- CreateObject(987,67.8000000,1916.0000000,16.6000000,0.0000000,0.0000000,225.9910000); //object(elecfence_bar) (52)
- CreateObject(987,53.5000000,1873.0000000,16.6000000,0.0000000,0.0000000,259.9890000); //object(elecfence_bar) (53)
- CreateObject(987,59.6992200,1907.5996100,16.6000000,0.0000000,0.0000000,259.9860000); //object(elecfence_bar) (54)
- CreateObject(987,51.4000000,1861.4000200,16.6000000,0.0000000,0.0000000,225.9860000); //object(elecfence_bar) (56)
- CreateObject(987,55.7000000,1884.5999800,16.6000000,0.0000000,0.0000000,259.9860000); //object(elecfence_bar) (57)
- CreateObject(987,57.8000000,1896.0999800,16.6000000,0.0000000,0.0000000,259.9860000); //object(elecfence_bar) (58)
- CreateObject(987,-44.7000000,1858.5999800,16.7000000,0.0000000,0.0000000,306.0000000); //object(elecfence_bar) (59)
- CreateObject(987,-26.3000000,1830.9000200,16.6000000,0.0000000,0.0000000,305.9970000); //object(elecfence_bar) (60)
- CreateObject(987,-32.8000000,1840.6999500,16.6000000,0.0000000,0.0000000,305.9970000); //object(elecfence_bar) (61)
- CreateObject(987,-38.1000000,1848.6999500,16.6000000,0.0000000,0.0000000,305.9970000); //object(elecfence_bar) (62)
- CreateObject(987,42.9000000,1852.9000200,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (63)
- CreateObject(987,34.4000000,1844.6999500,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (64)
- CreateObject(987,25.9000000,1836.4000200,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (65)
- CreateObject(987,17.4000000,1828.3000500,16.6000000,0.0000000,0.0000000,225.9830000); //object(elecfence_bar) (66)
- CreateObject(987,8.9000000,1820.3000500,16.6000000,0.0000000,0.0000000,195.9830000); //object(elecfence_bar) (67)
- CreateObject(987,-14.1000000,1818.0999800,16.6000000,0.0000000,0.0000000,137.9800000); //object(elecfence_bar) (68)
- CreateObject(987,-2.5000000,1817.0996100,16.6000000,0.0000000,0.0000000,175.9790000); //object(elecfence_bar) (69)
- CreateObject(17059,15.2000000,1979.6999500,16.6000000,0.0000000,0.0000000,0.0000000); //object(cw_haypile05) (1)
- CreateObject(12918,-22.5000000,1960.8000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (1)
- CreateObject(12918,-7.6000000,2038.5999800,17.2000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (2)
- CreateObject(12918,-23.4000000,2038.0999800,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (3)
- CreateObject(12918,-36.2000000,2038.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (4)
- CreateObject(12918,-11.0996100,2038.3994100,16.3000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (5)
- CreateObject(12918,-6.0000000,2005.8000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (6)
- CreateObject(12918,-23.5996100,2017.5996100,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (7)
- CreateObject(12918,-5.7000000,1934.1999500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (8)
- CreateObject(12918,14.6992200,1957.3994100,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (9)
- CreateObject(12918,-15.7000000,1843.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (10)
- CreateObject(12918,-4.0000000,1842.5000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (11)
- CreateObject(12918,8.8000000,1841.5000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (12)
- CreateObject(12918,-18.8000000,1868.3000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (13)
- CreateObject(12918,2.7000000,1892.9000200,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (14)
- CreateObject(12918,24.4000000,1867.5000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (15)
- CreateObject(12918,42.6000000,1907.6999500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (16)
- CreateObject(12918,-32.0000000,1899.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (17)
- CreateObject(17059,39.1000000,1990.0000000,16.6000000,0.0000000,0.0000000,0.0000000); //object(cw_haypile05) (2)
- CreateObject(12918,36.6000000,1933.8000500,16.6000000,0.0000000,0.0000000,0.0000000); //object(sw_haypile05) (18)
- SetGameModeText("v3.0 | TDM/DM/STUNT");
- AddPlayerClass(287,-20.9999,2043.9071,17.7070,179.2678,31,999,999,0,0,0); // Militares
- AddPlayerClass(123,3.6781,1827.8041,17.6476,5.8211,30,999,999,0,0,0); // Terroristas
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(classid == 0)
- {
- GameTextForPlayer(playerid,"~w~Time dos ~g~Militares",5000,3);
- pClass[playerid] = 1;
- }
- if(classid == 1)
- {
- GameTextForPlayer(playerid,"~w~Time dos ~g~Terroristas",5000,3);
- pClass[playerid] = 2;
- }
- SetPlayerPos(playerid, 301.4348,2024.7008,17.6406);
- SetPlayerCameraPos(playerid, 290.9778,2024.1334,17.6406);
- SetPlayerCameraLookAt(playerid, 296.0461,2024.3499,17.6406);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- gettime(HoraRoYal, MinutosRoYal);
- SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
- TextDrawShowForPlayer(playerid, textdraw);
- SendClientMessage(playerid,0xFF8000AA,"~-~-~-~-~-~-~-~-~Guerra No Samp [v3.0]~-~-~-~-~-~-~-~--~-~-~-~-~");
- SendClientMessage(playerid,AMARELO,"{FF0000} /AJUDA {00FFFF}***|*** {FFFFFF} Para ver os comandos do servidor!");
- SendClientMessage(playerid,AMARELO,"{FF0000} /CREDITOS {00FFFF}***|*** {FFFFFF} Para ver quem Criou o GM!");
- SendClientMessage(playerid,AMARELO,"{FF0000} /OBJETIVO {00FFFF}***|*** {FFFFFF} Para ver o Objetivo do Servidor!");
- SendClientMessage(playerid,0x00FF00AA,"~-~-~-~-~-~-~-~-~-~-~-Bem Vindo~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~");
- pClass[playerid] = 0;
- GivePlayerMoney(playerid,500);
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[128];
- format(String, sizeof(String), CONTAS, Nome);
- calado[playerid] = false;
- tv[playerid] = false;
- if(!dini_Exists(String))
- {
- format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Não Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
- }
- else
- {
- format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, textdraw);
- new string[256];
- new
- name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- switch(reason)
- {
- case 0: format(string,sizeof string,"{98FB98}%s{98FB98} Saiu do Server. {00FFFF} (Crash/Erro){00FFFF}",name);
- case 1: format(string,sizeof string,"{98FB98}%s{98FB98} Saiu do Server. {00FFFF} (Resolveu Sair){00FFFF}",name);
- case 2: format(string,sizeof string,"{98FB98}%s{98FB98} Saiu do Server. {00FFFF} (Kickado/Banido){00FFFF}",name);
- }
- SendClientMessageToAll(0xFFFFFFAA,string);
- SalvarPlayer(playerid);
- if(IsPlayerInAnyVehicle(playerid))
- {
- VeiculoOcupado[GetPlayerVehicleID(playerid)] = false;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid,TempoRoYal);
- gettime(HoraRoYal, MinutosRoYal);
- SetPlayerTime(playerid,HoraRoYal,MinutosRoYal);
- if(pClass[playerid] == 1)
- {
- SetPlayerPos(playerid,-20.9999,2043.9071,17.7070);
- ResetPlayerWeapons(playerid);
- ShowPlayerDialog(playerid, ESTILOS, DIALOG_STYLE_LIST, "{FFFF00}Time dos Militares", "{FF0000}Bem Vindo ao Time dos Militares\n{FFFFFF}Seu objetivo aqui é Matar os Terroristas!\n{00FF00}Nao deixe que os Terroristas Domine seu Time. ","Jogar", "Sair");
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- GivePlayerWeapon(playerid,4,1);
- GivePlayerWeapon(playerid,16,50);
- GivePlayerWeapon(playerid,41,1000);
- GivePlayerWeapon(playerid,26,1000);
- GivePlayerWeapon(playerid,31,1000);
- GivePlayerWeapon(playerid,24,1000);
- GivePlayerWeapon(playerid,32,1000);
- SendClientMessage(playerid,COLOR_WHITE,"Você está jogando como um {00FF00}Militar! Use /ajuda para mais informações.");
- SetPlayerColor(playerid,VERDE_EXERCITO);
- SetPlayerTeam(playerid, 1);
- }
- if(pClass[playerid] == 2)
- {
- SetPlayerPos(playerid,3.6781,1827.8041,17.6476);
- ResetPlayerWeapons(playerid);
- ShowPlayerDialog(playerid, ESTILOS, DIALOG_STYLE_LIST, "{FFFF00}Time dos Terroristas", "{FF0000}Bem Vindo ao Time dos Terroristas\n{FFFFFF}Seu objetivo aqui é Matar os Militares!\n{00FF00}Nao deixe que os Militares Dominem seu Time. ","Jogar", "Sair");
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- GivePlayerWeapon(playerid,4,1);
- GivePlayerWeapon(playerid,16,50);
- GivePlayerWeapon(playerid,41,1000);
- GivePlayerWeapon(playerid,26,1000);
- GivePlayerWeapon(playerid,31,1000);
- GivePlayerWeapon(playerid,24,1000);
- GivePlayerWeapon(playerid,32,1000);
- SendClientMessage(playerid,COLOR_WHITE,"Você está jogando como um {f6dc76}Terrorista! Use /ajuda para mais informações.");
- SetPlayerColor(playerid,MARROM_TERRORISTA);
- SetPlayerTeam(playerid, 2);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- TextDrawHideForPlayer(playerid,TempoRoYal);
- SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
- GivePlayerMoney(killerid, GetPlayerMoney(killerid)+1000);
- GameTextForPlayer(playerid,"~w~Morto...!",5000,3);
- if(GetPlayerColor(playerid) == GetPlayerColor(killerid)) // Se o cor do morto for igual a do assassino
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z); // Aqui pegaremos a pos do JOGADOR
- // Aplicaremos a punição
- SetPlayerPos(killerid, x, y, z+200); // ERGUEREMOS ELE PRA QUE ELE CAIA E MORRA
- SetPlayerScore(killerid,GetPlayerScore(killerid) - 1); // tiramos 1 de score
- SendClientMessage(killerid, VERMELHO_MORTO, "Voçe perdeu $2.000 [Motivo : Matou um Companheiro] .");
- GivePlayerMoney(killerid,-2000); // tiramos 2k dele
- // FIM DA PUNIçÂO
- }
- Matou[killerid]++;
- Morreu[playerid]++;
- god[playerid] = 0;
- if(Matou[killerid] == 10)
- {
- new msg[70];
- format(msg, sizeof(msg), "%s está virando um matador, já matou 10 players", Name(killerid));
- SendClientMessageToAll(VERDE, msg);
- medalhas[killerid] ++;
- }
- else if(Matou[killerid] == 30)
- {
- new msg[80];
- format(msg, sizeof(msg), "%s está virando um Serial Killer, já matou 30 players", Name(killerid));
- SendClientMessageToAll(VERDE, msg);
- medalhas[killerid] ++;
- }
- else if(Matou[killerid] == 50)
- {
- new msg[85];
- format(msg, sizeof(msg), "%s está virando um Matador de Aluguel, já matou 50 players", Name(killerid));
- SendClientMessageToAll(VERDE, msg);
- medalhas[killerid] ++;
- }
- else if(Matou[killerid] == 100)
- {
- new msg[70];
- format(msg, sizeof(msg), "%s é um Matador, já matou 100 players", Name(killerid));
- SendClientMessageToAll(VERDE, msg);
- GivePlayerMoney(killerid, 120000);
- medalhas[killerid] ++;
- }
- else if(Matou[killerid] == 150)
- {
- new msg[70];
- format(msg, sizeof(msg), "%s é um Serial Killer, já matou 150 players", Name(killerid));
- SendClientMessageToAll(VERDE, msg);
- medalhas[killerid] ++;
- }
- else if(Matou[killerid] == 200)
- {
- new msg[80];
- format(msg, sizeof(msg), "%s é um Matador de Aluguel, já matou 200 players", Name(killerid));
- SendClientMessageToAll(VERDE, msg);
- GivePlayerMoney(killerid, 120000);
- medalhas[killerid] ++;
- }
- else if(Matou[killerid] == 205 || Matou[killerid] == 210 || Matou[killerid] == 220 || Matou[killerid] == 230 || Matou[killerid] == 240 || Matou[killerid] == 250)
- {
- new msg[85];
- format(msg, sizeof(msg), "%s está aumentando sua lista de mortos, já foram %d mortos.", Name(killerid), Matou[killerid]);
- SendClientMessageToAll(VERDE, msg);
- medalhas[killerid] ++;
- }
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(calado[playerid])
- {
- SendClientMessage(playerid, -1, "Você foi calado por um Admin!");
- return 0;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/ajuda", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Ajuda", "{FFFFFF}/nickon{FFFFFF}\n{FFFFFF}/nickoff\n{FFFFFF}/mudartime \n {FFFFFF}/afk \n {FFFFFF}/on \n {FFFFFF}/ausentes \n {FFFFFF}/creditos \n {FFFFFF}/objetivo \n {FFFFFF}/kill \n {FFFFFF}/armor \n {FFFFFF}/comprarbazuca \n {FFFFFF}/kit1 \n {FFFFFF}/kit2 \n {FFFFFF}/kit3 \n {FFFFFF}/animes \n {FFFFFF}/relatorio ", "Ok", "Fechar");
- return 1;
- }
- if (strcmp("/objetivo", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Objetivo", "O Principal Objetivo do Servidor é Matar o Time Inimigo\nNao deixe que o Outro Time Mate seus Companheiros!\nBom Jogo!.", "Ok", "Fechar");
- return 1;
- }
- if (strcmp("/creditos", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Creditos", "Leo_Gangster", "Ok", "Fechar");
- return 1;
- }
- if (strcmp("/mudartime", cmdtext, true, 10) == 0)
- {
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(strinx, sizeof(strinx), "O Player %s Foi mudar de {FF00FF}Time {FF0000}( /MUDARTIME )", pname);
- SendClientMessageToAll(Verde, strinx);
- ForceClassSelection(playerid);
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- if(strcmp(cmdtext, "/afk", true) == 0)
- {
- new string[256];
- if(AFK[playerid]==0)
- {
- AFK[playerid]=1;
- SetPlayerVirtualWorld(playerid, 1);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid,0);
- TextDrawShowForPlayer(playerid,AfkText);
- TextDrawShowForPlayer(playerid,AfkBackText);
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- format(string, sizeof(string), "(INFO) O jogador %s ficou ausente do jogo! (/afk)", playername);
- SendClientMessageToAll(0xFF9595AA, string);
- }else{
- SendClientMessage(playerid,AMARELO,"(ERRO) Você já está no modo Online para poder utilizar esse comando!");
- return 1;
- }
- return 1;
- }
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••//
- if(strcmp(cmdtext, "/ausentes", true) == 0){
- SendClientMessage(playerid,0x008000AA,"~~~~ Jogadores AFK ~~~~");
- new Jogador[24];
- new count = 0;
- new msg[120];
- for(new i=0; i<MAX_PLAYERS; i++){
- if(IsPlayerConnected(i) && AFK[i]){
- GetPlayerName(i,Jogador,24);
- format(msg,sizeof(msg),"%s", Jogador);
- SendClientMessage(playerid, 0x0088CAAA, msg);
- SendClientMessage(playerid,0x008000AA,"~~~~ Jogadores AFK ~~~~");
- count++;
- }
- }
- if(count == 0){
- SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Ninguém está ausente.");
- }
- return 1;
- }
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••//
- if (strcmp(cmdtext, "/on", true) == 0)
- {
- new string[256];
- if(AFK[playerid]==1)
- {
- AFK[playerid]=0;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid,1);
- TextDrawHideForPlayer(playerid,AfkText);
- TextDrawHideForPlayer(playerid,AfkBackText);
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- format(string, sizeof(string), "(ANTI-AFK) %s está de volta! (/on)", playername);
- SendClientMessageToAll(0x2BFF95AA, string);
- }else{
- SendClientMessage(playerid,AMARELO,"(ERRO) Você não está AFK!");
- return 1;
- }
- return 1;
- }
- if (strcmp("/armor", cmdtext, true, 10) == 0)
- {
- if(GetPlayerMoney(playerid) < 500)
- return SendClientMessage(playerid, -1, "Você não tem 500 R$!");
- GivePlayerMoney(playerid,-500);
- SetPlayerArmour(playerid, 100);
- return 1;
- }
- if (strcmp("/kit1", cmdtext, true, 10) == 0)
- {
- if(GetPlayerMoney(playerid) < 2000)
- return SendClientMessage(playerid, -1, "Você não tem 2000 R$!");
- SendClientMessage(playerid, 0xFF6347AA, "Você comprou um Kit");
- GivePlayerWeapon(playerid,4,1);
- SetPlayerArmour(playerid, 50);
- GivePlayerMoney(playerid,-2000);
- GivePlayerWeapon(playerid,26,200);
- GivePlayerWeapon(playerid,32,200);
- GivePlayerWeapon(playerid,34,10);
- GivePlayerWeapon(playerid,35,1);
- PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
- return 1;}
- if (strcmp("/kit2", cmdtext, true, 10) == 0)
- {
- if(GetPlayerMoney(playerid) < 5000)
- return SendClientMessage(playerid, -1, "Você não tem 5000 R$!");
- GivePlayerWeapon(playerid,9,1);
- SendClientMessage(playerid, 0xFF6347AA, "Você comprou um Kit");
- GivePlayerMoney(playerid,-5000);
- SetPlayerArmour(playerid, 80);
- GivePlayerWeapon(playerid,26,400);
- GivePlayerWeapon(playerid,32,400);
- GivePlayerWeapon(playerid,34,30);
- GivePlayerWeapon(playerid,35,3);
- PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
- return 1;}
- if (strcmp("/kit3", cmdtext, true, 10) == 0)
- {
- if(GetPlayerMoney(playerid) < 10000)
- return SendClientMessage(playerid, -1, "Você não tem 10000 R$!");
- SendClientMessage(playerid, 0xFF6347AA, "Você comprou um Kit");
- GivePlayerMoney(playerid,-10000);
- GivePlayerWeapon(playerid,8,1);
- SetPlayerArmour(playerid, 100);
- GivePlayerWeapon(playerid,26,999);
- GivePlayerWeapon(playerid,32,999);
- GivePlayerWeapon(playerid,34,999);
- GivePlayerWeapon(playerid,35,6);
- GivePlayerWeapon(playerid,44,1);
- PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
- return 1;}
- if (strcmp("/comprarbazuca", cmdtext, true, 10) == 0)
- {
- if(GetPlayerMoney(playerid) < 1000)
- return SendClientMessage(playerid, -1, "Você não tem 1000 R$!");
- SendClientMessage(playerid, 0xFF6347AA, "Você comprou uma Bazuca");
- GivePlayerMoney(playerid,-1000);//playerid = o player ,-1000 = o valor.. pode alterar ali mas deixar - pra diminuir a grana ao usar.
- GivePlayerWeapon(playerid,35,3);//26= arma 500 = munição
- return 1;}
- if (strcmp("/nickon", cmdtext, true) == 0)
- {
- for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
- GameTextForPlayer(playerid, "~W~Nicks Ativos ~R~", 5000, 5);
- return 1;
- }
- if (strcmp("/nickoff", cmdtext, true) == 0)
- {
- for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
- GameTextForPlayer(playerid, "~W~Nicks Desativos ~R~off", 5000, 5);
- return 1;
- }
- //---------------------ANIMAÇÕES---------------------------------------------
- if(strcmp("/renderse", cmdtext, true) == 0)
- {
- SetPlayerSpecialAction(playerid, 10);
- return 1;
- }
- if(strcmp("/ligar", cmdtext, true) == 0)
- {
- SetPlayerSpecialAction(playerid, 11);
- return 1;
- }
- if(strcmp("/desligar", cmdtext, true) == 0)
- {
- SetPlayerSpecialAction(playerid, 13);
- return 1;
- }
- if(strcmp("/bebado", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 0);
- return 1;
- }
- if(strcmp("/bomba", cmdtext, true) == 0)
- {
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/apontar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1);
- return 1;
- }
- if(strcmp("/merda", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/mascararse", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/roubar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/cruzarb", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
- return 1;
- }
- if(strcmp("/deitar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/abaixar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/vomitar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/comer", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/rap", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/passaramao", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/cobrar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/overdose", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/fumar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/fumar2", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/sentar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/conversar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/fodase", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "PED", "fucku", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/taichi", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- if(strcmp("/observar", cmdtext, true) == 0)
- {
- ApplyAnimation(playerid, "BAR", "dnk_stndF_loop", 4.0, 1, 0, 0, 0, 0);
- return 1;
- }
- //---------------------Lista Animações------------------------------------
- if(strcmp("/animes", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, VERMELHO_MORTO, "Lista de Animes");
- SendClientMessage(playerid, BRANCO_CIVIL, "/renderse /ligar /desligar /bebado /bomba /apontar /merda /mascararse");
- SendClientMessage(playerid, BRANCO_CIVIL, "/roubar /cruzarb /deitar /abaixar /vomitar /comer /rap /passaramao");
- SendClientMessage(playerid, BRANCO_CIVIL, "/cobrar /overdose /fumar /fumar2 /sentar /conversar /fodase /taichi");
- SendClientMessage(playerid, BRANCO_CIVIL, "/observar ");
- return 1;
- }
- if(strcmp("/kill", cmdtext, true) == 0)
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid,VERMELHO_MORTO,"Voce Se Matou!");
- return 1;
- }
- //=================COMANDOS DE ADMIN============================================
- new cmd[50 char], params[100 char];
- new msg[180], id;
- unformat(cmdtext, "s[50]S( )[100]",cmd,params);
- if(strcmp(cmd, "/aa", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] == 0) return SendClientMessage(playerid, -1, "Você não é admin");
- if(PlayerInfo[playerid][cAdmin] >= 1)
- {
- SendClientMessage(playerid, LARANJA, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[Comandos Admin]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
- SendClientMessage(playerid, -1, "Lvl 1: /kick /ir /trazer /par /a /forceskin /carroadm /ejetar /c");
- }
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- SendClientMessage(playerid, -1, "Lvl 2: /av /ban /vida /resetararmas /colete /cnn /hora /setskin /reparar /tv /tvoff");
- }
- if(PlayerInfo[playerid][cAdmin] >= 3)
- {
- SendClientMessage(playerid, -1, "Lvl 3: /rc /tapa /congelar /descongelar /dararma /subir /descer /status");
- }
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- SendClientMessage(playerid, -1, "Lvl 4: /dargrana /setgrana /veh /ann /salvepos /irpos /calar /descalar");
- }
- if(PlayerInfo[playerid][cAdmin] == 5)
- {
- SendClientMessage(playerid, -1, "Lvl 5: /daradmin /setgravidade /editar");
- }
- return 1;
- }
- if(strcmp(cmd, "/editar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] == 5)
- {
- new edit[10], lvl;
- if(sscanf(params, "ds[10]d", id, edit, lvl))
- {
- SendClientMessage(playerid, -1, "USO: /editar [id] [edit] [quantidade]");
- SendClientMessage(playerid, -1, "edit: medalhas, matou, morreu");
- return 1;
- }
- if(strcmp(edit, "medalhas", true) == 0)
- {
- medalhas[id] = lvl;
- return 1;
- }
- else if(strcmp(edit, "matou", true) == 0)
- {
- Matou[id] = lvl;
- return 1;
- }
- else if(strcmp(edit, "morreu", true) == 0)
- {
- Morreu[id] = lvl;
- return 1;
- }
- else return SendClientMessage(playerid, -1, "edit: medalhas, matou, morreu");
- }
- return 1;
- }
- if(strcmp(cmd, "/descalar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /descalar [id]");
- if(!calado[id]) return SendClientMessage(playerid, -1, "Este player não está calado");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO");
- format(msg, sizeof(msg), "Você foi descalado pelo Admin %s", Name(playerid));
- SendClientMessage(id, LARANJA, msg);
- format(msg, sizeof(msg), "Você descalou %s", Name(id));
- SendClientMessage(playerid, LARANJA, msg);
- calado[id] = false;
- }
- return 1;
- }
- if(strcmp(cmd, "/calar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /calar [id]");
- if(calado[id]) return SendClientMessage(playerid, -1, "Este player já está calado");
- if(id == playerid) return SendClientMessage(playerid, -1, "Não pode se calar!");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO");
- format(msg, sizeof(msg), "Você foi calado pelo Admin %s", Name(playerid));
- SendClientMessage(id, LARANJA, msg);
- format(msg, sizeof(msg), "Você calou %s", Name(id));
- SendClientMessage(playerid, LARANJA, msg);
- calado[id] = true;
- }
- return 1;
- }
- if(strcmp(cmd, "/creditosadmin", true) == 0)
- {
- SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-FilterScript: C-Admin-=-=-=-=-=-=-=-");
- SendClientMessage(playerid, LARANJA, "Feito por: Cristhian");
- SendClientMessage(playerid, LARANJA, "Admin e Helper v1.0");
- SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
- return 1;
- }
- if(strcmp(cmd, "/irpos", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4 || PlayerInfo[playerid][cHelper] >= 4)
- {
- if(p[playerid][0] == 0 && p[playerid][1] == 0 && p[playerid][2] == 0) return SendClientMessage(playerid, -1, "Você ainda não salvou nenhuma posição!");
- SetPlayerPos(playerid, p[playerid][0], p[playerid][1], p[playerid][2]);
- SendClientMessage(playerid, -1, "Você se teleportou");
- }
- return 1;
- }
- if(strcmp(cmd, "/salvepos", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4 || PlayerInfo[playerid][cHelper] == 4)
- {
- GetPlayerPos(playerid, p[playerid][0], p[playerid][1], p[playerid][2]);
- SendClientMessage(playerid, -1, "Você salvou sua posição");
- }
- return 1;
- }
- if(strcmp(cmd, "/ricos", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
- {
- new money[MAX_PLAYERS];
- for(new i; i < MAX_PLAYERS; i++)
- {
- money[i] = GetPlayerMoney(playerid);
- Rank(money, sizeof(money));
- format(msg, sizeof(msg), "Nome: %s | Dinheiro: %d", Name(i), money[i]);
- SendClientMessage(playerid, LARANJA, msg);
- }
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/tv", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /tv [id]");
- if(tv[playerid]) return SendClientMessage(playerid, -1, "Você já está espiando alguém");
- if(IsPlayerInAnyVehicle(id))
- {
- tv[playerid] = true;
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectateVehicle(id, GetPlayerVehicleID(playerid));
- return 1;
- }
- else
- {
- tv[playerid] = true;
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, id);
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/tvoff", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
- {
- if(!tv[playerid]) return SendClientMessage(playerid, -1, "Você não está espiando ninguém!");
- tv[playerid] = false;
- TogglePlayerSpectating(playerid, 0);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/status", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /status [id]");
- Status(id);
- return 1;
- }
- }
- if(strcmp(cmd, "/descer", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
- {
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- SetPlayerPos(playerid, pos[0], pos[1], pos[2] - 10);
- }
- return 1;
- }
- if(strcmp(cmd, "/subir", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
- {
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- SetPlayerPos(playerid, pos[0], pos[1], pos[2] + 10);
- }
- return 1;
- }
- if(strcmp(cmd, "/reparar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Você não está em um veículo!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, -1, "Você reparou seu veículo");
- }
- return 1;
- }
- if(strcmp(cmd, "/ejetar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /ejetar [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO!");
- if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, -1, "Player não está em nenhum veículo!");
- RemovePlayerFromVehicle(id);
- format(msg, sizeof(msg), "O Admin %s te ejetou do veículo", Name(playerid));
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você removou %s do veículo", Name(id));
- SendClientMessage(playerid, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/carroadm", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1)
- {
- new Float:pos[4];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- carroadm = CreateVehicle(400, pos[0], pos[1], pos[2], pos[3], 79, 79, 180);
- PutPlayerInVehicle(playerid, carroadm, 0);
- SendClientMessage(playerid, -1, "Carro criado com sucesso!");
- }
- return 1;
- }
- if(strcmp(cmd, "/forceskin", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2 || PlayerInfo[playerid][cHelper] >= 2)
- {
- if(sscanf(params, "dd", id)) return SendClientMessage(playerid, -1, "USO: /forceskin [id]");
- ForceClassSelection(id);
- format(msg, sizeof(msg), "O Admin %s lhe forçou a escolher uma skin", Name(playerid));
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você forçou %s a escolher uma skin", Name(id));
- SendClientMessage(playerid, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/a", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1)
- {
- new msg2[100];
- if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][cAdmin] > 0)
- {
- format(msg, sizeof(msg), "{0000BB}|CHAT ADMIN| %s diz: %s", Name(playerid), msg2);
- SendClientMessage(i, -1, msg);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/setskin", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new skin;
- if(sscanf(params, "dd", id, skin)) return SendClientMessage(playerid, -1, "USO: /setskin [id] [skin]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- SetPlayerSkin(id, skin);
- format(msg, sizeof(msg), "O Admin %s setou sua skin para %d", Name(playerid), skin);
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você setou a skin de %s para %d", Name(id), skin);
- SendClientMessage(playerid, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/hora", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new hora;
- if(sscanf(params, "d", hora)) return SendClientMessage(playerid, -1, "USO: /hora [horas]");
- if(hora < 1 || hora > 24) return SendClientMessage(playerid, -1, "A hora não pode ser menor que 1 ou maior que 24");
- SetWorldTime(hora);
- format(msg, sizeof(msg), "O Admin %s setou a hora para %d:00", Name(playerid), hora);
- SendClientMessageToAll(LARANJA, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/ann", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new msg2[80];
- if(sscanf(params, "s[80]", msg2)) return SendClientMessage(playerid, -1, "USO: /cnn [mensagem]");
- GameTextForAll(msg2, 4000, 5);
- }
- return 1;
- }
- if(strcmp(cmd, "/cnn", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new msg2[80];
- if(sscanf(params, "s[80]", msg2)) return SendClientMessage(playerid, -1, "USO: /cnn [mensagem]");
- format(msg, sizeof(msg), "~r~%s: ~w~%s", Name(playerid), msg2);
- GameTextForAll(msg, 4000, 5);
- }
- return 1;
- }
- if(strcmp(cmd, "/setgravidade", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] == 5)
- {
- new Float:gravity;
- if(sscanf(params, "f", gravity)) return SendClientMessage(playerid, -1, "USO: /setgravidade [gravidade(o padrão é 0.008)]");
- if(gravity > 2 || gravity < -1) return SendClientMessage(playerid, -1, "A gravidade não pode ser maior que 2 ou menor que -1");
- SetGravity(gravity);
- format(msg, sizeof(msg), "O Admin %s mudou a gravidade para %f", Name(playerid), gravity);
- SendClientMessageToAll(VERDE, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/veh", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- new car, cor1, cor2;
- if(sscanf(params, "ddd", car, cor1, cor2)) return SendClientMessage(playerid, -1, "USO: /veh [veículo id] [cor1] [cor2]");
- if(car < 400 || car > 611) return SendClientMessage(playerid, -1, "ID não pode ser menor que 400 e nem maior que 611");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- CreateVehicle(car, pos[0], pos[1], pos[2], 0, cor1, cor2, 120);
- SendClientMessage(playerid, -1, "Você criou um veículo!");
- }
- return 1;
- }
- if(strcmp(cmd, "/par", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
- {
- new par[80];
- if(sscanf(params, "ds[80]", id, par)) return SendClientMessage(playerid, -1, "USO: /par [id] [mensagem]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- format(msg, sizeof(msg), "(PARTICULAR) Admin/Helper %s diz: %s", Name(playerid), par);
- SendClientMessage(id, LARANJA, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/relato", true) == 0)
- {
- SendClientMessage(playerid, -1, "Seu relato foi enviado aos administradores!");
- new relato[80];
- if(sscanf(params, "s[80]", relato)) return SendClientMessage(playerid, -1, "USO: /relato [mensagem]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][cAdmin] > 0)
- {
- format(msg, sizeof(msg), "RELATO de %s: %s", Name(playerid), relato);
- SendClientMessage(i, VERDE, msg);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/admins", true) == 0)
- {
- SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-=Admins Online:=-=-=-=-=-=-=-=-");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][cAdmin] > 0)
- {
- format(msg, sizeof(msg), "Admin: %s | Level: %d", Name(i), PlayerInfo[i][cAdmin]);
- SendClientMessage(playerid, LARANJA, msg);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/resetararmas", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /resetararmas [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- ResetPlayerWeapons(id);
- }
- return 1;
- }
- if(strcmp(cmd, "/dararma", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3)
- {
- new arma, balas;
- if(sscanf(params, "ddd", id, arma, balas)) return SendClientMessage(playerid, -1, "USO: /dararma [id] [id arma] [balas]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "JOGADOR OFFLINE");
- GivePlayerWeapon(id, arma, balas);
- format(msg, sizeof(msg), "O Admin %s lhe deu a arma de id %d com %d balas", Name(playerid), arma, balas);
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você deu a arma de id %d com %d balas para %s", arma, balas, Name(id));
- SendClientMessage(playerid, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/descongelar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /descongelar [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- TogglePlayerControllable(id, 1);
- format(msg, sizeof(msg), "O Admin/Helper %s lhe descongelou", Name(playerid));
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você descongelou %s", Name(id));
- SendClientMessage(playerid, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/congelar", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /congelar [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- TogglePlayerControllable(id, 0);
- format(msg, sizeof(msg), "O Admin/Helper %s lhe congelou", Name(playerid));
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você congelou %s", Name(id));
- SendClientMessage(playerid, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/daradmin", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] == 5 || IsPlayerAdmin(playerid))
- {
- new lvl;
- if(sscanf(params, "dd", id, lvl)) return SendClientMessage(playerid, -1, "USO: /daradmin [id] [level]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- if(lvl < 0 || lvl > 5) return SendClientMessage(playerid, -1, "O level de admin não pode ser menor que 0 ou maior que 5");
- PlayerInfo[id][cAdmin] = lvl;
- format(msg, sizeof(msg), "Você setou o level de Admin de %s para %d", Name(id), lvl);
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "%s setou seu level de Admin para %d", Name(playerid), lvl);
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "%s setou o level de Admin de %s para %d", Name(playerid), Name(id), lvl);
- return 1;
- }
- else return SendClientMessage(playerid, -1, "Você precisa ser Admin lvl 5 ou estar logado na rcon");
- }
- if(strcmp(cmd, "/colete", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3)
- {
- new Float:colete;
- if(sscanf(params, "df", id, colete)) return SendClientMessage(playerid, -1, "USO: /colete [id] [colete]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- SetPlayerArmour(id, colete);
- format(msg, sizeof(msg), "Você deu %d de colete a %s", colete, Name(id));
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "Você recebeu %d de colete de %s", colete, Name(playerid));
- SendClientMessage(id, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/vida", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new Float:vida;
- if(sscanf(params, "df", id, vida)) return SendClientMessage(playerid, -1, "USO: /vida [id] [vida]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- SetPlayerHealth(id, vida);
- format(msg, sizeof(msg), "Você deu %d de vida a %s", vida, Name(id));
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "Você recebeu %d de vida de %s", vida, Name(playerid));
- SendClientMessage(id, -1, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/tapa", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3 || PlayerInfo[playerid][cHelper] >= 3)
- {
- new altura;
- if(sscanf(params, "dd", id, altura)) return SendClientMessage(playerid, -1, "USO: /tapa [id] [força do tapa]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- if(altura > 80 || altura < 1) return SendClientMessage(playerid, -1, "Use uma força entre 1 e 80");
- new Float:pos[3];
- GetPlayerPos(id, pos[0], pos[1], pos[2]);
- SetPlayerPos(id, pos[0], pos[1], pos[2] + altura);
- format(msg, sizeof(msg), "Você levou um tapa do Admin/Helper %s, com força de %d", Name(playerid), altura);
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "Você deu um tapa em %s, com força de %d", Name(id), altura);
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "%s deu um tapa em %s, com força de %d",Name(playerid), Name(id), altura);
- }
- return 1;
- }
- if(strcmp(cmd, "/setgrana", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- new grana;
- if(sscanf(params, "dd", id, grana)) return SendClientMessage(playerid, -1, "USO: /setgrana [id] [quantia]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- ResetPlayerMoney(id);
- GivePlayerMoney(id, grana);
- format(msg, sizeof(msg), "Você setou a grana de %s para $%d", Name(id), grana);
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "%s setou a grana de %s para $%d", Name(playerid), Name(id), grana);
- }
- return 1;
- }
- if(strcmp(cmd, "/av", true, 3) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new av[128];
- if(sscanf(params, "s[128]", av)) return SendClientMessage(playerid, -1, "USO: /av [texto]");
- format(msg, sizeof(msg), "ADMIN %s: %s", Name(playerid), av);
- SendClientMessageToAll(LARANJA, msg);
- }
- else if(PlayerInfo[playerid][cHelper] >= 2)
- {
- new av[128];
- if(sscanf(params, "s[128]", av)) return SendClientMessage(playerid, -1, "USO: /av [texto]");
- format(msg, sizeof(msg), "HELPER %s: %s", Name(playerid), av);
- SendClientMessageToAll(LARANJA, msg);
- }
- return 1;
- }
- if(strcmp(cmd, "/ban", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- new msg2[64], msg3[64];
- if(unformat(params, "ds[64]", id, msg3)) return SendClientMessage(playerid, -1, "USO: /ban [id] [motivo]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- format(msg, sizeof(msg), "Você foi banido pelo Admin %s, Motivo: %s", Name(playerid), msg3);
- SendClientMessage(id, -1, msg);
- Ban(id);
- format(msg2, sizeof(msg2), "%s foi banido pelo Admin %s Motivo: %s", Name(id), Name(playerid), msg3);
- SendClientMessageToAll(-1, msg2);
- }
- else return SendClientMessage(playerid, -1, "Você não está autorizado a usar este comando!");
- }
- if(strcmp(cmd, "/kick", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cAdmin] >= 2)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /kick [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- format(msg, sizeof(msg), "Você foi kickado pelo Admin/Helper %s", Name(playerid));
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "%s foi kickado pelo Admin/Helper %s", Name(id), Name(playerid));
- Kick(id);
- }
- return 1;
- }
- if(strcmp(cmd, "/ir", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
- {
- new Float:pos[3];
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /ir [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- GetPlayerPos(id, pos[0], pos[1], pos[2]);
- format(msg, sizeof(msg), "Você foi até %s", Name(id));
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "O Admin/Helper %s veio até você!", Name(playerid));
- SendClientMessage(id, -1, msg);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid, pos[0], pos[1], pos[2]);
- return 1;
- }
- else
- {
- SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/trazer", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1 || PlayerInfo[playerid][cHelper] >= 1)
- {
- if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1, "USO: /trazer [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- format(msg, sizeof(msg), "Você trouxe %s até você", Name(id));
- SendClientMessage(playerid, -1, msg);
- SendClientMessage(id, -1, "Você foi teleportado");
- if(IsPlayerInAnyVehicle(id))
- {
- new vehicleid = GetPlayerVehicleID(id);
- SetVehiclePos(vehicleid, pos[0], pos[1], pos[2]);
- return 1;
- }
- else
- {
- SetPlayerPos(id, pos[0], pos[1], pos[2]);
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/rc", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 3)
- {
- format(msg, sizeof(msg), "O Admin %s Respawnou os veiculos", Name(playerid));
- SendClientMessageToAll(-1, msg);
- for(new v = 0; v < MAX_VEHICLES; v++)
- {
- if(VeiculoOcupado[v] == false)
- {
- SetVehicleToRespawn(v);
- }
- }
- return 1;
- }
- else return SendClientMessage(playerid, -1, "Você não está autorizado a usar este comando!");
- }
- if(strcmp(cmd, "/dargrana", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- new grana;
- if(sscanf(params, "dd", id, grana)) return SendClientMessage(playerid, -1, "USO: /dargrana [id] [quantia]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- GivePlayerMoney(id, grana);
- format(msg, sizeof(msg), "Você deu $%d a %s", grana, Name(id));
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "%s deu $%d a %s", Name(playerid), grana, Name(id));
- }
- return 1;
- }
- //----------------------------------Helper----------------------------------
- if(strcmp(cmd, "/ah", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] == 0) return SendClientMessage(playerid, -1, "Você não é admin");
- if(PlayerInfo[playerid][cAdmin] >= 1)
- {
- SendClientMessage(playerid, LARANJA, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[Comandos-Helper]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
- SendClientMessage(playerid, -1, "Lvl 1: /ir /trazer /par /h /forceskin /ejetar /ricos /c");
- }
- if(PlayerInfo[playerid][cAdmin] >= 2)
- {
- SendClientMessage(playerid, -1, "Lvl 2: /av /setskin /reparar /tv /tvoff /kick");
- }
- if(PlayerInfo[playerid][cAdmin] >= 3)
- {
- SendClientMessage(playerid, -1, "Lvl 3: /tapa /congelar /descongelar /subir /descer /status");
- }
- if(PlayerInfo[playerid][cAdmin] >= 4)
- {
- SendClientMessage(playerid, -1, "Lvl 4: /salvepos /irpos /darhelper");
- }
- return 1;
- }
- if(strcmp(cmd, "/c", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] >= 1)
- {
- new msg2[100];
- if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][cAdmin] > 0)
- {
- format(msg, sizeof(msg), "{0000BB}|CHAT| Admin %s diz: %s", Name(playerid), msg2);
- SendClientMessage(i, -1, msg);
- }
- }
- return 1;
- }
- if(PlayerInfo[playerid][cHelper] >= 1)
- {
- new msg2[100];
- if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][cHelper] > 0)
- {
- format(msg, sizeof(msg), "{0000BB}|CHAT| Helper %s diz: %s", Name(playerid), msg2);
- SendClientMessage(i, -1, msg);
- }
- }
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/h", true) == 0)
- {
- if(PlayerInfo[playerid][cHelper] >= 1)
- {
- new msg2[100];
- if(sscanf(params, "s[100]", msg2)) return SendClientMessage(playerid, -1, "USO: /a [mensagem]");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][cHelper] > 0)
- {
- format(msg, sizeof(msg), "{0000BB}|CHAT HELPER| %s diz: %s", Name(playerid), msg2);
- SendClientMessage(i, -1, msg);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/helpers", true) == 0)
- {
- SendClientMessage(playerid, -1, "-=-=-=-=-=-=-=-=Helpers Online:=-=-=-=-=-=-=-=-");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][cHelper] > 0)
- {
- format(msg, sizeof(msg), "Helper: %s | Level: %d", Name(i), PlayerInfo[i][cHelper]);
- SendClientMessage(playerid, LARANJA, msg);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/darhelper", true) == 0)
- {
- if(PlayerInfo[playerid][cAdmin] == 5 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][cHelper] == 4)
- {
- new lvl;
- if(sscanf(params, "dd", id, lvl)) return SendClientMessage(playerid, -1, "USO: /darhelper [id] [level]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ID INVÁLIDO OU OFFLINE");
- if(lvl < 0 || lvl > 4) return SendClientMessage(playerid, -1, "O level de helper não pode ser menor que 0 ou maior que 4");
- PlayerInfo[id][cHelper] = lvl;
- format(msg, sizeof(msg), "Você setou o level de Helper de %s para %d", Name(id), lvl);
- SendClientMessage(playerid, -1, msg);
- format(msg, sizeof(msg), "%s setou seu level de Helper para %d", Name(playerid), lvl);
- SendClientMessage(id, -1, msg);
- format(msg, sizeof(msg), "%s setou o level de Helper de %s para %d", Name(playerid), Name(id), lvl);
- return 1;
- }
- else return SendClientMessage(playerid, -1, "Você precisa ser Admin lvl 5, estar logado na rcon ou ser Helper lvl 4");
- }
- return SendClientMessage(playerid,0x8080FFAA ,"Comando Invalido - {FF0000}/AJUDA {FF69B4} - {FFFFFF}Para objer os Comandos do Servidor!");
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(vehicleid == carroadm)
- {
- if(PlayerInfo[playerid][cAdmin] == 0)
- {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid, LARANJA, "Você não é Admin, por isso não pode usar o carro!");
- return 1;
- }
- }
- return 1;
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- VeiculoOcupado[vehicleid] = true;
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- VeiculoOcupado[vehicleid] = false;
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- if(vehicleid == carroadm)
- {
- DestroyVehicle(carroadm);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == REGISTRO)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Não Registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
- ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
- SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha válida");
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), CONTAS, Nome);
- dini_Create(String);
- dini_Set(String,"Senha",inputtext);
- dini_IntSet(String,"Dinheiro",0);
- dini_IntSet(String,"Vida", 100);
- dini_IntSet(String,"Colete", 100);
- dini_IntSet(String,"Matou",0);
- dini_IntSet(String,"Morreu",0);
- dini_IntSet(String,"Logou",0);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", "{1E90FF}Pronto você se registrou agora digite Sua Senha Para Logar-Se", "Logar", "Cancelar");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, 0x9900FFAA, "Você Foi Kickado Porque Não Quis Se Registrar!!");
- Kick(playerid);
- return 1;
- }
- }
- if(dialogid == LOGIN)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
- SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
- return 1;
- }
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[100];
- format(String, sizeof(String), CONTAS, Nome);
- if(!strcmp(inputtext,dini_Get(String,"Senha"),false))
- {
- SetarPlayer(playerid);
- SendClientMessage(playerid,0x9900FFAA,"Você Foi Logado Com Sucesso!!!");
- god[playerid] = 0;
- p[playerid][0] = 0;
- p[playerid][1] = 0;
- p[playerid][2] = 0;
- return 1;
- }
- else
- {
- SendClientMessage(playerid,0x9900FFAA,"Senha incorreta digite-a novamente");
- format(String, sizeof(String), "{7FFFD4}Nick: {1E90FF}%s {1E90FF}Registrado\n\n{FFFFFF} Digite Sua Senha Para Logar", Nome);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, 0x9900FFAA, "Você não quis se logar, por este motivo será Kickado");
- Kick(playerid);
- return 1;
- }
- }
- return 1;
- }
- forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
- {
- new Float:sangue, Float:vida;
- if(god[playerid] == 0)
- {
- god[playerid]++;
- GetPlayerHealth(playerid, vida);
- sangue = vida;
- }
- else if(god[playerid] > 0)
- {
- if(sangue == GetPlayerHealth(playerid, vida))
- {
- new msg[128];
- SendClientMessage(playerid, -1, "Você foi kickado por suspeita de xiter!");
- format(msg, sizeof(msg), "%s foi kickado automaticamente por suspeita de xiter", Name(playerid));
- SendClientMessageToAll(-1, msg);
- Kick(playerid);
- }
- else
- {
- god[playerid] --;
- }
- }
- if(weaponid == 35 || weaponid == 36 || weaponid == 37 || weaponid == 38)
- {
- if(PlayerInfo[playerid][cAdmin] < 2)
- {
- new msg[128];
- format(msg, sizeof(msg), "%s foi kickado automaticamente por usar arma proibida de id %d", Name(issuerid), weaponid);
- SendClientMessageToAll(VERDE, msg);
- }
- }
- return 1;
- }
- forward AtualizarScore();
- public AtualizarScore()
- {
- for(new x = 0, y = GetMaxPlayers(); x != y; x++)
- {
- if(!IsPlayerConnected(x)) continue;
- new STR[26];
- format(STR, 26, "~r~Voce Matou: ~w~%d", GetPlayerScore(x));
- TextDrawShowForPlayer(x, ScoreTextDraw[x]);
- TextDrawSetString(ScoreTextDraw[x], STR);
- }
- return true;
- }
- forward Atualizartempo();
- public Atualizartempo()
- {
- gettime(HoraRoYal, MinutosRoYal);
- format(StringRoYalTempo,32,"%02d:%02d",HoraRoYal,MinutosRoYal);
- TextDrawSetString(TempoRoYal,StringRoYalTempo);
- SetWorldTime(HoraRoYal);
- new x=0;
- while(x!=MAX_PLAYERS) {
- if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
- SetPlayerTime(x,HoraRoYal,MinutosRoYal);
- }
- x++;
- }
- }
- Status(playerid)
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[70];
- SendClientMessage(playerid, 0xFF0000AA, "=========================================");
- format(String, sizeof(String),"Minhas Informações : %s", Nome);
- SendClientMessage(playerid, 0xFFFF00AA,String);
- format(String, sizeof(String),"Dinheiro: %d", GetPlayerMoney(playerid));
- SendClientMessage(playerid, 0x1E90FFAA,String);
- format(String, sizeof(String),"Matou: %d", Matou[playerid]);
- SendClientMessage(playerid, 0x1E90FFAA,String);
- format(String, sizeof(String),"Morreu: %d", Morreu[playerid]);
- SendClientMessage(playerid, 0x1E90FFAA,String);
- format(String, sizeof(String),"Medalhas: %d", medalhas[playerid]);
- SendClientMessage(playerid, 0x1E90FFAA,String);
- format(String, sizeof(String),"Level %d de Admin", PlayerInfo[playerid][cAdmin]);
- SendClientMessage(playerid, 0x1E90FFAA,String);
- format(String, sizeof(String),"Level %d de Helper", PlayerInfo[playerid][cHelper]);
- SendClientMessage(playerid, 0x1E90FFAA,String);
- SendClientMessage(playerid, 0xFF0000AA, "=========================================");
- return 1;
- }
- SalvarPlayer(playerid)
- {
- new Float:Vida;
- new Float:Colete;
- GetPlayerHealth(playerid, Vida);
- GetPlayerArmour(playerid, Colete);
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[50];
- format(String, sizeof(String), CONTAS, Nome);
- dini_IntSet(String,"Dinheiro", GetPlayerMoney(playerid));
- dini_FloatSet(String,"Vida", Vida);
- dini_FloatSet(String,"Colete", Colete);
- dini_IntSet(String,"Matou", Matou[playerid]);
- dini_IntSet(String,"Morreu", Morreu[playerid]);
- dini_IntSet(String,"Admin", PlayerInfo[playerid][cAdmin]);
- dini_IntSet(String,"Helper", PlayerInfo[playerid][cHelper]);
- dini_IntSet(String,"Medalhas", medalhas[playerid]);
- return 1;
- }
- SetarPlayer(playerid)
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[50];
- format(String, sizeof(String), CONTAS, Nome);
- GivePlayerMoney(playerid, dini_Int(String,"Dinheiro"));
- SetPlayerHealth(playerid, dini_Int(String,"Vida"));
- SetPlayerArmour(playerid, dini_Int(String,"Colete"));
- Matou[playerid] = dini_Int(String, "Matou");
- Morreu[playerid] = dini_Int(String, "Morreu");
- PlayerInfo[playerid][cAdmin] = dini_Int(String, "Admin");
- PlayerInfo[playerid][cHelper] = dini_Int(String, "Helper");
- medalhas[playerid] = dini_Int(String, "Medalhas");
- return 1;
- }
- Name(playerid)
- {
- new nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, nome, sizeof(nome));
- return nome;
- }
- stock Rank(v[], size)
- {
- new t = 0;
- for(new i = 1, j = (size); i != j; ++i)
- {
- for(new q = 0; (q != size - i); ++q)
- t = ((v[i] > v[q]) ? (t = v[i], v[i] = v[q], v[q] = t) : (0));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement