Jump to content

Problem with setting resource only for admins


Cynoq

Recommended Posts

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...