Lloyd Logan Posted December 24, 2012 Share Posted December 24, 2012 Hey Guys, I used the aclGroupAddObject server function, so obviously this is the script function giveAdminRights (playerSource, commandName, accountName) --add the function giveAdminRights and specify its arguments if accountName then --if there was an accountName entered then aclGroupAddObject (aclGetGroup("Admin"), "user."..accountName) --add an ACL object using the form "user.[accountName]" to the ACL group "Admin" outputChatBox ("Account '"..accountName.."' succesfully added to the admin group", playerSource) --output a notification to the player who entered the command that the acocunt was successfully added else --else output an error message and the correct syntax of the command to the player who entered it outputChatBox ("No account name specified.", playerSource) outputChatBox ("Correct syntax: /giveAccountAdminRights [accountName]", playerSource) end end addCommandHandler ("giveAccountAdminRights", giveAdminRights) But when i type, /giveAccountAdminRights lloydlogan it says invalid name specified or says nothing at all... Its has acl rights... and is giving no errors? Any solution Thanks Lloyd Logan Link to comment
Tete omar Posted December 24, 2012 Share Posted December 24, 2012 You'll need the permissions from the ACL Go to admin panel / go to resources tab , and click on Manage acl , double click on Admin group , and add this: resource.yourResourceName in the group , change 'yourResourceName' to your resource name , looks simple now. Link to comment
Lloyd Logan Posted December 24, 2012 Author Share Posted December 24, 2012 You'll need the permissions from the ACLGo to admin panel / go to resources tab , and click on Manage acl , double click on Admin group , and add this: resource.yourResourceName in the group , change 'yourResourceName' to your resource name , looks simple now. Thanks! is there anyway to do this through a script? Link to comment
Tete omar Posted December 24, 2012 Share Posted December 24, 2012 You can do this in the acl.xml file and by the admin panel as i explained. Link to comment
Lloyd Logan Posted December 24, 2012 Author Share Posted December 24, 2012 You can do this in the acl.xml file and by the admin panel as i explained. Sorry, it still stays, "no account name specified" Link to comment
Castillo Posted December 24, 2012 Share Posted December 24, 2012 Works perfect here, no error or anything. Account 'TEST' succesfully added to the admin group Link to comment
Tete omar Posted December 24, 2012 Share Posted December 24, 2012 Oh then your problem isn't on acl permissions Try to type this command in the console(f8) giveAccountAdminRights yourAccountName just replace yourAccountName with your account name Link to comment
Lloyd Logan Posted December 24, 2012 Author Share Posted December 24, 2012 Works perfect here, no error or anything.Account 'TEST' succesfully added to the admin group Hmm, I tried through console but nothing? Aww, nevermind Anyways, is the a way through script to make the player admin if the server is using mysql? 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