lLinux Posted November 16, 2013 Share Posted November 16, 2013 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
xXMADEXx Posted November 16, 2013 Share Posted November 16, 2013 You can try this function: https://wiki.multitheftauto.com/wiki/IsPlayerInACL Also, try posting in section espaonol: viewforum.php?f=122 Link to comment
lLinux Posted November 17, 2013 Author Share Posted November 17, 2013 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
Recommended Posts