Command permissions

Hello, So this is my first FiveM server, and I’m wondering how to make certain ranks have permissions, Like all players have perms to /aop now, and I only want admins to have it, How can I remove it from them and only give it to admins? Do I need a script or anything?

1 Like

What resource is the command from?

If it’s a RegisterCommand() change the last parameter to true which means restricted and now people need ace permission command.aop

RegisterCommand (“aop”, function()
… code here
end, true)

This is my server.lua: https://hastebin.com/iyozajokon.rb

You should update to RegisterCommand

I didn’t make the script and I don’t know how to change that, So I am not gonna try. is there another way?

Here’s a genetic tutorial on how to whitelist ‘stuff’, however, the method TheIndra is describing is better for your particular situation.

If serversided you can just call IsPlayerAceAllowed()