ACE Permissions for FiveM
A guide to install Ace permissions! for FiveM
๐ Table of Contents
- ๐ฏ Overview
- ๐ ๏ธ Installation & Setup
- ๐ Finding Steam HEX IDs
- ๐ป Implementation in Scripts
- ๐ Permission Examples
- ๐ง Advanced Configuration
- โ ๏ธ Troubleshooting
- ๐ Best Practices
- ๐ฌ Support
๐ฏ 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
- โ 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
Step 1: Create Permissions File
- Navigate to your server directory
- Go to the same folder where your
server.cfg
file 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
Add the following code to your perms.cfg
file:
# Permission Groups
add_ace Admin administrator allow
add_ace Supporter supporter allow
add_ace Tester tester allow
# Admin Users
add_principal identifier.steam:110000114fa0982 Admin
# Supporter Users
add_principal identifier.steam:110000114fa0982 Supporter
# Tester Users
add_principal identifier.steam:110000114fa0982 Tester
# Specific Permissions
add_ace Admin command.mute allow
add_ace Supporter command.kick allow
add_ace Tester command.teleport allow
Steam HEX IDs: Replace the example Steam HEX IDs with actual player Steam HEX IDs. See the section below for how to find Steam HEX IDs.
Step 3: Execute Permissions
Add the following line to your server.cfg
file:
exec perms.cfg
Server Restart: After adding the exec line, restart your server for the permissions to take effect.
๐ Finding Steam HEX IDs
Method 1: YouTube Tutorial
Watch our comprehensive guide on finding Steam HEX IDs:
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
- 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
)
๐ป Implementation in Scripts
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
end
end
-- Usage example
RegisterCommand("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!"}
})
end
end, false)
Advanced Permission System
For more granular control, you can create specific permission checks:
-- Check for specific permissions
function HasSpecificPermission(src, permission)
return IsPlayerAceAllowed(src, permission)
end
-- Usage examples
if HasSpecificPermission(source, "command.mute") then
-- Player can mute others
end
if HasSpecificPermission(source, "command.kick") then
-- Player can kick others
end
if HasSpecificPermission(source, "command.ban") then
-- Player can ban others
end
๐ Permission Examples
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
# Admin Group - Full Access
add_ace Admin administrator allow
add_ace Admin command.* allow
add_ace Admin resource.* allow
# Moderator Group - Moderate Access
add_ace Moderator command.kick allow
add_ace Moderator command.mute allow
add_ace Moderator command.warn allow
add_ace Moderator command.teleport allow
# Supporter Group - Limited Access
add_ace Supporter command.mute allow
add_ace Supporter command.warn allow
# Tester Group - Testing Access
add_ace Tester command.teleport allow
add_ace Tester command.noclip allow
๐ง Advanced Configuration
Custom Permission Groups
Create your own permission groups for specific purposes:
# Custom Groups
add_ace Police police allow
add_ace Fire fire allow
add_ace Medic medic allow
# Police Permissions
add_ace Police command.arrest allow
add_ace Police command.ticket allow
add_ace Police command.impound allow
# Fire Permissions
add_ace Fire command.extinguish allow
add_ace Fire command.firetruck allow
# Medic Permissions
add_ace Medic command.heal allow
add_ace Medic command.revive allow
Inheritance System
Use inheritance to create permission hierarchies:
# Base permissions
add_ace Staff staff allow
# Inherit from Staff
add_principal Admin Staff
add_principal Moderator Staff
add_principal Supporter Staff
# Add specific permissions
add_ace Admin administrator allow
add_ace Moderator moderator allow
add_ace Supporter supporter allow
โ ๏ธ Troubleshooting
Common Issues
Permissions Not Working
Check these common issues:
- Ensure
exec perms.cfg
is in yourserver.cfg
- Verify Steam HEX IDs are correct (no typos)
- Restart server after making changes
- Check server console for error messages
Steam HEX ID Issues
Troubleshooting steps:
- Use the
status
command to get the exact HEX ID- Ensure the format is correct:
steam:110000114fa0982
- Remove any extra spaces or characters
- Test with a known working HEX ID first
Permission Denied Errors
Debug steps:
- Check if the playerโs HEX ID is in the correct group
- Verify the permission is properly defined
- Test with a simpler permission first
- Check server console for permission-related errors
๐ Best Practices
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
- 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
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
Join our Discord community for:
- Technical support
- Configuration help
- Best practices sharing
- Community discussions
Last updated: January 27, 2025