BeYourself Posted July 29, 2015 Share Posted July 29, 2015 (edited) Eae galera!! Gostaria de saber como posso fazer um script que, se, por exemplo, um admin tentar banir um moderador o BAN é cancelado. Tem como fazer isso? Se tiver, me ajude porfavor (com funções ou comandos, etc..) Edited July 31, 2015 by Guest Link to comment
#RooTs Posted July 29, 2015 Share Posted July 29, 2015 Eae galera!!Gostaria de saber como posso fazer um script que, se, por exemplo, um admin tentar banir um moderador o BAN é cancelado. Tem como fazer isso? Se tiver, me ajude porfavor (com funções ou comandos, etc..) só cancela o evento na ACL admin, (bloquear o botão) banir ACL: "Admin"> "general.ModifyOtherObjects" access="true"> "general.http" access="true"> "command.shutdown" access="true"> "command.install" access="true"> "command.aexec" access="true"> "command.debugscript" access="true"> "command.upgrade" access="true"> "command.crun" access="true"> "command.srun" access="true"> "command.run" access="true"> "function.addBan" access="true"> "function.setUnbanTime" access="true"> "function.setBanAdmin" access="true"> "function.setBanReason" access="true"> "function.setBanNick" access="true"> "function.removeBan" access="true"> "function.reloadBans" access="true"> "function.executeCommandHandler" access="true"> "function.setServerPassword" access="true"> "function.getServerPassword" access="true"> "function.createResource" access="true"> "function.copyResource" access="true"> "function.addResourceMap" access="true"> "function.addResourceConfig" access="true"> "function.removeResourceFile" access="true"> "function.setResourceDefaultSetting" access="true"> "function.removeResourceDefaultSetting" access="true"> "function.aclReload" access="true"> "function.aclSave" access="true"> "function.aclCreate" access="true"> "function.aclDestroy" access="true"> "function.aclSetRight" access="true"> "function.aclRemoveRight" access="true"> "function.aclCreateGroup" access="true"> "function.aclDestroyGroup" access="true"> "function.aclGroupAddACL" access="true"> "function.aclGroupRemoveACL" access="true"> "function.aclGroupAddObject" access="true"> "function.aclGroupRemoveObject" access="true"> "function.refreshResources" access="true"> "function.setServerConfigSetting" access="true"> "function.updateResourceACLRequest" access="true"> "command.aclrequest" access="true"> "general.adminpanel" access="true"> "general.tab_players" access="true"> "general.tab_resources" access="true"> "general.tab_server" access="true"> "general.tab_maps" access="true"> "general.tab_bans" access="true"> "general.tab_adminchat" access="true"> "command.kick" access="true"> "command.freeze" access="true"> "command.mute" access="true"> "command.setnick" access="true"> "command.shout" access="true"> "command.spectate" access="true"> "command.slap" access="true"> "command.setgroup" access="true"> "command.sethealth" access="true"> "command.setarmour" access="true"> "command.setmoney" access="true"> "command.setskin" access="true"> "command.setteam" access="true"> "command.giveweapon" access="true"> "command.setstat" access="true"> "command.jetpack" access="true"> "command.warp" access="true"> "command.setdimension" access="true"> "command.setinterior" access="true"> "command.createteam" access="true"> "command.destroyteam" access="true"> "command.givevehicle" access="true"> "command.repair" access="true"> "command.blowvehicle" access="true"> "command.destroyvehicle" access="true"> "command.customize" access="true"> "command.setcolor" access="true"> "command.setpaintjob" access="true"> "command.listmessages" access="true"> "command.readmessage" access="true"> "command.listresources" access="true"> "command.start" access="true"> "command.stop" access="true"> "command.stopall" access="false"> "command.delete" access="true"> "command.restart" access="true"> "command.execute" access="true"> "command.setpassword" access="true"> "command.setwelcome" access="true"> "command.setgame" access="true"> "command.setmap" access="true"> "command.setweather" access="true"> "command.blendweather" access="true"> "command.setblurlevel" access="true"> "command.setwaveheight" access="true"> "command.setskygradient" access="true"> "command.setgamespeed" access="true"> "command.setgravity" access="true"> "command.settime" access="true"> "command.setfpslimit" access="true"> "function.shutdown" access="true"> "command.ban" access="true"> "command.unban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> Mude essas linhas true/false "command.ban" access="true"> "command.unban" access="true"> "command.banip" access="true"> "command.unbanip" access="true"> "command.banserial" access="true"> "command.unbanserial" access="true"> "command.listbans" access="true"> Link to comment
#RooTs Posted July 29, 2015 Share Posted July 29, 2015 OBS. esse é o jeito mais facil de se fazer Link to comment
n3wage Posted July 29, 2015 Share Posted July 29, 2015 Você pode editar o resource admin (se usar ele) ou utilizar o evento onBan e fazer algumas checagens com as funções abaixo: getBanSerial function getAccountFromSerial ( serial ) if serial then for _, v in ipairs ( getAccounts() ) do if getAccountSerial ( v ) == serial then return v, getAccountName ( v ) end end end return false end IsObjectInACLGroup removeBan obs: isso (↑) não vai cancelar o ban, mas vai remove-lo, acho que é suficiente Link to comment
BeYourself Posted July 29, 2015 Author Share Posted July 29, 2015 O que eu queria é cancelar o evento e não remover o ban... Link to comment
n3wage Posted July 29, 2015 Share Posted July 29, 2015 O que eu queria é cancelar o evento e não remover o ban... edite o resource admin linha 827 a 849 (server/admin_server.lua) Link to comment
Tremidinha Posted July 29, 2015 Share Posted July 29, 2015 Aqui está uma outra solução SeriasQueNaoPodemSerBanidos = { ["SEUSERIAL"] = true, ["SEUSERIAL"] = true, ["SEUSERIAL"] = true } function announceBan( theBan ) if getElementType( source ) then --Check if a player banned the IP/Serial if SeriasQueNaoPodemSerBanidos[getBanSerial(theBan)] then outputChatBox("[ERRO] Esse serial não pode ser banido.!") removeBan(theBan) end end end addEventHandler( "onBan", root, announceBan ) Link to comment
BeYourself Posted July 29, 2015 Author Share Posted July 29, 2015 Valeu cara :D era realmente disso que eu precisava. 'removeBan' é necessário estar na ACL para funcionar? OBRIGADO! Link to comment
#RooTs Posted July 29, 2015 Share Posted July 29, 2015 @Tremidinha se o cara foi banido por IP como fica ? Link to comment
BeYourself Posted July 29, 2015 Author Share Posted July 29, 2015 @RooTs é só reiniciar o modem, e se for IP Fixo, camufla. Link to comment
#RooTs Posted July 30, 2015 Share Posted July 30, 2015 @RooTs é só reiniciar o modem, e se for IP Fixo, camufla. Acho que nem todos sabem fazer isso né amigo. só acho Link to comment
Tremidinha Posted July 30, 2015 Share Posted July 30, 2015 Acho que nem todos sabem fazer isso né amigo. só acho Realmente é difícil tirar o modem da tomada @_@ Valeu cara :D era realmente disso que eu precisava.'removeBan' é necessário estar na ACL para funcionar? OBRIGADO! Sei la, testa ai. Link to comment
MrBugsFive Posted July 30, 2015 Share Posted July 30, 2015 Ser voce for dono do server. e Faciul tira o ban di ip Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now