Cynoq Posted September 5, 2015 Share Posted September 5, 2015 As you can see from the title I'm having a problem with my server in which I can't let only admins use certain resources and defaults not able too. Things I have tried: Tried putting this only in Admin group in the ACL <object name="resource.superman"></object> Doesn't work Tried putting <right name="function.superman" access="true"></right> in Admin group and this in Default: <right name="function.superman" access="false"></right> I have also turn this "addEventHandler onResourceStart" to true in both Client and server.lua Can't find anything else on what I could do so I set up this post. Thanks in advance! Link to comment
.:HyPeX:. Posted September 6, 2015 Share Posted September 6, 2015 The resource should check for who uses that, other than denying the players the exact command via acl (Wich i'm not totally sure it would work) i dont see any other thing you could do other than modify the resource. Link to comment
Noki Posted September 6, 2015 Share Posted September 6, 2015 You will need to make the command handler tied to /superman ACL restricted. It's an extra argument in addCommandHandler. That, alongside with adding the function line in your ACL, should work. Link to comment
Cynoq Posted September 6, 2015 Author Share Posted September 6, 2015 You will need to make the command handler tied to /superman ACL restricted. It's an extra argument in addCommandHandler. That, alongside with adding the function line in your ACL, should work. Can you show me how to do that? (New to scripting) Link to comment
.:HyPeX:. Posted September 6, 2015 Share Posted September 6, 2015 You will need to make the command handler tied to /superman ACL restricted. It's an extra argument in addCommandHandler. That, alongside with adding the function line in your ACL, should work. Can you show me how to do that? (New to scripting) bool addCommandHandler ( string commandName, function handlerFunction, [bool restricted = false, bool caseSensitive = true] ) Check restricted argument. https://wiki.multitheftauto.com/wiki/AddCommandHandler Link to comment
Cynoq Posted September 6, 2015 Author Share Posted September 6, 2015 You will need to make the command handler tied to /superman ACL restricted. It's an extra argument in addCommandHandler. That, alongside with adding the function line in your ACL, should work. Can you show me how to do that? (New to scripting) bool addCommandHandler ( string commandName, function handlerFunction, [bool restricted = false, bool caseSensitive = true] ) Check restricted argument. https://wiki.multitheftauto.com/wiki/AddCommandHandler Did not work, I added the client code from that link too but no 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