Jump to content

Panel solo para admins, acl


lLinux

Recommended Posts

Hola a todos, bueno mi problemas es que necesito que una GUI se habra solo para el grupo Admin del ACL:

function isPlayerAdmin(source) 
    local user = "user."..getAccountName ( getPlayerAccount ( source ) ) 
    for id, object in ipairs ( aclGroupListObjects ( aclGetGroup ( "Admin" ) ) ) do 
        if object == user then 
            triggerClientEvent("ClientGui",getRootElement(),source) 
        end 
    end 
end 

Pero no lo logro, alguien que me peuda ayudar o darme un ejemplo, o que me explique por favor.

Link to comment
You can try this function:

https://wiki.multitheftauto.com/wiki/IsPlayerInACL

Also, try posting in section espaonol: viewforum.php?f=122

Ok view the code, this code is of the server, is to open a GUI of client.

addCommandHandler ( "msg", 
    function ( thePlayer ) 
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Does he have access to Admin functions? 
    triggerClientEvent ( thePlayer, "showGUI", thePlayer ) 
     end 
end 
) 

Link to comment
  • Recently Browsing   0 members

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