Jump to content

[RESOLVIDO] Anti-ban para staff's


Recommended Posts

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

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 :P

Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...