-misterX- Posted January 6, 2013 Posted January 6, 2013 i got this code it should create an acl group but it doesn't, i gave it the admin rights but when i try to use the function it remove itslef from the acl.. function addACLGroupObject ( thePlayer, commandName, groupName) local ourGroup = aclGetGroup ( groupName ) -- if there is no previous group with this name, we need to create one if not ourGroup then ourGroup = aclCreateGroup ( groupName ) end -- and finally let's add the object to it's group account = getPlayerAccount(source) accountN = getAccountName(account) aclGroupAddObject ( ourGroup, accountN ) -- don't forget to save the ACL after it has been modified aclSave () end addCommandHandler ( "creategang", addACLGroupObject )
Vision Posted January 6, 2013 Posted January 6, 2013 function addACLGroupObject ( thePlayer, commandName, groupName) local ourGroup = aclGetGroup ( groupName ) -- if there is no previous group with this name, we need to create one if not ourGroup then ourGroup = aclCreateGroup ( groupName ) end -- and finally let's add the object to it's group account = getPlayerAccount(thePlayer) accountN = getAccountName(account) aclGroupAddObject ( ourGroup, 'user.'..accountN ) -- don't forget to save the ACL after it has been modified aclSave () end addCommandHandler ( "creategang", addACLGroupObject )
-misterX- Posted January 6, 2013 Author Posted January 6, 2013 it works but it doesn't add the object any help??
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