22.07.2012, 17:02
Код:
/* FuneraL's Administration System v1.0 Por: [iPs].FuneraL. -- [iPs]TeaM Forum: http://ips-team.forumeiros.com/ Special Thanks To: Zeex - ZCMD Command Processor Double-O-Seven - Double-O-Files (DOF2) ****** - SSCANF SA-MP Team - SA:MP SmiT - Tutorial Sobre Sistema de Salvamento DOF2 - Tуpico: https://sampforum.blast.hk/showthread.php?tid=290320 Й Expressamente Proibido a Comercializaзгo do Mesmo sem A Autorizaзгo do Criador! Obra Licenciada por Creative Commons! */ #include <a_samp> #include <DOF2> #include <sscanf> #include <zcmd> /* Definindo Filterscript */ #define FILTERSCRIPT #if defined FILTERSCRIPT #endif /* Defines / Configuraзхes */ #define RED 0xFF00000FF #define YELLOW 0xFFFF00FF #define GREEN 0x00FF00FF #define BLUE 0x0000FFFF #define PINK 0xFF69B4FF #define DARKGREEN 0x006400FF #define BRONZE 0xB8860BFF #define CINZA 0x9C9C9CFF #define ADMIN_SPEC_TYPE_PLAYER 1 #define ADMIN_SPEC_TYPE_NONE 0 #define Mensagem(%1,%2,%3) SendClientMessage(%1,%2,%3) #define MensagemParaTodos(%1,%2) SendClientMessageToAll(%1,%2) #define LoginCase 1 #define RegisterCase 2 #define CommandsCase 3 #define TeleVipCase 4 #define ContasSalvas "/Contas/%s.ini" new gString[1024], gAdminName[24], gPlayerName[24], Float:pX, Float:pY, Float:pZ, Avisos[MAX_PLAYERS], SpectadorON[MAX_PLAYERS], SpectadorMode[MAX_PLAYERS], ObjetoAMover, ObjetoAMover2, VeiculoCriado[MAX_PLAYERS], IDCarro[MAX_PLAYERS], IDVeiculo, ExpirarVIP[MAX_PLAYERS], ExpirarBAN[MAX_PLAYERS] ; /* Enumerator */ enum pInfo { PlayerAdmin, PlayerScore, PlayerKills, PlayerDeaths, PlayerVip, PlayerBanido }; new Informacoes[MAX_PLAYERS][pInfo]; public OnFilterScriptInit() { print("FuneraL's Administration System Loaded :]"); AddStaticVehicleEx(411,-688.50000000,969.79998779,12.00000000,90.00000000,-1,-1,15); //Infernus AddStaticVehicleEx(411,-688.59997559,966.79998779,12.00000000,90.00000000,-1,-1,15); //Infernus AddStaticVehicleEx(411,-688.40002441,963.79998779,12.00000000,90.00000000,-1,-1,15); //Infernus AddStaticVehicleEx(411,-680.09997559,966.79998779,12.00000000,90.00000000,-1,-1,15); //Infernus AddStaticVehicleEx(452,-645.00000000,872.90002441,0.00000000,229.99993896,-1,-1,15); //Speeder AddStaticVehicleEx(452,-648.59997559,868.09997559,0.00000000,229.99877930,-1,-1,15); //Speeder AddStaticVehicleEx(522,-692.90002441,946.59997559,11.89999962,0.00000000,-1,-1,15); //NRG-500 AddStaticVehicleEx(522,-694.09997559,946.40002441,11.89999962,0.00000000,-1,-1,15); //NRG-500 AddStaticVehicleEx(522,-695.29998779,946.20001221,11.89999962,0.00000000,-1,-1,15); //NRG-500 AddStaticVehicleEx(522,-696.50000000,946.00000000,11.89999962,0.00000000,-1,-1,15); //NRG-500 CreateObject(987,-717.00000000,972.79998779,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1) CreateObject(987,-705.00000000,972.70001221,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (2) CreateObject(987,-693.29998779,972.70001221,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3) CreateObject(987,-681.50000000,972.79998779,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4) CreateObject(987,-669.70001221,972.59997559,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5) CreateObject(987,-658.59997559,972.70001221,11.10000038,0.00000000,0.00000000,268.00000000); //object(elecfence_bar) (6) CreateObject(987,-658.79998779,961.00000000,11.10000038,0.00000000,0.00000000,267.99499512); //object(elecfence_bar) (7) CreateObject(987,-659.40002441,949.00000000,11.10000038,0.00000000,0.00000000,267.99499512); //object(elecfence_bar) (8) CreateObject(987,-660.00000000,937.00000000,11.10000038,0.00000000,0.00000000,267.99499512); //object(elecfence_bar) (9) CreateObject(987,-660.40002441,920.29998779,11.10000038,0.00000000,0.00000000,267.99499512); //object(elecfence_bar) (10) CreateObject(987,-659.50000000,908.20001221,11.10000038,0.00000000,0.00000000,177.99499512); //object(elecfence_bar) (11) CreateObject(987,-671.20001221,908.59997559,11.10000038,0.00000000,0.00000000,177.98950195); //object(elecfence_bar) (12) CreateObject(987,-683.20001221,909.00000000,11.10000038,0.00000000,0.00000000,177.98950195); //object(elecfence_bar) (13) CreateObject(987,-695.50000000,909.40002441,11.10000038,0.00000000,0.00000000,177.98950195); //object(elecfence_bar) (14) CreateObject(987,-707.29998779,909.40002441,11.10000038,0.00000000,0.00000000,177.98950195); //object(elecfence_bar) (15) CreateObject(987,-727.00000000,910.20001221,11.10000038,0.00000000,0.00000000,177.98950195); //object(elecfence_bar) (16) CreateObject(987,-739.09997559,910.09997559,11.10000038,0.00000000,0.00000000,83.98950195); //object(elecfence_bar) (17) CreateObject(987,-737.79998779,922.00000000,11.10000038,0.00000000,0.00000000,83.98498535); //object(elecfence_bar) (18) CreateObject(987,-736.50000000,933.70001221,11.10000038,0.00000000,0.00000000,83.98498535); //object(elecfence_bar) (19) CreateObject(987,-735.20001221,945.40002441,11.10000038,0.00000000,0.00000000,83.98498535); //object(elecfence_bar) (20) CreateObject(987,-733.90002441,957.29998779,11.10000038,0.00000000,0.00000000,83.98498535); //object(elecfence_bar) (21) CreateObject(987,-728.79998779,972.79998779,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (22) CreateObject(987,-732.50000000,972.79998779,11.10000038,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (23) CreateObject(987,-733.90002441,960.90002441,11.10000038,0.00000000,0.00000000,82.00000000); //object(elecfence_bar) (24) CreateObject(2745,-688.20001221,948.00000000,12.39999962,0.00000000,0.00000000,182.00000000); //object(cj_stat_3) (1) ObjetoAMover = CreateObject(976,-718.59997559,910.40002441,11.19999981,0.00000000,0.00000000,179.99993896); //object(phils_compnd_gate) (1) ObjetoAMover2 = CreateObject(976,-660.40002441,926.50000000,11.19999981,0.00000000,0.00000000,267.99499512); //object(phils_compnd_gate) (2) CreateObject(691,-712.00000000,966.20001221,11.30000019,0.00000000,4.00000000,86.99996948); //object(sm_veg_tree4_big) (1) CreateObject(691,-668.00000000,951.90002441,11.30000019,0.00000000,3.99902344,86.99523926); //object(sm_veg_tree4_big) (2) CreateObject(691,-691.79998779,919.59997559,11.30000019,0.00000000,3.99902344,86.99523926); //object(sm_veg_tree4_big) (3) Create3DTextLabel("Portгo 1\nBem Vindo a Casa VIP\nUse : /abrirpt1", 0xFF0000FF, -722.7346,909.6000,12.1305, 80.0, 0, 0); Create3DTextLabel("Portao 2\nBem Vindo a Бrea de Navegaзгo\nUse : /abrirpt2", 0xFF0000FF, -659.5804,922.1988,12.1267, 80.0, 0, 0); return 1; } public OnFilterScriptExit() { print("FuneraL's Administration System Closed :["); DOF2_Exit(); return 1; } public OnPlayerConnect(playerid) { if(Informacoes[playerid][PlayerBanido] == 1) return Mensagem(playerid, RED, "Banido do Servidor Temporariбmente, Bye!"), Kick(playerid); if(DOF2_FileExists(PlayerArchive(playerid))) { ShowPlayerDialog(playerid, LoginCase, DIALOG_STYLE_INPUT,"Logando no Servidor", "[FuneraL's Admin System]: Bem Vindo Novamente\nLogue-se com Sua Senha do Registro","Logar","Cancelar"); } else { ShowPlayerDialog(playerid, RegisterCase, DIALOG_STYLE_INPUT,"Registrando no Servidor", "[FuneraL's Admin System]: Bem Vindo ao Servidor\nDigite sua Senha Abaixo Para Registrar-se","Registrar","Cancelar"); } return 1; } public OnPlayerDisconnect(playerid, reason) { DOF2_SetInt(PlayerArchive(playerid), "Administrador", Informacoes[playerid][PlayerAdmin]); DOF2_SetInt(PlayerArchive(playerid), "Grana", GetPlayerMoney(playerid)); DOF2_SetInt(PlayerArchive(playerid), "Score", Informacoes[playerid][PlayerScore]); DOF2_SetInt(PlayerArchive(playerid), "Kills", Informacoes[playerid][PlayerKills]); DOF2_SetInt(PlayerArchive(playerid), "Deaths", Informacoes[playerid][PlayerDeaths]); DOF2_SetInt(PlayerArchive(playerid), "Vip", Informacoes[playerid][PlayerVip]); DOF2_SaveFile(); return 1; } public OnPlayerDeath(playerid, killerid, reason) { Informacoes[playerid][PlayerDeaths]++; Informacoes[killerid][PlayerKills]++; SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); Informacoes[killerid][PlayerScore]++; return 1; } /*---------------------------------------------Comandos de Administrador---------------------------------------------*/ CMD:creditos(playerid) { new MessageBox[300]; format(gString, sizeof(gString), "Criadores do Filterscript de Administrador\n\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "[iPs].FuneraL. - Programador Geral\n\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "Includes e Tutoriais\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "****** - SSCANF Include\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "Zeex - ZCMD Command Processor\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "Double-O-Seven - DOF2 (Double-O-Files)\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "SmiT - Tutorial Seguido para o Sistema de Salvamento\n"); strcat(MessageBox, gString); format(gString, sizeof(gString), "@Riichard - Ajudou nas Ideias e Testes\n\n"); strcat(MessageBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Criadores do Filterscript", MessageBox, "Ok", ""); return 1; } CMD:ajudaadmin(playerid) { if(Informacoes[playerid][PlayerAdmin] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo Pode Utilizar este Comando Pois Nгo й Administrador"); ShowPlayerDialog(playerid, CommandsCase, DIALOG_STYLE_LIST, "Comandos de Administrador", "Administrador Nнvel 1\nAdministrador Nivel 2\nAdministrador Nivel 3\nAdministrador Nivel 4\nAdministrador Nivel 5\nAdministrador Nivel 6","Selecionar","Fechar"); return 1; } CMD:observar(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /observar [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, VictimID); SetPlayerInterior(playerid,GetPlayerInterior(VictimID)); SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(VictimID)); SpectadorON[playerid] = VictimID; SpectadorMode[playerid] = ADMIN_SPEC_TYPE_PLAYER; GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Estб Observando o Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 0) { Mensagem(i, -1, gString); } } return 1; } CMD:tapa(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /tapa [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerPos(VictimID, pX, pY, pZ); SetPlayerPos(VictimID, pX, pY, pZ+5); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu um Tapa no Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } return 1; } CMD:tapao(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /tapao [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerPos(VictimID, pX, pY, pZ); SetPlayerPos(VictimID, pX, pY, pZ+15); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu uma Super Bofetada no Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } return 1; } CMD:explodir(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 3) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /tapao [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerPos(VictimID, pX, pY, pZ); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Explodiu o Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } CreateExplosion(pX, pY, pZ, 10, 20.0); return 1; } CMD:avisar(playerid, params[]) { new VictimID, Motivo[120]; if(Informacoes[playerid][PlayerAdmin] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "ds[120]", VictimID, Motivo)) return Mensagem(playerid, RED, "Erro: /avisar [ID] [Motivo]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); if(Avisos[playerid] == 0) { format(gString, sizeof(gString), ">> Admin-CMD: %s Levou um Aviso do Administrador %s [1/3]", gPlayerName, gAdminName); MensagemParaTodos(RED, gString); } if(Avisos[playerid] == 1) { format(gString, sizeof(gString), ">> Admin-CMD: %s Levou um Aviso do Administrador %s [2/3]", gPlayerName, gAdminName); MensagemParaTodos(RED, gString); } if(Avisos[playerid] == 2) { format(gString, sizeof(gString), ">> Admin-CMD: %s Levou um Aviso do Administrador %s [3/3]", gPlayerName, gAdminName); MensagemParaTodos(RED, gString); Kick(VictimID); } Avisos[VictimID]++; return 1; } CMD:retiraravisos(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 5) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /retiraravisos [ID]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Retirou os Avisos do Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } Avisos[VictimID] = 0; return 1; } CMD:a(playerid, params[]) { new Texto[150]; if(Informacoes[playerid][PlayerAdmin] < 1 && Informacoes[playerid][PlayerVip] < 3) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "s[150]", Texto)) return Mensagem(playerid, RED, "Erro: /a [Texto]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), "{FF0000}(Admin-Chat) - {FFFFFF}%s{FF0000} Diz:{FFFFFF} %s", gAdminName, Texto); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1 && Informacoes[i][PlayerVip] >= 3) { Mensagem(i, RED, gString); } } return 1; } CMD:x9(playerid, params[]) { new VictimID, Motivo[150], gString2[200], gString3[200], gString4[200]; if(sscanf(params, "ds[150]", VictimID, Motivo)) return Mensagem(playerid, RED, "Erro: /x9 [ID] [Motivo]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), "[DENUNCIA]: %s Denunciou o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); if(Informacoes[playerid][PlayerVip] == 1) { format(gString2, sizeof(gString2), "[DENUNCIA-Vip Bronze]: %s Denunciou o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); } if(Informacoes[playerid][PlayerVip] == 2) { format(gString3, sizeof(gString3), "[DENUNCIA-Vip Prata]: %s Denunciou o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); } if(Informacoes[playerid][PlayerVip] == 3) { format(gString4, sizeof(gString4), "[DENUNCIA-Vip Ouro]: %s Denunciou o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); } for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); Mensagem(i, BRONZE, gString2); Mensagem(i, CINZA, gString3); Mensagem(i, YELLOW, gString4); } } return 1; } CMD:admins(playerid) { new gString2[500], Nomeado[50]; for(new i = 0; i < MAX_PLAYERS; i++) { GetPlayerName(i, gAdminName, sizeof(gAdminName)); if(Informacoes[i][PlayerAdmin] >= 1) { if(Informacoes[i][PlayerAdmin] == 1) Nomeado = "Helper"; if(Informacoes[i][PlayerAdmin] == 2) Nomeado = "Moderador"; if(Informacoes[i][PlayerAdmin] == 3) Nomeado = "Administrador"; if(Informacoes[i][PlayerAdmin] == 4) Nomeado = "Administrador Geral"; if(Informacoes[i][PlayerAdmin] == 5) Nomeado = "Sub-Dono"; if(Informacoes[i][PlayerAdmin] == 6) Nomeado = "Dono"; format(gString, sizeof(gString), "{FF0000}Administrador:{FFFFFF} %s{FF0000} - Level{FFFFFF} %d{FF0000} - Hierarquia:{FFFFFF} %s\n", gAdminName, Informacoes[i][PlayerAdmin], Nomeado); strcat(gString2, gString, sizeof(gString2)); } } if(Informacoes[playerid][PlayerAdmin] < 1) { format(gString, sizeof(gString), "Administraзгo Offline no Momento!"); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Administraзгo Online", gString, "Fechar", ""); } ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Administraзгo Online", gString2, "Fechar", ""); return 1; } CMD:vips(playerid) { new gString2[500], Nomeado[50]; for(new i = 0; i < MAX_PLAYERS; i++) { GetPlayerName(i, gAdminName, sizeof(gAdminName)); if(Informacoes[i][PlayerVip] >= 1) { if(Informacoes[i][PlayerVip] == 1) Nomeado = "Vip Bronze"; if(Informacoes[i][PlayerVip] == 2) Nomeado = "Vip Prata"; if(Informacoes[i][PlayerVip] == 3) Nomeado = "Vip Ouro"; format(gString, sizeof(gString), "{FF0000}Vip:{FFFFFF} %s{FF0000} - Level{FFFFFF} %d{FF0000} - Hierarquia:{FFFFFF} %s\n", gAdminName, Informacoes[i][PlayerVip], Nomeado); strcat(gString2, gString, sizeof(gString2)); } } if(Informacoes[playerid][PlayerVip] < 1) { format(gString, sizeof(gString), "Nгo Hб Vips Online!"); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Vips Online", gString, "Fechar", ""); } ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Vips Online", gString2, "Fechar", ""); return 1; } CMD:dizer(playerid, params[]) { new Fala[350], Texto[120], gString2[200]; if(Informacoes[playerid][PlayerAdmin] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "s[120]", Texto)) return Mensagem(playerid, RED, "Erro: /dizer [Texto]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), "__________________Administraзгo__________________"); strcat(Fala, gString); format(gString2, sizeof(gString2), "%s : %s", gAdminName, Texto); strcat(Fala, gString2); SendClientMessageToAll(RED, gString); SendClientMessageToAll(RED, gString2); return 1; } CMD:kick(playerid, params[]) { new VictimID, Motivo[120]; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "ds[120]", VictimID, Motivo)) return Mensagem(playerid, RED, "Erro: /kick [ID] [Motivo]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Kickou o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); MensagemParaTodos(RED, gString); Kick(VictimID); return 1; } CMD:ban(playerid, params[]) { new VictimID, Motivo[120]; if(Informacoes[playerid][PlayerAdmin] < 3) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "ds[120]", VictimID, Motivo)) return Mensagem(playerid, RED, "Erro: /ban [ID] [Motivo]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Baniu o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); MensagemParaTodos(RED, gString); Ban(VictimID); return 1; } CMD:ir(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /ir [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: Vocк Foi atй o Jogador %s", gPlayerName); Mensagem(playerid, RED, gString); format(gString, sizeof(gString), ">> Admin-CMD: O Admin %s Foi atй Vocк", gAdminName); Mensagem(VictimID, RED, gString); GetPlayerPos(VictimID, pX, pY, pZ); SetPlayerPos(playerid, pX, pY, pZ); return 1; } CMD:trazer(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /trazer [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: Vocк Trouxe o Jogador %s Atй Vocк", gPlayerName); Mensagem(playerid, RED, gString); format(gString, sizeof(gString), ">> Admin-CMD: O Admin %s Puxou Vocк para a Posiзгo Dele", gAdminName); Mensagem(VictimID, RED, gString); GetPlayerPos(playerid, pX, pY, pZ); SetPlayerPos(VictimID, pX, pY, pZ); return 1; } CMD:darvida(playerid, params[]) { new VictimID, Health; if(Informacoes[playerid][PlayerAdmin] < 3) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dd", VictimID, Health)) return Mensagem(playerid, RED, "Erro: /darvida [ID] [Vida]"); if(Health < 0 || Health > 100) return Mensagem(playerid, RED, "Erro: Minimo de Vida й 0 e o Maximo Permitido й 100"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu %d de Vida para o Jogador %s", gAdminName, Health, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } SetPlayerHealth(VictimID, Health); return 1; } CMD:vidatodos(playerid, params[]) { new Health; if(Informacoes[playerid][PlayerAdmin] < 5) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", Health)) return Mensagem(playerid, RED, "Erro: /vidatodos [Vida]"); if(Health < 0 || Health > 100) return Mensagem(playerid, RED, "Erro: Minimo de Vida й 0 e o Maximo Permitido й 100"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu %d de Vida Para Todos os Jogadores", gAdminName, Health); MensagemParaTodos(-1, gString); for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerHealth(i, Health); } return 1; } CMD:coletetodos(playerid, params[]) { new Armor; if(Informacoes[playerid][PlayerAdmin] < 5) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", Armor)) return Mensagem(playerid, RED, "Erro: /coletetodos [Colete]"); if(Armor < 0 || Armor > 100) return Mensagem(playerid, RED, "Erro: Minimo de Colete й 0 e o Maximo Permitido й 100"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu %d de Colete Para Todos os Jogadores", gAdminName, Armor); MensagemParaTodos(-1, gString); for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerArmour(i, Armor); } return 1; } CMD:dardinheiro(playerid, params[]) { new VictimID, Dinheiro; if(Informacoes[playerid][PlayerAdmin] < 4) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dd", VictimID, Dinheiro)) return Mensagem(playerid, RED, "Erro: /dardinheiro [ID] [Grana]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu %dR$ para o Jogador %s", gAdminName, Dinheiro, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } GivePlayerMoney(VictimID, Dinheiro); return 1; } CMD:setardinheiro(playerid, params[]) { new VictimID, Dinheiro; if(Informacoes[playerid][PlayerAdmin] < 4) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dd", VictimID, Dinheiro)) return Mensagem(playerid, RED, "Erro: /setardinheiro [ID] [Grana]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Setou o Dinheiro do Jogador %s para %dR$", gAdminName, gPlayerName, Dinheiro); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } ResetPlayerMoney(VictimID); GivePlayerMoney(VictimID, Dinheiro); return 1; } CMD:setarinterior(playerid, params[]) { new VictimID, Interior; if(Informacoes[playerid][PlayerAdmin] < 5) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dd", VictimID, Interior)) return Mensagem(playerid, RED, "Erro: /setarinterior [ID] [Interior]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Setou o Interior do Jogador %s para %d", gAdminName, gPlayerName, Interior); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } SetPlayerInterior(VictimID, Interior); return 1; } CMD:setarvw(playerid, params[]) { new VictimID, VW; if(Informacoes[playerid][PlayerAdmin] < 5) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dd", VictimID, VW)) return Mensagem(playerid, RED, "Erro: /setarvw [ID] [Virtual World]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Setou o Virtual World do Jogador %s para %d", gAdminName, gPlayerName, VW); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } SetPlayerVirtualWorld(VictimID, VW); return 1; } CMD:darcolete(playerid, params[]) { new VictimID, Armor; if(Informacoes[playerid][PlayerAdmin] < 3) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dd", VictimID, Armor)) return Mensagem(playerid, RED, "Erro: /darcolete [ID] [Colete]"); if(Armor < 0 || Armor > 100) return Mensagem(playerid, RED, "Erro: Minimo de Colete й 0 e o Maximo Permitido й 100"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu %d de Colete para o Jogador %s", gAdminName, Armor, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } SetPlayerArmour(VictimID, Armor); return 1; } CMD:congelar(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /congelar [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Congelou o Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } TogglePlayerControllable(VictimID, 0); return 1; } CMD:descongelar(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /descongelar [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Descongelou o Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } TogglePlayerControllable(VictimID, 1); return 1; } CMD:pm(playerid, params[]) { new VictimID, Mensagem[120]; if(sscanf(params, "ds[120]", VictimID, Mensagem)) return Mensagem(playerid, RED, "Erro: /pm [ID] [Mensagem]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); if(playerid == VictimID) return Mensagem(playerid, RED, "Erro: Vocк Nгo Pode Mandar PM a Si Mesmo!"); if(playerid != VictimID) { GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), "PM Enviada Para %s: %s", gPlayerName, Mensagem); Mensagem(playerid, RED, gString); format(gString, sizeof(gString), "PM Recebida De %s: %s", gAdminName, Mensagem); Mensagem(VictimID, RED, gString); } return 1; } CMD:dararma(playerid, params[]) { new VictimID, Arma, Balas; if(Informacoes[playerid][PlayerAdmin] < 4) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "ddd", VictimID, Arma, Balas)) return Mensagem(playerid, RED, "Erro: /dararma [ID] [Arma] [Balas]"); if(Arma < 1 || Arma > 34) return Mensagem(playerid, RED, "Erro: Armas de 1 a 34"); if(Balas < 1 || Balas > 999) return Mensagem(playerid, RED, "Erro: Armas de 1 a 999"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s deu a Arma de ID %d com %d Muniзгo Para o Jogador %s", gAdminName, Arma, Balas, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } GivePlayerWeapon(VictimID, Arma, Balas); return 1; } CMD:trancarserver(playerid, params[]) { new Senha[30]; if(Informacoes[playerid][PlayerAdmin] < 6 && !IsPlayerAdmin(playerid)) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "s[30]", Senha)) return Mensagem(playerid, RED, "Erro: /trancarserver [Senha]"); format(gString, sizeof(gString), ">> Admin-CMD: %s Mudou a Senha do Servidor Para %s", gAdminName, Senha); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } format(gString, sizeof(gString), "password %s", Senha); SendRconCommand(gString); return 1; } CMD:destrancarserver(playerid, params[]) { if(Informacoes[playerid][PlayerAdmin] < 6 && !IsPlayerAdmin(playerid)) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); format(gString, sizeof(gString), ">> Admin-CMD: %s Destrancou o Servidor!", gAdminName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } format(gString, sizeof(gString), "password 0"); SendRconCommand(gString); return 1; } CMD:resetarveiculos(playerid) { if(Informacoes[playerid][PlayerAdmin] < 3) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Respawnou Todos os Veнculos Inutilizados", gAdminName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } for(new i = 0; i <= MAX_VEHICLES; i++) { if(!IsVehicleOccupied(i)) { SetVehicleToRespawn(i); } } return 1; } CMD:falaroculto(playerid, params[]) { new Texto[200]; if(Informacoes[playerid][PlayerAdmin] < 5) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "s[200]", Texto)) return Mensagem(playerid, RED, "Erro: /falaroculto [Texto]"); format(gString, sizeof(gString), "Admin Oculto: %s", Texto); MensagemParaTodos(RED, gString); return 1; } CMD:tempban(playerid, params[]) { new VictimID, Horas, Motivo[200]; if(Informacoes[playerid][PlayerAdmin] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente"); if(sscanf(params, "dds[128]", VictimID, Horas, Motivo)) return Mensagem(playerid, RED, "Erro: /tempban [ID] [Horas] [Motivo]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Baniu o Jogador %s Temporariamente Pelo Motivo: %s", gAdminName, gPlayerName, Motivo); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } Informacoes[playerid][PlayerBanido] = 1; SalvarDados(playerid); Kick(playerid); ExpirarBAN[playerid] = gettime() + Horas * 3600; if(gettime() >= ExpirarBAN[playerid]) Informacoes[playerid][PlayerBanido] = 0; return 1; } CMD:limparchat(playerid) { if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); for(new i; i != 100; i++) { MensagemParaTodos(i, ""); } return 1; } CMD:anunciar(playerid, params[]) { new Texto[200]; if(Informacoes[playerid][PlayerAdmin] < 2) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "s[200]", Texto)) return Mensagem(playerid, RED, "Erro: /anunciar [Texto]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), "~r~Admin %s: ~w~%s", gAdminName, Texto); GameTextForAll(gString, 5000, 5); return 1; } CMD:anunciarvip(playerid, params[]) { new Texto[200]; if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "s[200]", Texto)) return Mensagem(playerid, RED, "Erro: /anunciarvip [Texto]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), "~r~Vip %s: ~w~%s", gAdminName, Texto); GameTextForAll(gString, 5000, 5); return 1; } CMD:resetarconta(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 6) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /resetarconta [ID]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Resetou a Conta do Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } Informacoes[VictimID][PlayerAdmin] = 0; ResetPlayerMoney(VictimID); Informacoes[VictimID][PlayerKills] = 0; Informacoes[VictimID][PlayerDeaths] = 0; SetPlayerScore(VictimID, 0); return 1; } CMD:matar(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /matar [ID]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Matou o Jogador %s", gAdminName, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } SetPlayerHealth(VictimID, 0); return 1; } CMD:daradmin(playerid, params[]) { new VictimID, LevelAdmin; if(Informacoes[playerid][PlayerAdmin] < 6 && !IsPlayerAdmin(playerid)) return Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "dd", VictimID, LevelAdmin)) return Mensagem(playerid, RED, "Erro: /daradmin [ID] [Level]"); if(LevelAdmin < 0 || LevelAdmin > 6) return Mensagem(playerid, RED, "Erro: Nнveis de 0 a 6!"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Deu Administrador Level %d Para o Jogador %s", gAdminName, LevelAdmin, gPlayerName); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerAdmin] >= 1) { Mensagem(i, RED, gString); } } format(gString, sizeof(gString), ">> Admin-CMD: Vocк Foi Promovido pelo Administrador %s Para Nнvel %d de Admin", gAdminName, LevelAdmin); Mensagem(VictimID, RED, gString); Informacoes[VictimID][PlayerAdmin] = LevelAdmin; SalvarDados(playerid); return 1; } CMD:darvip(playerid, params[]) { new VictimID, Dias, LevelVIP; if(Informacoes[playerid][PlayerAdmin] < 6 && !IsPlayerAdmin(playerid)) return Mensagem(playerid, RED, "Erro: Voce Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "ddd", VictimID, LevelVIP, Dias)) return Mensagem(playerid, RED, "Erro: /darvip [ID] [Level] [Dias]"); if(LevelVIP < 0 || LevelVIP > 3) return Mensagem(playerid, RED, "Erro: Level de 1 a 3!"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Deu Level %d com %d Dias de VIP Para o Jogador %s", gAdminName, LevelVIP, Dias, gPlayerName); MensagemParaTodos(RED, gString); Informacoes[VictimID][PlayerVip] = LevelVIP; SalvarDados(playerid); ExpirarVIP[playerid] = gettime() + Dias * 86400; if(gettime() >= ExpirarVIP[playerid]) Informacoes[playerid][PlayerVip] = 0; return 1; } CMD:retirarvip(playerid, params[]) { new VictimID; if(Informacoes[playerid][PlayerAdmin] < 6 && !IsPlayerAdmin(playerid)) return Mensagem(playerid, RED, "Erro: Voce Nгo tem Nнvel Suficiente de Administrador"); if(sscanf(params, "d", VictimID)) return Mensagem(playerid, RED, "Erro: /retirarvip [ID]"); if(!IsPlayerConnected(VictimID)) return Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> Admin-CMD: %s Retirou o VIP Do Jogador %s", gAdminName, gPlayerName); MensagemParaTodos(RED, gString); Informacoes[VictimID][PlayerVip] = 0; SalvarDados(playerid); return 1; } CMD:chatvip(playerid, params[]) { new TextVip[150]; if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo й um Jogador VIP!"); if(sscanf(params, "s[150]", TextVip)) return Mensagem(playerid, RED, "Erro: /chatvip [Texto]"); GetPlayerName(playerid, gAdminName, sizeof(gAdminName)); format(gString, sizeof(gString), "[Chat VIP]: %s Level %d : %s", gAdminName, Informacoes[playerid][PlayerVip], TextVip); for(new i = 0; i < MAX_PLAYERS; i++) { if(Informacoes[i][PlayerVip] == 1) { Mensagem(i, BRONZE, gString); } if(Informacoes[i][PlayerVip] == 2) { Mensagem(i, CINZA, gString); } if(Informacoes[i][PlayerVip] == 3) { Mensagem(i, YELLOW, gString); } } return 1; } CMD:casavip(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo й VIP!"); Mensagem(playerid, RED, "Informaзгo: Bem Vindo a Casa VIP!"); SetPlayerPos(playerid, -723.8144,902.7185,12.1712); return 1; } CMD:abrirpt1(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); if(IsPlayerInRangeOfPoint(playerid, 10.0, -722.7346,909.6000,12.1305)) { MoveObject(ObjetoAMover,-710.09997559,910.40002441,11.19999981,90.0); Mensagem(playerid, RED, "Informaзгo: Portгo Aberto com Sucesso, Para Fechar use : /fecharpt1"); } return 1; } CMD:abrirpt2(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); if(IsPlayerInRangeOfPoint(playerid, 10.0, -659.5804,922.1988,12.1267)) { MoveObject(ObjetoAMover2,-660.90002441,920.00000000,11.19999981,90.0); Mensagem(playerid, RED, "Informaзгo: Portгo Aberto com Sucesso, Para Fechar use : /fecharpt2"); } return 1; } CMD:fecharpt1(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); if(IsPlayerInRangeOfPoint(playerid, 10.0, -722.7346,909.6000,12.1305)) { MoveObject(ObjetoAMover2,-718.59997559,910.40002441,11.19999981,20.0); Mensagem(playerid, RED, "Informaзгo: Portгo Fechado com Sucesso, Para Abrir use : /abrirpt1"); } return 1; } CMD:fecharpt2(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); if(IsPlayerInRangeOfPoint(playerid, 10.0, -659.5804,922.1988,12.1267)) { MoveObject(ObjetoAMover2,-660.40002441,926.50000000,11.19999981,20.0); Mensagem(playerid, RED, "Informaзгo: Portгo Fechado com Sucesso, Para Abrir use : /abrirpt2"); } return 1; } CMD:kitvip(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); GetPlayerName(playerid, gPlayerName, sizeof(gPlayerName)); format(gString, sizeof(gString), ">> VIP-CMD: %s Pegou seu Kit Vip!", gPlayerName); MensagemParaTodos(RED, gString); GivePlayerWeapon(playerid, 4, 1); GivePlayerWeapon(playerid, 24, 9999); GivePlayerWeapon(playerid, 26, 9999); GivePlayerWeapon(playerid, 30, 9999); GivePlayerWeapon(playerid, 34, 9999); GivePlayerMoney(playerid, -1); return 1; } CMD:v(playerid, params[]) { if(Informacoes[playerid][PlayerVip] < 2) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); if(sscanf(params, "ddd", IDVeiculo)) return SendClientMessage(playerid, RED, "Erro:: /v [ID Veiculo]"); if(IDVeiculo < 400 || IDVeiculo > 611) return SendClientMessage(playerid, RED, "Erro: ID Invбlido, ID's de 400 a 611"); if(VeiculoCriado[playerid] == 1) return SendClientMessage(playerid, RED, "Vocк jб Possui um Veнculo Criado, Use /deletarveiculo"); GetPlayerPos(playerid, pX, pY, pZ); IDCarro[playerid] = CreateVehicle(IDVeiculo, pX, pY, pZ+5, 0.0, 0, 0, 60000); PutPlayerInVehicle(playerid, IDCarro[playerid], 0); SetVehicleVirtualWorld(IDCarro[playerid], GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(IDCarro[playerid], GetPlayerInterior(playerid)); VeiculoCriado[playerid] = 1; SendClientMessage(playerid, RED, ">> VIP-CMD: Vocк Criou um Veiculo, Para Deleta-lo Utilize: /deletarv!"); return 1; } CMD:deletarv(playerid) { if(Informacoes[playerid][PlayerVip] < 2) return Mensagem(playerid, RED, "Erro: Vocк nгo й VIP!"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "Vocк Nгo Estб em um Veнculo!"); if(VeiculoCriado[playerid] == 0) return SendClientMessage(playerid, RED, "Vocк Nгo Criou um Veнculo!"); DestroyVehicle(IDCarro[playerid]); VeiculoCriado[playerid] = 0; SendClientMessage(playerid, RED, "Vocк Deletou Seu Veнculo Com Sucesso, Para Cria-lo Novamente, Use /v!"); return 1; } CMD:cmdsvip(playerid) { new CaixaComandos[400]; if(Informacoes[playerid][PlayerVip] == 1) { format(gString, sizeof(gString), "==========================================================\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "/chatvip, /casavip, /abrirpt1, /abrirpt2, /fecharpt1, /fecharpt2, /kitvip\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "/televip, /anunciarvip\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "==========================================================\n"); strcat(CaixaComandos, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Vip Level 1 - CMDs", CaixaComandos, "Ok", ""); } if(Informacoes[playerid][PlayerVip] == 2) { format(gString, sizeof(gString), "==========================================================\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "/chatvip, /casavip, /abrirpt1, /abrirpt2, /fecharpt1, /fecharpt2, /kitvip\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "/v, /deletarv, /televip, /anunciarvip\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "==========================================================\n"); strcat(CaixaComandos, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Vip Level 2 - CMDs", CaixaComandos, "Ok", ""); } if(Informacoes[playerid][PlayerVip] == 3) { format(gString, sizeof(gString), "==========================================================\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "/chatvip, /casavip, /abrirpt1, /abrirpt2, /fecharpt1, /fecharpt2, /kitvip, /a\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "/v, /deletarv, /televip, /anunciarvip\n"); strcat(CaixaComandos, gString); format(gString, sizeof(gString), "==========================================================\n"); strcat(CaixaComandos, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Vip Level 3 - CMDs", CaixaComandos, "Ok", ""); } return 1; } CMD:televip(playerid) { if(Informacoes[playerid][PlayerVip] < 1) return Mensagem(playerid, RED, "Erro: Vocк Nгo й VIP!"); ShowPlayerDialog(playerid, TeleVipCase, DIALOG_STYLE_LIST, "Teleportes VIP", "Warehouse 1\nWarehouse 2\nRC Battlefield\n8-Track\nDirt-Track\nKick Start", "Teleportar", "Cancelar"); return 1; } /*---------------------------------------------Fim dos Comandos-----------------------------------------------------*/ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == RegisterCase) { if(!response) { Mensagem(playerid, RED, "[FuneraL's Admin System]: Vocк Nгo quis Registrar-se e Por esse Motivo foi Kickado!"); Kick(playerid); } if(response) { if(!strlen(inputtext)) return Mensagem(playerid, RED, "[FuneraL's Admin System]: Vocк Digitou uma Senha Invбlida ou Nгo Digitou nada, Por Favor, Registre-se com uma Senha Vбlida"); if(strlen(inputtext) < 5) return Mensagem(playerid, RED, "[FuneraL's Admin System]: Senha Invбlida , Vбlido Apenas com mais de 5 Characteres"), ShowPlayerDialog(playerid, RegisterCase, DIALOG_STYLE_INPUT, "Registrando no Servidor", "[FuneraL's Admin System]: Bem Vindo ao Servidor\nDigite sua Senha Abaixo Para Registrar-se","Registrar","Cancelar"); if(strlen(inputtext) >= 5) { DOF2_CreateFile(PlayerArchive(playerid), inputtext); DOF2_SetInt(PlayerArchive(playerid), "Administrador", 0); DOF2_SetInt(PlayerArchive(playerid), "Grana", 10000); DOF2_SetInt(PlayerArchive(playerid), "Score", 0); DOF2_SetInt(PlayerArchive(playerid), "Kills", 0); DOF2_SetInt(PlayerArchive(playerid), "Deaths", 0); DOF2_SaveFile(); Mensagem(playerid, RED, "Registrado com Sucesso no Servidor, Seus dados Serгo Salvos!"); SpawnPlayer(playerid), GivePlayerMoney(playerid, 10000); } } } if(dialogid == LoginCase) { if(!response) { Mensagem(playerid, RED, "[FuneraL's Admin System]: Vocк Nгo Quis Logar e Por Esse Motivo foi Kickado!"); Kick(playerid); } if(response) { if(DOF2_CheckLogin(PlayerArchive(playerid), inputtext)) { Mensagem(playerid, RED, "Logado com Sucesso! Bom Jogo"); CarregarDados(playerid); } else { ShowPlayerDialog(playerid, LoginCase, DIALOG_STYLE_INPUT,"Logando no Servidor","[FuneraL's Admin System]: Digite a Senha Correta Para Logar no Servidor!","Logar","Cancelar"); } return 1; } } if(dialogid == TeleVipCase) { if(!response) return Mensagem(playerid, RED, "Vocк Cancelou a Dialog de Teleportes Vip.!"); if(response) { switch(listitem) { case 0: { SetPlayerPos(playerid,1412.639892,-1.787510,1000.924377); SetPlayerInterior(playerid, 1); Mensagem(playerid, RED, ">> VIP-CMD: Bem Vindo a Warehouse 1!"); } case 1: { SetPlayerPos(playerid,1302.519897,-1.787510,1001.028259); SetPlayerInterior(playerid, 18); Mensagem(playerid, RED, ">> VIP-CMD: Bem Vindo a Warehouse 2!"); } case 2: { SetPlayerPos(playerid,-975.975708,1060.983032,1345.671875); SetPlayerInterior(playerid, 10); Mensagem(playerid, RED, ">> VIP-CMD: Bem Vindo ao RC Battlefield!"); } case 3: { SetPlayerPos(playerid,-1398.065307,-217.028900,1051.115844); SetPlayerInterior(playerid, 7); Mensagem(playerid, RED, ">> VIP-CMD: Bem Vindo ao 8-Track!"); } case 4: { SetPlayerPos(playerid,-1444.645507,-664.526000,1053.572998); SetPlayerInterior(playerid, 4); Mensagem(playerid, RED, ">> VIP-CMD: Bem Vindo ao Dirt-Track"); } case 5: { SetPlayerPos(playerid,-1465.268676,1557.868286,1052.531250); SetPlayerInterior(playerid, 14); Mensagem(playerid, RED, ">> VIP-CMD: Bem Vindo ao Kick Start!"); } } } return 1; } if(dialogid == CommandsCase) { if(!response) return Mensagem(playerid, RED, "Vocк Cancelou a Dialog de Comandos!"); if(response) { switch(listitem) { case 0: { new CommandBox[700]; format(gString, sizeof(gString), "=================== Level 1 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/ajudaadmin, /dizer, /avisar, /matar, /observar, /tempban\n"); strcat(CommandBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos de Administrador", CommandBox, "Ok", "Cancelar"); } case 1: { new CommandBox[700]; format(gString, sizeof(gString), "=================== Level 1 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/ajudaadmin, /dizer, /avisar, /matar, /observar, /tempban\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 2 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/tapa, /tapao, /kick, /ir, /trazer, /congelar, /descongelar, /limparchat, /anunciar\n"); strcat(CommandBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos de Administrador", CommandBox, "Ok", "Cancelar"); } case 2: { new CommandBox[700]; format(gString, sizeof(gString), "=================== Level 1 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/ajudaadmin, /dizer, /avisar, /matar, /observar, /tempban\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 2 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/tapa, /tapao, /kick, /ir, /trazer, /congelar, /descongelar, /limparchat, /anunciar\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 3 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/explodir, /ban, /darvida, /darcolete, /resetarveiculos\n"); strcat(CommandBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos de Administrador", CommandBox, "Ok", "Cancelar"); } case 3: { new CommandBox[700]; format(gString, sizeof(gString), "=================== Level 1 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/ajudaadmin, /dizer, /avisar, /matar, /observar, /tempban\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 2 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/tapa, /tapao, /kick, /ir, /trazer, /congelar, /descongelar, /limparchat, /anunciar\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 3 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/explodir, /ban, /darvida, /darcolete, /resetarveiculos\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 4 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/dararma, /dardinheiro, /setardinheiro\n"); strcat(CommandBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos de Administrador", CommandBox, "Ok", "Cancelar"); } case 4: { new CommandBox[700]; format(gString, sizeof(gString), "=================== Level 1 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/ajudaadmin, /dizer, /avisar, /matar, /observar, /tempban\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 2 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/tapa, /tapao, /kick, /ir, /trazer, /congelar, /descongelar, /limparchat, /anunciar\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 3 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/explodir, /ban, /darvida, /darcolete, /resetarveiculos\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 4 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/dararma, /dardinheiro, /setardinheiro\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 5 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/retiraravisos, /setarinterior, /setarvw, /vidatodos, /coletetodos, /falaroculto\n"); strcat(CommandBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos de Administrador", CommandBox, "Ok", "Cancelar"); } case 5: { new CommandBox[700]; format(gString, sizeof(gString), "=================== Level 1 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/ajudaadmin, /dizer, /avisar, /matar, /observar, /tempban\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 2 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/tapa, /tapao, /kick, /ir, /trazer, /congelar, /descongelar, /limparchat, /anunciar\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 3 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/explodir, /ban, /darvida, /darcolete, /resetarveiculos\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 4 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/dararma, /dardinheiro, /setardinheiro\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 5 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/retiraravisos, /setarinterior, /setarvw, /vidatodos, /coletetodos, /falaroculto\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "=================== Level 6 ===================\n\n"); strcat(CommandBox, gString); format(gString, sizeof(gString), "/daradmin, /trancarserver, /destrancarserver, /resetarconta, /darvip, /retirarvip\n"); strcat(CommandBox, gString); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos de Administrador", CommandBox, "Ok", "Cancelar"); } } } } return 1; } stock PlayerArchive(playerid) { new StringArquivo[128], NomeArquivo[24]; GetPlayerName(playerid, NomeArquivo, sizeof(NomeArquivo)); format(StringArquivo, sizeof(StringArquivo), ContasSalvas, NomeArquivo); return StringArquivo; } stock CarregarDados(playerid) { Informacoes[playerid][PlayerAdmin] = DOF2_GetInt(PlayerArchive(playerid), "Administrador"); GivePlayerMoney(playerid, DOF2_GetInt(PlayerArchive(playerid), "Grana")); Informacoes[playerid][PlayerScore] = DOF2_GetInt(PlayerArchive(playerid), "Score"); Informacoes[playerid][PlayerKills] = DOF2_GetInt(PlayerArchive(playerid), "Kills"); Informacoes[playerid][PlayerDeaths] = DOF2_GetInt(PlayerArchive(playerid), "Morreu"); Informacoes[playerid][PlayerVip] = DOF2_GetInt(PlayerArchive(playerid), "Vip"); Informacoes[playerid][PlayerBanido] = DOF2_GetInt(PlayerArchive(playerid), "Banido"); } stock SalvarDados(playerid) { DOF2_SetInt(PlayerArchive(playerid), "Grana", GetPlayerMoney(playerid)); DOF2_SetInt(PlayerArchive(playerid), "Administrador", Informacoes[playerid][PlayerAdmin]); DOF2_SetInt(PlayerArchive(playerid), "Score", GetPlayerScore(playerid)); DOF2_SetInt(PlayerArchive(playerid), "Kills", Informacoes[playerid][PlayerKills]); DOF2_SetInt(PlayerArchive(playerid), "Morreu", Informacoes[playerid][PlayerDeaths]); DOF2_SetInt(PlayerArchive(playerid), "Vip", Informacoes[playerid][PlayerVip]); DOF2_SetInt(PlayerArchive(playerid), "Banido", Informacoes[playerid][PlayerBanido]); DOF2_SaveFile(); return 1; } stock IsVehicleOccupied(vehicleid) { for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER) { if(GetPlayerVehicleID(i) == vehicleid) { return 1; } } } for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) return 1; return 0; }