Command Configuration
The command system controls administrative and utility commands used by XDEV Appearance.
Command configuration is located inside:
shared/config.lua
Command Structure
Main command configuration:
Config.System.commands = {}
Example:
Config.System.commands = {
reloadSelf = {
enabled = true,
name = "reload"
},
reloadPlayer = {
enabled = true,
name = "reloadplayer",
permission = "admin"
}
}
Command Fields
enabled
Controls whether the command is active.
Example:
enabled = true
If set to:
false
the command is completely disabled.
name
Defines the actual chat/console command.
Example:
name = "reload"
Usage:
/reload
permission
Defines the required QBCore permission/group.
Example:
permission = "admin"
Only players with this permission may use the command.
If removed or set to nil, the command becomes public.
Available Commands
reloadSelf
Reloads the player's own appearance.
Example:
reloadSelf = {
enabled = true,
name = "reload"
}
Purpose:
- refresh appearance
- reload tattoos
- rebuild components
- force synchronization
reloadPlayer
Reloads another player's appearance.
Example:
reloadPlayer = {
enabled = true,
name = "reloadplayer",
permission = "admin"
}
Useful for:
- administration
- fixing desync issues
- support situations
openMenu
Opens the appearance menu for a target player.
Example:
openMenu = {
enabled = true,
name = "clothemenu",
permission = "admin"
}
Useful for:
- support tools
- staff management
- forced customization workflows
givePed
Gives a ped model to a target player.
Example:
givePed = {
enabled = true,
name = "giveped",
permission = "admin"
}
Usage example:
/giveped 1 mp_m_freemode_01
Localization Support
Command descriptions and parameter labels are translated through locale files.
Example:
_L('commands.reloadSelf')
Supported translations include:
- command descriptions
- parameter descriptions
- usage messages
- error messages
Internal Command Workflow
Commands internally support:
- argument validation
- permission validation
- notification hooks
- target validation
- override integrations
Notification Integration
Command notifications are routed through the override system.
Example:
Override.SendNotify(source, message, type)
This allows integration with:
- QBCore notifications
- ox_lib notifications
- custom notification systems
Permission Philosophy
The system intentionally avoids hardcoded admin checks.
Developers may:
- rename commands
- disable commands
- change permissions
- replace permission systems
without modifying protected files.
Recommended Setup
Recommended public commands:
reloadSelf
Recommended admin-only commands:
reloadPlayer
openMenu
givePed