Jump to content
  • 0

How to restrict use of resource to Admins only?


shifattk

Question

Posted

Hi,

I'm currently building my RPG server and I wanted to add "freecam" to my server, such that Admins can move around the map and monitor users easily. I am using the "freecam" resource and "freecam-command" resource from here:

Freecam: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3670

Freecam-Command : https://community.multitheftauto.com/index.php?p=resources&s=details&id=2695

I managed to successfully add and run the resource on my server. However, when I was running the server for a test run, I noticed that all users could use it, which I do not want.

I'm pretty sure I can do this through ACL, but how?

Thanks in advance.

Shifat

2 answers to this question

Recommended Posts

  • 0
  • MTA Team
Posted

Deny access to the command for the default ACL, and allow it for the Admin ACL.

Use webadmin for easy ACL editing.

  • 0
Posted

Or you can simply add this line in your script:

accountname = getAccountName (getPlayerAccount(source)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 

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