Jump to content

[Help] no admin kick for high ping


Recommended Posts

setTimer( 
function() 
    for _, v in ipairs(getElementsByType("player")) do  
        if getPlayerPing(v) >= 300 then 
            kickPlayer(v, "Ping over 300") 
            outputChatBox(getPlayerName(v) " has been kicked by console for high ping.", root, 255, 0 ,0) 
        end 
    end 
end, 5000, 0) 

Link to comment
setTimer ( 
    function () 
        for _,v in ipairs (getElementsByType ("player")) do 
            if (getPlayerPing > 300) then 
                if (isGuestAccount (v) == false) then --you can as well delete this line, it may output some errors if you do that 
                    if (isObjectInACLGroup ("user."..v, aclGetGroup ("admin")) then --your group in ACL must be called 'admin' 
                        return 
                    else 
                        kickPlayer (v, "Ping over 300 and you are not in admin group") 
                    end 
                end 
            end 
        end 
    end, 5000, 0 
) 

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...