RegisterCommand

If this doesn’t belong here, move it.

Anyways, I don’t know if it’s just me or what, (I am a spastic) I have been using RegisterCommand a lot recently, I am also using ace permission alongside with it. Is there any way to set moderators to use commands via RegisterCommand if I set it to true…?

Thanks xox

PS: Category Revived

Vespura would be the one I would talk to about ace permissions. :slight_smile:

If you want to know more about aces, here’s a basic overview of some of the things you can do with them: Basic Aces & Principals overview/guide it’s definitely not everything!

RegisterCommand("commandName", function(source, args, rawCommand)
    -- normal function handling here
end, true) -- set this to false to allow anyone.

The above snippet would require the command.commandName ace.

So yes, you can use RegisterCommand to restrict commands to use ace permissions.

PS. Also moved this topic to the correct category, because it’d be pointless to hide this useful information!

8 Likes

Yes thank you very much, just one last point, I assume admins (add_ace) bypass this and can use the command anyway?

Not sure what you mean. But if you give admins access to all commands (just give the command ace) then they’ll be able to do your custom command as well.

2 Likes

How to make a ping command where players have to accept it and it sets a waypoint to them. Seems pretty simple yet I cant figure it out :frowning:

1 Like

please may i get some help with this
here is my code:

RegisterCommand(“dog”, function(source, args, raw)
if (_menuPool:IsAnyMenuOpen()) then
_menuPool:CloseAllMenus()
else
mainMenu:Visible(true)

    while _menuPool:IsAnyMenuOpen() do
        _menuPool:
    end
end

end, true)

RegisterKeyMapping(“dog”, “Dog Menu”, “KEYBOARD”, “F1”)

heres what i add to server.cfg:

add_ace group.DSU command.dog allow

my /dog command is restricted but i arnt getting the permission to use it what am i doing wrong my permissions work through vmenu so i know its not them this also dosent affect the key bind which calls for the command any help to get this locked off would be fantastic and greatly appreciated