Jump to content

change rights


5150

Recommended Posts

excuse the multiple topics in one day, but how can i convert this from "allow only players that can ban" to allow anyone in the PMG acl group?

basically i want to change this into allowACLaccess

addCommandHandler ( Command, -- Adding The Command Handler 
    function ( player, cmd ) 
        if hasObjectPermissionTo ( player, "function.banPlayer" ) then 
            triggerClientEvent(player,"jailShow",player) 
        else 
        outputChatBox(" Access Denied ",player,255,0,0) 
    end 
end 
) 

Link to comment

If i understood you right

  
addCommandHandler ( Command, -- Adding The Command Handler 
function ( player, cmd ) 
      local accName = getAccountName(getPlayerAccount(player)) 
      if isObjectInACLGroup ("user."..accName, aclGetGroup ("PMG")) then 
           triggerClientEvent(player,"jailShow",player) 
      else 
          outputChatBox(" Access Denied ",player,255,0,0) 
      end 
end 
)     
  

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