Fabio(GNR) Posted September 21, 2010 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! LuaCompiler United Social Gamers [ CnR / DD / DM & more ]
dzek (varez) Posted September 21, 2010 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. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Fabio(GNR) Posted September 21, 2010 Author 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? LuaCompiler United Social Gamers [ CnR / DD / DM & more ]
50p Posted September 21, 2010 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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Fabio(GNR) Posted September 21, 2010 Author 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 LuaCompiler United Social Gamers [ CnR / DD / DM & more ]
dzek (varez) Posted September 21, 2010 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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