ACE Permissions
How to use FiveM's ACE permissions system to grant players and groups access to script commands.
Principals
A principal is an identifier that holds permissions (referred to as ACEs). These identifiers can be player identifiers — such as a Discord ID or Steam ID — or made-up identifiers that act as groups. Groups are created simply by referencing them when adding a principal.
Adding Principals
add_principal identifier.discord:394446211341615104 group.admin
# The above line adds the player with discord identifier 394446211341615104
# to the group.admin group.
# Lines starting with # are comments and are ignored by the .cfg parser.
add_principal group.admin group.moderator
# The above line makes group.admin inherit all permissions from group.moderator.
# So group.admin will get every permission that group.moderator has.ACE Permissions
To give players or groups permission to use commands in scripts, you add ACE permission nodes either directly to a player identifier or to a group. Using groups is recommended since you can assign permissions to multiple players at once.
Adding and Removing ACEs
add_ace group.admin "tlib.admin" allow
# Grants group.admin the tlib.admin permission.
add_principal identifier.discord:394446211341615104 group.admin
# Adds the player to group.admin, so they inherit all of its permissions.
add_ace identifier.discord:394446211341615104 "tlib.admin" allow
# Grants the tlib.admin permission directly to the player (not via a group).
remove_ace group.admin "tlib.admin" allow
# Removes the allow status of the permission from group.admin.
remove_ace identifier.discord:394446211341615104 "tlib.admin" allow
# Removes the allow status of the permission from the specific player.Each script's documentation will list the specific ACE permission nodes it uses. Add those nodes to whatever group or identifier you want to grant access.
