ACE Permissions
A guide to install Ace permissions! for FiveM
Overview
Section titled “Overview”ACE Permissions is a permission system that leverages FiveM’s native ACE (Access Control Entry) system to provide granular role-based access control for your server. This system allows you to create custom permission groups and assign specific permissions to players based on their Steam HEX IDs.
Key Features
Section titled “Key Features”- Role-based permissions with customizable groups
- Granular access control for commands and features
- Steam HEX ID integration for secure player identification
- Easy configuration with simple text-based setup
- Server-wide compatibility with all FiveM resources
Installation & Setup
Section titled “Installation & Setup”Step 1: Create Permissions File
Section titled “Step 1: Create Permissions File”-
Navigate to your server directory
- Go to the same folder where your
server.cfgfile is located
- Go to the same folder where your
-
Create a new file
- Create a new file named
perms.cfg - This file will contain all your permission definitions
- Create a new file named
Step 2: Configure Permission Groups
Section titled “Step 2: Configure Permission Groups”Add the following code to your perms.cfg file:
# Permission Groupsadd_ace Admin administrator allowadd_ace Supporter supporter allowadd_ace Tester tester allow
# Admin Usersadd_principal identifier.steam:110000114fa0982 Admin
# Supporter Usersadd_principal identifier.steam:110000114fa0982 Supporter
# Tester Usersadd_principal identifier.steam:110000114fa0982 Tester
# Specific Permissionsadd_ace Admin command.mute allowadd_ace Supporter command.kick allowadd_ace Tester command.teleport allowStep 3: Execute Permissions
Section titled “Step 3: Execute Permissions”Add the following line to your server.cfg file:
exec perms.cfgFinding Steam HEX IDs
Section titled “Finding Steam HEX IDs”Method 1: YouTube Tutorial
Section titled “Method 1: YouTube Tutorial”Watch our comprehensive guide on finding Steam HEX IDs:
Method 2: In-Game Command
Section titled “Method 2: In-Game Command”- Join your server as the player you want to get the HEX ID for
- Open F8 console in-game
- Type the command:
status - Look for the player in the list and copy their Steam HEX ID
Method 3: Server Console
Section titled “Method 3: Server Console”- Open your server console (txAdmin or similar)
- Type:
status - Find the player in the online players list
- Copy their Steam HEX ID (format:
steam:110000114fa0982)
Using ACE with Our Scripts
Section titled “Using ACE with Our Scripts”Our scripts do not ask for fixed permission names. Each script has a list of role names in its config. With ACE turned on, a player has permission when ACE allows them one of the names on that list.
Police Tape is the example here. Its permission settings are in config/config.lua:
Config.EveryoneHasPermission = falseConfig.Enable_Ace_Permissions = trueConfig.PermissionRoles = { 'police', 'ambulance', 'fire' }- Set
EveryoneHasPermissiontofalse. While it istrue, every player has permission and the list is not checked. - Set
Enable_Ace_Permissionstotrue. - Write the names you want in the role list. You choose the names.
- Allow each name for a group in
perms.cfg, and add your players to that group:
# These groups may use police tapeadd_ace Police police allowadd_ace Ambulance ambulance allowadd_ace Fire fire allow
# Players in the groupsadd_principal identifier.steam:110000114fa0982 Police- Restart your server.
The same list is used by every permission system the script supports. A name can be a Discord role, a framework job and an ACE permission at once, in whichever systems you turn on.
Where the Role List Is
Section titled “Where the Role List Is”The settings work the same in each script. Only the name of the list differs:
| Script | Role list |
|---|---|
| Police Tape | Config.PermissionRoles |
| Player & Ped CPR | Config.Permissions.CPRRolesOrGroups |
| K9 Dog Handler | K9HandlerPermissionRoles |
Each script’s own page names its list and the other permission systems it supports.
Admin Commands
Section titled “Admin Commands”A script can have commands for admins only, with a list of their own. In Police Tape, /cleartapes is for players who hold one of Config.Clear.AdminRoles. ACE can also allow such a command directly, without any list:
add_ace group.admin command.cleartapes allowImplementation in Scripts
Section titled “Implementation in Scripts”Server-Side Permission Check
Section titled “Server-Side Permission Check”Use this function in your server-side scripts to check player permissions:
function HasPermission(src) if IsPlayerAceAllowed(src, "administrator") or IsPlayerAceAllowed(src, "supporter") or IsPlayerAceAllowed(src, "tester") then return true else return false endend
-- Usage exampleRegisterCommand("admincommand", function(source, args, rawCommand) if HasPermission(source) then -- Execute admin command TriggerClientEvent('chat:addMessage', source, { color = {255, 0, 0}, multiline = true, args = {"Admin", "Command executed successfully!"} }) else -- Permission denied TriggerClientEvent('chat:addMessage', source, { color = {255, 0, 0}, multiline = true, args = {"System", "You don't have permission to use this command!"} }) endend, false)Advanced Permission System
Section titled “Advanced Permission System”For more granular control, you can create specific permission checks:
-- Check for specific permissionsfunction HasSpecificPermission(src, permission) return IsPlayerAceAllowed(src, permission)end
-- Usage examplesif HasSpecificPermission(source, "command.mute") then -- Player can mute othersend
if HasSpecificPermission(source, "command.kick") then -- Player can kick othersend
if HasSpecificPermission(source, "command.ban") then -- Player can ban othersendPermission Examples
Section titled “Permission Examples”Common Permission Groups
Section titled “Common Permission Groups”| Group | Description | Typical Permissions |
|---|---|---|
| Admin | Full server access | All commands, ban, kick, mute |
| Moderator | Moderate server access | Kick, mute, warn, teleport |
| Supporter | Limited admin access | Mute, warn, basic commands |
| Tester | Testing permissions | Teleport, basic admin tools |
Permission Structure Examples
Section titled “Permission Structure Examples”# Admin Group - Full Accessadd_ace Admin administrator allowadd_ace Admin command.* allowadd_ace Admin resource.* allow
# Moderator Group - Moderate Accessadd_ace Moderator command.kick allowadd_ace Moderator command.mute allowadd_ace Moderator command.warn allowadd_ace Moderator command.teleport allow
# Supporter Group - Limited Accessadd_ace Supporter command.mute allowadd_ace Supporter command.warn allow
# Tester Group - Testing Accessadd_ace Tester command.teleport allowadd_ace Tester command.noclip allowAdvanced Configuration
Section titled “Advanced Configuration”Custom Permission Groups
Section titled “Custom Permission Groups”Create your own permission groups for specific purposes:
# Custom Groupsadd_ace Police police allowadd_ace Fire fire allowadd_ace Medic medic allow
# Police Permissionsadd_ace Police command.arrest allowadd_ace Police command.ticket allowadd_ace Police command.impound allow
# Fire Permissionsadd_ace Fire command.extinguish allowadd_ace Fire command.firetruck allow
# Medic Permissionsadd_ace Medic command.heal allowadd_ace Medic command.revive allowInheritance System
Section titled “Inheritance System”Use inheritance to create permission hierarchies:
# Base permissionsadd_ace Staff staff allow
# Inherit from Staffadd_principal Admin Staffadd_principal Moderator Staffadd_principal Supporter Staff
# Add specific permissionsadd_ace Admin administrator allowadd_ace Moderator moderator allowadd_ace Supporter supporter allowTroubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Permissions Not Working
Section titled “Permissions Not Working”Steam HEX ID Issues
Section titled “Steam HEX ID Issues”Permission Denied Errors
Section titled “Permission Denied Errors”Best Practices
Section titled “Best Practices”Security Recommendations
Section titled “Security Recommendations”- Keep HEX IDs private - Don’t share them publicly
- Regular audits - Review permissions periodically
- Principle of least privilege - Give minimum required permissions
- Backup configurations - Keep copies of your permission files
Organization Tips
Section titled “Organization Tips”- Use descriptive group names - Make permissions easy to understand
- Comment your config - Add notes for complex setups
- Group related permissions - Keep similar permissions together
- Test thoroughly - Verify permissions work before going live
Support
Section titled “Support”Getting Help
Section titled “Getting Help”If you’re having trouble with ACE Permissions:
- Review this documentation thoroughly
- Check server console for error messages
- Verify your configuration matches the examples
- Join our Discord for community support
Community Support
Section titled “Community Support”Join our Discord community for:
- Technical support
- Configuration help
- Best practices sharing
- Community discussions