RSG Framework
Getting Started

Setting Permissions

Configure admin and staff permissions on your RSG Core server.

RSG Core uses CFX ace permissions to control who can run privileged commands. This guide covers how to grant yourself and your staff the right permission levels.

Aces & principals

Aces are the built-in permission system provided by CFX. Think of a tree: an ace is a permission node, and each principal (a player or group) inherits the permissions attached to it.

txAdmin automatically sets the server owner as the highest permission level during setup.

Server config

At the bottom of your server.cfg you'll find a permissions section:

## Permissions ##
add_ace group.admin command allow # allow all commands
add_principal identifier.license:XXXXXXXXXXXXXXX rsgcore.god    # << your rockstar licence
add_principal identifier.license:XXXXXXXXXXXXXXX group.admin    # << your rockstar licence

# Resources
add_ace resource.rsg-core command allow # Allow rsg-core to execute commands

# Gods
add_ace rsgcore.god command allow # Allow all commands

# Inheritance
add_principal rsgcore.god group.admin  # Gods get the default admin group permissions
add_principal rsgcore.god rsgcore.admin # Gods get admin commands
add_principal rsgcore.admin rsgcore.mod # Admins get mod commands

Types of identifiers

  • FiveM ID
  • Rockstar license (what RSG Core uses)
  • Discord ID
  • Steam hex — requires a Steam Web API key set in your server.cfg

The Steam hex identifier is only available if you set steam_webApiKey in your server.cfg. See Licenses for how to obtain and configure your Steam Web API key.

To find a player's Rockstar license, look them up in your txAdmin web panel. If they are currently connected to the server, you will see all of their available identifiers.

rsgcore.god and group.admin share the same permissions — you can use either one.

Setting permissions in-game

Once you have permissions yourself, you can assign them to other players.

Restricting commands to a permission

In rsg-core/config.lua find:

RSGConfig.Server.Permissions = { 'god', 'admin', 'mod' }

You can add your own groups here. For example, to add a law group:

RSGConfig.Server.Permissions = { 'god', 'admin', 'mod', 'law' }

Then restrict a command to that group by passing it as the last argument to RSGCore.Commands.Add:

RSGCore.Commands.Add('cuff', 'Cuff Player', {}, false, function(source)
    -- Run code
end, 'law')

RSG automatically generates an ace called rsgcore.law with an ace of command.cuff. Add a principal for a player with:

add_principal identifier.license:xxxx rsgcore.law

Now the command is restricted to players with that permission, and the chat suggestion is hidden from everyone else. Because the command itself is restricted, you never need to manually check job permissions inside the command — CFX handles it for you.

Next steps

On this page