24.09.2012, 20:26
Ja tentei de tudo pra copilar mais sempre da erro , se tiver alguem pra mim ajuda agradeзo e tbm quero colocar todos esse comando lvl 7
Код:
/******************************************************************************* | | | FilterScript by Jeffrey_Hatrix | | | *******************************************************************************/ // Diretivas =================================================================== #include <a_samp> #include <ZCMD> #include <sscanf2> #include <SII> // Inicializadores ============================================================= enum systemAdmins { bool:IsAdmin, AdminLvl }; static admin_db[MAX_PLAYERS][systemAdmins]; new Float:x, Float:y, Float:z, Float:a; enum carIdCreated { bool:newCar, bool:oldCar, ModelOld, IdUpdate, color1, color2 }; static cars_db[MAX_PLAYERS][carIdCreated]; static bool:work_db[MAX_PLAYERS]; new bool:Aberto[MAX_PLAYERS], getId; new bool:CallOff[MAX_PLAYERS]; new strGlobal[0x80]; new bool:parBlock[MAX_PLAYERS]; new bool:tv_on[MAX_PLAYERS]; // Callbacks =================================================================== public OnFilterScriptInit() { print("\nAdminSt Jeffrey FilterScript loaded.\n"); print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Jeffrey_Hatrix EfficientPawnProgrammer.\n\n"); print(" Commands:"); print(" ---------------------------------------------"); print(" | |"); print(" | /GMX, /repararid, /respawn, /carro |"); print(" | /destruir, /carroantigo, /mudarcor |"); print(" | /ir, /trazer, /trazertodos, /matar |"); print(" | /skin, /darvida, /darcolete, /dararma |"); print(" | /retirararmas, /congelar, /descongelar |"); print(" | /ircarro, /trazercarro, /ls, /lsa |"); print(" | /sf, /sfa, /lv, /lva, /tapa, /daradmin |"); print(" | /dartemp, /admins, /ban, /banoff |"); print(" | /banip, /kick, /kickoff, /desban |"); print(" | /verip, /relatorio, /av, /jogar |"); print(" | /z, /tv, /a, /shutup, /par, /blockpar |"); print(" | |"); print(" ---------------------------------------------\n\n\n"); return 0x01; } public OnPlayerConnect(playerid) { new banidos[0x2D]; format(banidos, sizeof(banidos), "Banidos/%s.ini", Nick(playerid)); if(INI_Exist(banidos)) { new adm[0x1E], motivo[0x37]; TogglePlayerControllable(playerid, 0); INI_Open(banidos); INI_ReadString(adm, "Admin", 30); INI_ReadString(motivo, "Motivo", 60); new Ano, Mes, Dia, Hor, Min; Ano = INI_ReadInt("Ano"); Mes = INI_ReadInt("Mкs"); Dia = INI_ReadInt("Dia"); Hor = INI_ReadInt("Hora"); Min = INI_ReadInt("Minuto"); INI_Save(); INI_Close(); format(strGlobal, 0x80, "Vocк foi banido pelo admin: %s\n\nMotivo: %s\n\nData: [%d/%d/%d]\nHorario: [%d:%d]", adm, motivo, Dia, Mes, Ano, Hor, Min); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "{EA1515}BANIDO !", strGlobal, "Ok", ""); return 0x01; } new ips[0x3F]; GetPlayerIp(playerid, ips, sizeof(ips)); format(strGlobal, 0x2D, "Banidos/%s.ini", ips); if(INI_Exist(strGlobal)) return ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "{EA1515}BANIDO !", "Este IP foi banido do servidor!", "Ok", ""); admin_db[playerid][IsAdmin] = false; admin_db[playerid][AdminLvl] = 0x00; format(strGlobal, 0x2D, "Admins/%s.ini", Nick(playerid)); if(INI_Exist(strGlobal)) { INI_Open(strGlobal); admin_db[playerid][AdminLvl] = INI_ReadInt("AdminLevel"); admin_db[playerid][IsAdmin] = true; work_db[playerid] = true; GodAdmin(playerid, true); return 0x01; } return 0x00; } public OnPlayerText(playerid, text[]) { if(CallOff[playerid]) return SendClientMessage(playerid, -1, "Vocк ainda nгo pode falar..."), 0x00; else if(!CallOff[playerid]) return 0x01; return 0x00; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 0x02: { switch(response) { case 0x00..0x01: { Kick(playerid); return 0x01; } } } case 0x03: { switch(response) { case 0x01: { getId = playerid; Aberto[getId] = true; format(strGlobal, 0x80, "ID:[%d] Nick:[%s] Relatуrio: %s", playerid, Nick(playerid), inputtext); for(new iLoop; iLoop < MAX_PLAYERS; iLoop++) { if(admin_db[iLoop][IsAdmin]) { ShowPlayerDialog(iLoop, 4, DIALOG_STYLE_MSGBOX, "Relatуrio", strGlobal, "Responder", "Fechar"); } } return 0x01; } } } case 0x04: { switch(response) { case 0x00: { Aberto[getId] = false; return 0x01; } case 0x01: { ShowPlayerDialog(playerid, 5, DIALOG_STYLE_INPUT, "Resposta", "Digite a sua resposta ao relato anterior", "Enviar", ""); return 0x01; } } } case 0x05: { switch(response) { case 0x01: { format(strGlobal, 0x80, "Admin: %s respondeu: %s", Nick(playerid), inputtext); ShowPlayerDialog(getId, 6, DIALOG_STYLE_MSGBOX, "Resposta", strGlobal, "Ok", ""); Aberto[getId] = false; return 0x01; } } } case 0x07: { switch(response) { case 0x00..0x01: { Kick(playerid); return 0x01; } } } } return 0x00; } // Comandos ==================================================================== CMD:gmx(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SendClientMessageToAll(-1, "GMX, aguardem!"); SendRconCommand("gmx"); return 0x01; } CMD:repararid(playerid, params[]) { if(IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, -1, "Carro reparado!"); return 0x01; } else { new carId; if(sscanf(params, "i", carId)) return SendClientMessage(playerid, -1, "Comando: /repararid [id]"); RepairVehicle(carId); SendClientMessage(playerid, -1, "Carro reparado!"); } return 0x01; } CMD:respawn(playerid) { for(new iLoop; iLoop < MAX_VEHICLES; iLoop++) { SetVehicleToRespawn(iLoop); } SendClientMessage(playerid, -1, "Carros respawnados!"); return 0x01; } CMD:carro(playerid, params[]) { if(cars_db[playerid][oldCar]) return SendClientMessage(playerid, -1, "Vocк jб tem um veнculo criado, /destruir, para poder criar outro."); if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new carId, cor1, cor2; if(sscanf(params, "iii", carId, cor1, cor2)) return SendClientMessage(playerid, -1, "Comando: /carro [id][cor1][cor2]"); GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); cars_db[playerid][color1] = cor1; cars_db[playerid][color2] = cor2; cars_db[playerid][oldCar] = true; cars_db[playerid][ModelOld] = carId; cars_db[playerid][IdUpdate] = CreateVehicle(carId, x, y, z, a, cor1, cor2, 99999999); PutPlayerInVehicle(playerid, cars_db[playerid][IdUpdate], 0); SendClientMessage(playerid, -1, "Vocк criou um carro novo, /destruir para destrui-lo"); return 0x01; } CMD:destruir(playerid) { if(!cars_db[playerid][oldCar]) return SendClientMessage(playerid, -1, "Vocк nгo criou nenhum veнculo, /carro, para criar um..."); if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); DestroyVehicle(cars_db[playerid][IdUpdate]); cars_db[playerid][oldCar] = false; SendClientMessage(playerid, -1, "Vocк destruiu seu carro antigo, /carro para criar um novo carro."); return 0x01; } CMD:carroantigo(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); if(cars_db[playerid][oldCar]) return SendClientMessage(playerid, -1, "Vocк jб ressucitou seu carro antigo, ou jб tem um carro criado, /destruir antes de tudo."); GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); cars_db[playerid][IdUpdate] = CreateVehicle(cars_db[playerid][ModelOld], x, y, z, a, cars_db[playerid][color1], cars_db[playerid][color2], 9999999); cars_db[playerid][oldCar] = true; PutPlayerInVehicle(playerid, cars_db[playerid][IdUpdate], 0); SendClientMessage(playerid, -1, "Vocк ressucitou um carro antigo, /destruir para destrui-lo"); return 0x01; } CMD:mudarcor(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new carId, cor1, cor2; if(IsPlayerInAnyVehicle(playerid)) { if(sscanf(params, "ii", cor1, cor2)) return SendClientMessage(playerid, -1, "Comando: /mudarcor [cor1][cor2]"); ChangeVehicleColor(GetPlayerVehicleID(playerid), cor1, cor2); } else if(sscanf(params, "iii", carId, cor1, cor2)) return SendClientMessage(playerid, -1, "Comando: /mudarcor [id][cor1][cor2]"); cars_db[playerid][color1] = cor1; cars_db[playerid][color2] = cor2; ChangeVehicleColor(carId, cor1, cor2); SendClientMessage(playerid, -1, "Vocк mudou as cores de seu carro !"); return 0x01; } CMD:ir(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /ir [id]"); if(PlayerB == playerid) return SendClientMessage(playerid, -1, "Vocк nгo pode ir atй vocк mesmo."); GetPlayerPos(PlayerB, x, y, z); SetPlayerPos(playerid, x+1, y+1, z); format(strGlobal, 0x2D, "Vocк foi atй o player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x2D, "O admin %s veio atй vocк", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:trazer(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /trazer [id]"); if(PlayerB == playerid) return SendClientMessage(playerid, -1, "Vocк nгo pode trazer vocк atй vocк mesmo."); GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x+1, y+1, z); format(strGlobal, 0x2D, "Vocк trouxe o player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x2D, "O admin %s levou vocк atй ele", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:trazertodos(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); for(new iLoop; iLoop < MAX_PLAYERS; iLoop++) { if(!admin_db[iLoop][IsAdmin]) { GetPlayerPos(playerid, x, y, z); SetPlayerPos(iLoop, x+1, y+1, z); } } format(strGlobal, 0x2D, "O admin %s teleportou todos players atй ele!", Nick(playerid)); SendClientMessageToAll(-1, strGlobal); return 0x01; } CMD:matar(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /matar [id]"); if(PlayerB == playerid) return SendClientMessage(playerid, -1, "Vocк nгo pode matar a sн mesmo"); SetPlayerHealth(PlayerB, 0); format(strGlobal, 0x2D, "Vocк matou o player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x2D, "O admin %s matou vocк", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:skin(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB, skinId; if(sscanf(params, "ii", PlayerB, skinId)) return SendClientMessage(playerid, -1, "Comando: /skin [id][idskin]"); SetPlayerSkin(PlayerB, skinId); format(strGlobal, 0x32, "Vocк setou a skin do player: %s, para %d", Nick(PlayerB), skinId); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x32, "O admin %s setou sua skin para %d", Nick(playerid), skinId); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:darvida(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB, Float:vida; if(sscanf(params, "ii", PlayerB, vida)) return SendClientMessage(playerid, -1, "Comando: /darvida [id][valor]"); new Float:getVida; GetPlayerHealth(playerid, getVida); SetPlayerHealth(playerid, getVida+vida); format(strGlobal, 0x32, "Vocк setou a vida do player: %s, para %d", Nick(PlayerB), vida); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x32, "O admin %s setou sua vida para %d", Nick(playerid), vida); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:darcolete(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB, Float:colete; if(sscanf(params, "ii", PlayerB, colete)) return SendClientMessage(playerid, -1, "Comando: /darcolete [id][valor]"); new Float:getColete; GetPlayerArmour(playerid, getColete); SetPlayerArmour(playerid, getColete+colete); format(strGlobal, 0x32, "Vocк setou o colete do player: %s, para %d", Nick(PlayerB), colete); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x32, "O admin %s setou seu colete para %d", Nick(playerid), colete); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:dararma(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB, arma, mun; if(sscanf(params, "iii", PlayerB, arma, mun)) return SendClientMessage(playerid, -1, "Comando: /dararma [id][arma][muniзгo]"); GivePlayerWeapon(PlayerB, arma, mun); format(strGlobal, 0x3C, "Vocк deu %d muniзхes de %d para o player: %s", mun, arma, Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x3C, "O admin %s deu %d muniзхes de %d para vocк", Nick(playerid), mun, arma); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:retirararmas(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /retirararmas [id]"); ResetPlayerWeapons(PlayerB); format(strGlobal, 0x32, "Vocк resetou as armas do player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x32, "O admin %s retirou suas armas!", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:congelar(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /congelar [id]"); TogglePlayerControllable(PlayerB, 0); format(strGlobal, 0x32, "Vocк congelou o player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x32, "O admin %s congelou vocк!", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:descongelar(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /descongelar [id]"); TogglePlayerControllable(PlayerB, 1); format(strGlobal, 0x32, "Vocк descongelou o player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x32, "O admin %s descongelou vocк!", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:ircarro(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new carId; if(sscanf(params, "i", carId)) return SendClientMessage(playerid, -1, "Comando: /ircarro [id]"); PutPlayerInVehicle(playerid, carId, 0); format(strGlobal, 0x2D, "Vocк foi atй o carro %d", carId); SendClientMessage(playerid, -1, strGlobal); return 0x01; } CMD:trazercarro(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new carId; if(sscanf(params, "i", carId)) return SendClientMessage(playerid, -1, "Comando: /trazercarro [id]"); GetPlayerPos(playerid, x, y, z); SetVehiclePos(carId, x+2, y+2, z); PutPlayerInVehicle(playerid, carId, 0); format(strGlobal, 0x2D, "Vocк trouxe o carro %d atй vocк", carId); SendClientMessage(playerid, -1, strGlobal); return 0x01; } CMD:ls(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SetPlayerPos(playerid, 1243.2365, -1692.5746, 16.1976); SetPlayerFacingAngle(playerid, 180.7490); SendClientMessage(playerid, -1, "Bem vindo а Los Santos!"); return 0x01; } CMD:lsa(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SetPlayerPos(playerid,1893.3164,-2329.0193,13.5469); SetPlayerFacingAngle(playerid, 35.0668); SendClientMessage(playerid, -1, "Bem vindo ao Aeroporto de Los Santos!"); return 0x01; } CMD:lv(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SetPlayerPos(playerid, 1674.4037,1447.6370, 10.7904); SetPlayerFacingAngle(playerid, 72.5065); SendClientMessage(playerid, -1, "Bem vindo а Las Venturas!"); return 0x01; } CMD:lva(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SetPlayerPos(playerid, 1512.3953,1703.5693,10.8203); SetPlayerFacingAngle(playerid, 22.3513); SendClientMessage(playerid, -1, "Bem vindo ao Aeroporto de Las Venturas!"); return 0x01; } CMD:sfa(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SetPlayerPos(playerid, -1450.6621,-273.2752,14.1484); SetPlayerFacingAngle(playerid, 243.1030); SendClientMessage(playerid, -1, "Bem vindo ao Aeroporto de San Fierro!"); return 0x01; } CMD:sf(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); SetPlayerPos(playerid, -1989.2897,1040.2900,55.7266); SetPlayerFacingAngle(playerid, 176.1217); SendClientMessage(playerid, -1, "Bem vindo а San Fierro!"); return 0x01; } CMD:tapa(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /tapa [id]"); GetPlayerPos(PlayerB, x, y, z); SetPlayerPos(PlayerB, x, y, z+0x14); format(strGlobal, 0x37, "Vocк deu um tapa no player: %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x37, "O admin %s deu um tapa em vocк!", Nick(playerid)); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:daradmin(playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador Rcon."); new PlayerB, lvl; if(sscanf(params, "ii", PlayerB, lvl)) return SendClientMessage(playerid, -1, "Comando: /daradmin [id][nнvel]"); if(lvl == 0x01) return SendClientMessage(playerid, -1, "Para dar admin temporбrio use /dartemp"); if(lvl == 0x00) { format(strGlobal, 0x28, "Admins/%s.ini", Nick(playerid)); INI_Remove(strGlobal); admin_db[playerid][IsAdmin] = false; admin_db[playerid][AdminLvl] = 0x00; return 0x01; } admin_db[playerid][IsAdmin] = true; admin_db[playerid][AdminLvl] = lvl; GodAdmin(PlayerB, true); SalvarAdmins(PlayerB); format(strGlobal, 0x3C, "Vocк deu nнvel %d de admin para: %s", lvl, Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x3C, "O admin %s deu nнvel %d de admin para vocк!", Nick(playerid), lvl); SendClientMessage(PlayerB, -1, strGlobal); return 0x01; } CMD:admins(playerid) { for(new iLoop; iLoop < MAX_PLAYERS; iLoop++) { if(IsPlayerConnected(iLoop)) { if(admin_db[iLoop][IsAdmin]) { format(strGlobal, 0x37, "| Admin %s, nнvel: %d |\n", Nick(iLoop), admin_db[iLoop][AdminLvl]); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Admins online", strGlobal, "Ok", ""); return 0x01; } } else { SendClientMessage(playerid, -1, "Nenhum admin online !"); break; } } return 0x01; } CMD:ban(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB, motivo[0x80]; if(sscanf(params, "is[128]", PlayerB, motivo)) return SendClientMessage(playerid, -1, "Comando: /ban [id][motivo]"); if(PlayerB != playerid) { if(PlayerB != INVALID_PLAYER_ID) { new sec, ye, min1, day, mon, hour; getdate(ye, mon, day); gettime(hour, min1, sec); format(strGlobal, 0x2D, "Banidos/%s.ini", Nick(PlayerB)); INI_Open(strGlobal); INI_WriteString("Motivo", motivo); INI_WriteInt("Dia", day); INI_WriteInt("Mкs", mon); INI_WriteInt("Ano", ye); INI_WriteInt("Hora", hour); INI_WriteInt("Minuto", min1); INI_WriteInt("Segundo", sec); INI_WriteString("Admin", Nick(playerid)); INI_Save(); INI_Close(); format(strGlobal, 0x80, "Vocк foi banido pelo admin %s, motivo: %s", Nick(playerid), motivo); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x80, "%s foi banido por %s, motivo: %s", Nick(PlayerB), Nick(playerid), motivo); SendClientMessageToAll(-1, strGlobal); } Kick(PlayerB); return 0x01; } return 0x01; } CMD:kick(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB, motivo[0x80]; if(sscanf(params, "is[128]", PlayerB, motivo)) return SendClientMessage(playerid, -1, "Comando: /kick [id][motivo]"); if(PlayerB != playerid) { if(PlayerB != INVALID_PLAYER_ID) { format(strGlobal, 0x80, "Vocк levou Kick do admin %s, motivo: %s", Nick(playerid), motivo); SendClientMessage(playerid, -1, strGlobal); format(strGlobal, 0x80, "%s foi kikado por %s, motivo: %s", Nick(PlayerB), Nick(playerid), motivo); SendClientMessageToAll(-1, strGlobal); } Kick(PlayerB); return 0x01; } return 0x01; } CMD:kickoff(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /kickoff [id]"); if(PlayerB != playerid) { if(PlayerB != INVALID_PLAYER_ID) { SendClientMessage(playerid, -1, "Vocк foi kikado !"); } Kick(PlayerB); return 0x01; } return 0x01; } CMD:banoff(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) SendClientMessage(playerid, -1, "Comando: /banoff [id]"); if(PlayerB != playerid) { if(PlayerB != INVALID_PLAYER_ID) { new sec, ye, min1, day, mon, hour; getdate(ye, mon, day); gettime(hour, min1, sec); format(strGlobal, 0x2D, "Banidos/%s.ini", Nick(PlayerB)); INI_Open(strGlobal); INI_WriteString("Motivo", "Banido silкnciosamente"); INI_WriteInt("Dia", day); INI_WriteInt("Mкs", mon); INI_WriteInt("Ano", ye); INI_WriteInt("Hora", hour); INI_WriteInt("Minuto", min1); INI_WriteInt("Segundo", sec); INI_WriteString("Admin", Nick(playerid)); INI_Save(); INI_Close(); SendClientMessage(playerid, -1, "Vocк foi banido !"); } Kick(PlayerB); return 0x01; } return 0x01; } CMD:banip(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /banip [id]"); if(PlayerB != playerid) { if(PlayerB != INVALID_PLAYER_ID) { new ips[0x3C]; GetPlayerIp(playerid, ips, sizeof( ips )); format(strGlobal, 0x2D, "Banidos/%s.ini", ips); INI_Open(strGlobal); INI_WriteString("Banido pelo IP", ips); INI_Save(); INI_Close(); format(strGlobal, 0x41, "Player %s foi banido pelo IP por %s", Nick(PlayerB), Nick(playerid)); SendClientMessageToAll(-1, strGlobal); SendClientMessage(playerid, -1, "Seu ip foi banido !"); } Kick(PlayerB); return 0x01; } return 0x01; } CMD:desban(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new nickBan[MAX_PLAYER_NAME]; if(sscanf(params, "s[24]", nickBan)) return SendClientMessage(playerid, -1, "Comando: /desban [nome]"); format(strGlobal, 0x2D, "Banidos/%s.ini", nickBan); if(INI_Exist(strGlobal)) return INI_Remove(strGlobal); format(strGlobal, 0x2D, "Vocк desbaniu a conta %s", nickBan); SendClientMessage(playerid, -1, strGlobal); return 0x01; } CMD:verip(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /verip [id]"); new ips[0x3C]; GetPlayerIp(PlayerB, ips, sizeof( ips )); format(strGlobal, 0x2D, "ID:[%d] Nick:[%s] IP:[%s]", PlayerB, Nick(PlayerB), ips); SendClientMessage(playerid, -1, strGlobal); return 0x01; } CMD:relatorio(playerid) { ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Relatorio", "Digite seu relatуrio destinado aos admins abaixo.", "Enviar", ""); return 0x01; } CMD:av(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new aviso[0x3C]; if(sscanf(params, "s[60]", aviso)) return SendClientMessage(playerid, -1, "Comando: /av [aviso]"); format(strGlobal, 0x80, "Aviso do admin %s: %s", Nick(playerid), aviso); SendClientMessageToAll(0x451FE0AA, strGlobal); return 0x01; } CMD:jogar(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); if(work_db[playerid]) { GodAdmin(playerid, false); SendClientMessage(playerid, -1, "Vocк entrou no modo jogo, /jogar para entrar no modo trabalho novamente."); work_db[playerid] = false; return 0x01; } else if(!work_db[playerid]) { GodAdmin(playerid, true); SendClientMessage(playerid, -1, "Vocк entrou no modo trabalho, /jogar para entrar no modo jogo novamente."); work_db[playerid] = true; } return 0x01; } CMD:z(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new zPos; if(sscanf(params, "i", zPos)) return SendClientMessage(playerid, -1, "Comando: /z [float:pos]"); GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + zPos); return 0x01; } CMD:tv(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /tv [id]"); if(!tv_on[playerid]) { TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, PlayerB, SPECTATE_MODE_NORMAL); format(strGlobal, 0x2D, "Vocк entrou modo TV no player [%d]%s", PlayerB, Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); return 0x01; } return 0x01; } CMD:tvoff(playerid) { if(tv_on[playerid]) { TogglePlayerSpectating(playerid, 0); SendClientMessage(playerid, -1, "Vocк saiu do modo TV"); } return 0x01; } CMD:a(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new aChat[0x3C]; if(sscanf(params, "s[60]", aChat)) return SendClientMessage(playerid, -1, "Comando: /a [chat]"); format(strGlobal, 0x80, "aChat - Admin %s diz: %s", Nick(playerid), aChat); for(new iLoop; iLoop < MAX_PLAYERS; iLoop++) { if(admin_db[iLoop][IsAdmin]) { SendClientMessage(iLoop, 0xFF00FFAA, strGlobal); } } return 0x01; } CMD:shutup(playerid, params[]) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); new PlayerB; if(sscanf(params, "i", PlayerB)) return SendClientMessage(playerid, -1, "Comando: /shutup [id]"); if(!CallOff[PlayerB]) { CallOff[PlayerB] = true; format(strGlobal, 0x2D, "Vocк calou %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); format(strGlobal,0x2D, "Vocк foi calado pelo admin %s", Nick(playerid)); return 1; } else { format(strGlobal, 0x2D, "Vocк descalou %s", Nick(PlayerB)); SendClientMessage(playerid, -1, strGlobal); SendClientMessage(PlayerB, -1, "Vocк jб pode falar, foi descalado."); CallOff[PlayerB] = false; } return 0x01; } CMD:par(playerid, params[]) { new PlayerB, PM[0x80]; if(sscanf(params, "is[128]", PlayerB, PM)) return SendClientMessage(playerid, -1, "Comando: /par [id][texto]"); if(admin_db[playerid][IsAdmin] || admin_db[PlayerB][IsAdmin]) { if(!parBlock[PlayerB]) { format(strGlobal, 0x80, "[Particular] - %s diz: %s", Nick(playerid), PM); SendClientMessage(PlayerB, 0xFFF900AA, strGlobal); SendClientMessage(playerid, 0xFFF900AA, "Particular enviada!"); return 0x01; } else SendClientMessage(playerid, -1, "Este admin bloqueou as mensagens particulares"); } else if(!admin_db[PlayerB][IsAdmin] && !admin_db[playerid][IsAdmin]) { SendClientMessage(playerid, -1, "Vocк sу pode mandar particulares para admins"); return 0x01; } return 0x01; } CMD:blockpar(playerid) { if(!admin_db[playerid][IsAdmin]) return SendClientMessage(playerid, -1, "Vocк nгo й um administrador."); if(!parBlock[playerid]) { parBlock[playerid] = true; return 0x01; } else { parBlock[playerid] = false; } return 0x01; } CMD:aa(playerid) { new strLocal[0xFF+0x80]; strcat(strLocal,"/gmx /repararid /respawn /carro /destruir /carroantigo /mudarcor\n"); strcat(strLocal,"/ir /trazer /trazertodos /matar /skin /darvida /darcolete /dararma /retirararmas\n"); strcat(strLocal,"/congelar /descongelar /ircarro /trazercarro /ls /lsa /sf /sfa /lv /lva\n"); strcat(strLocal,"/tapa /daradmin /admins /ban /banoff /banip /kick /kickoff /desban /verip\n"); strcat(strLocal,"/relatorio /av /jogar /z /tv /tvoff /a /shutup /par /blockpar\n"); ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Comandos administrativos", strLocal, "Fechar", ""); return 0x01; } // Stocks ====================================================================== stock GodAdmin(playerid, bool:index) { if(index) { SetPlayerHealth(playerid, 999999999); return 0x01; } if(!index) { SetPlayerHealth(playerid, 100); return 0x01; } return 0x01; } stock Nick(playerid) { new nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, nome, sizeof( nome )); return nome; } stock SalvarAdmins(playerid) { format(strGlobal, 0x28, "Admins/%s.ini", Nick(playerid)); INI_Open(strGlobal); INI_WriteInt("AdminLevel", admin_db[playerid][AdminLvl]); INI_Save(); INI_Close(); return 0x01; }