Jump to content

Problem with setting resource only for admins


Cynoq

Recommended Posts

Posted

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!

Posted

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.

Posted

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.

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

Posted
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

Posted
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

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