Adde Posted November 21, 2013 Share Posted November 21, 2013 Hello, I am working on a staff/admin panel and I have searched and searched to find how I can see the players current acl groups but I can´t find it. So now I have to ask you guys. Will be thankfull If someone knows how to do that Link to comment
isa_Khamdan Posted November 21, 2013 Share Posted November 21, 2013 Hello, I am working on a staff/admin panel and I have searched and searched to find how I can see the players current acl groups but I can´t find it. So now I have to ask you guys. Will be thankfull If someone knows how to do that local account = getPlayerAccount(source) local accname = getAccountName(account) if isObjectInACLGroup("user."..accname,aclGetGroup("Group Name")) then Link to comment
Adde Posted November 21, 2013 Author Share Posted November 21, 2013 Hello, I am working on a staff/admin panel and I have searched and searched to find how I can see the players current acl groups but I can´t find it. So now I have to ask you guys. Will be thankfull If someone knows how to do that local account = getPlayerAccount(source) local accname = getAccountName(account) if isObjectInACLGroup("user."..accname,aclGetGroup("Group Name")) then Current acl groups. Not see if the player is in that acl group. I mean kinda create a table with all acl groups that the player is in. Like in the info line in admin panel where you can see example: "Groups: Admin, VIP, Everyone". Or am I supposed to use that and if the player is in that group then add groupname to the info line? Link to comment
TAPL Posted November 21, 2013 Share Posted November 21, 2013 You need these function: aclGroupList isObjectInACLGroup aclGroupGetName Link to comment
Sasu Posted November 22, 2013 Share Posted November 22, 2013 function aclGetAccountGroups ( account ) local acc = getAccountName ( account ) if ( not acc ) then return false end local res = {} acc = "user."..acc local all = "user.*" for ig, group in ipairs ( aclGroupList() ) do for io, object in ipairs ( aclGroupListObjects ( group ) ) do if ( ( acc == object ) or ( all == object ) ) then table.insert ( res, aclGroupGetName ( group ) ) break end end end return res end Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now