Overview
Qbox Core uses FiveM’s native ACE permission system combined with an opt-in mechanism for admin actions. This ensures that admin commands are restricted and provides an additional layer of protection against accidental actions.ACE Permissions
Qbox Core leverages FiveM’s built-in ACE (Access Control Entry) system for command restrictions.Permission Groups
Commands are restricted using thegroup.admin permission:
server/commands.lua
Server Configuration
Add admins to theadmin group in your server.cfg:
server.cfg
Admin Opt-In System
The opt-in system requires admins to explicitly enable their admin mode before using admin commands. This prevents accidental use of admin powers during roleplay.Opt-In Metadata
types.lua
Checking Opt-In Status
Toggle Opt-In
Opt-In Command
server/commands.lua
Enforcing Opt-In
Most admin commands check opt-in status before executing:server/commands.lua
Admin Commands
Teleportation
server/commands.lua
Vehicle Commands
server/commands.lua
Money Commands
server/commands.lua
Job & Gang Commands
server/commands.lua
Server Management
server/commands.lua
Character Management
server/commands.lua
Deprecated Permission Functions
These functions are deprecated but maintained for backward compatibility:Player Commands
These commands are available to all players:server/commands.lua
Best Practices
Use Opt-In for Destructive Commands
Use Opt-In for Destructive Commands
Always check
IsOptin() before executing potentially destructive admin commands to prevent accidents.Log Admin Actions
Log Admin Actions
Use the logging system to track admin command usage for accountability.
Restrict Sensitive Commands
Restrict Sensitive Commands
Use
restricted = 'group.admin' for all administrative commands.Validate Player Existence
Validate Player Existence
Always check if a player exists before executing commands on them.
Use ACE Permissions
Use ACE Permissions
Leverage FiveM’s ACE system for granular permission control rather than deprecated methods.