Fabio(GNR) Posted September 21, 2010 Share Posted September 21, 2010 I want to make a command that is only available for admins, what do i have to do? Thanks in advance! Link to comment
dzek (varez) Posted September 21, 2010 Share Posted September 21, 2010 This is very short snipped, of course you can use it, you can't do it in any other way anyway, but for admins you will have to add some extra code. Link to comment
Fabio(GNR) Posted September 21, 2010 Author Share Posted September 21, 2010 This is very short snipped, of course you can use it, you can't do it in any other way anyway, but for admins you will have to add some extra code. Ok thanks! So, whats the extra code ? EDIT: i just looked it up in an other topic it says i can dis-allow default users in acl to the command by using command.(commandname) Is that correct? Link to comment
50p Posted September 21, 2010 Share Posted September 21, 2010 This is very short snipped, of course you can use it, you can't do it in any other way anyway, but for admins you will have to add some extra code. What code are you talking about? ...EDIT: i just looked it up in an other topic it says i can dis-allow default users in acl to the command by using command.(commandname) Is that correct? Yes it's correct. I wonder why people don't use the 3rd parameter for addCommandHandler which is "restricted". There is no need for extra code, just change acl.xml a bit to block the command for everyone and let some groups use it. So simple and shortens the script. Link to comment
Fabio(GNR) Posted September 21, 2010 Author Share Posted September 21, 2010 This is very short snipped, of course you can use it, you can't do it in any other way anyway, but for admins you will have to add some extra code. What code are you talking about? ...EDIT: i just looked it up in an other topic it says i can dis-allow default users in acl to the command by using command.(commandname) Is that correct? Yes it's correct. I wonder why people don't use the 3rd parameter for addCommandHandler which is "restricted". There is no need for extra code, just change acl.xml a bit to block the command for everyone and let some groups use it. So simple and shortens the script. Thanks, varez and 50p Link to comment
dzek (varez) Posted September 21, 2010 Share Posted September 21, 2010 What code are you talking about? Fabio edited his post. Link he posted: viewtopic.php?f=91&t=28987&p=320104&hilit=teleport+vehicle#p320104 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