Jump to content

disallow /ss (setskin)


5150

Recommended Posts

Posted

nothing. i type refresh and nothing happens. it just shows the word "refresh" typed out, like normal when you type something into console

Posted

it doesnt even load is what im saying. i put all the files into a zip, put the zip into deathmatch/resources, and typed the "refresh" command in console, but when i refresh, it does nothing

Posted

yes this works just fine. im not sure what happened, or what i did wrong. now can i just delete the test gate script and add the "ss" script? because thats the important one. or will it mess it up?

Posted

Glad to hear that! Yes you can replace the gate script with the /ss script. If you want to know what was wrong, compare it to yours to see the difference.

Posted

while i have you here, this is correct? it is suppost to dissallow the default command: /ss (setskin) but keep the skin GUI:

local AllowedGroups = { 
    "Admin", 
    "SuperModerator", 
    "Moderator" 
} 
  
addEventHandler("onPlayerCommand", root, 
function(cmd) 
    if cmd == "ss" then 
        local account = getPlayerAccount(source) 
        local hasPermission 
        if account and not isGuestAccount(account) then 
            local accName = getAccountName(account) 
            for _, groupName in ipairs(AllowedGroups) do 
                local group = aclGetGroup(groupName) 
                if group then 
                    if isObjectInACLGroup("user."..accName, group) then 
                        hasPermission = true 
                        break 
                    end 
                end 
            end 
        end 
        if not hasPermission then 
            cancelEvent() 
        end 
    end 
end) 

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