Commands Reference
Complete command documentation for Oxide Chat.
Table of Contents
- Overview
- Roleplay Commands
- Out of Character Commands
- Private Messaging
- Job Radio Commands
- Admin Commands
- Utility Commands
- Adding Custom Commands
Overview
Oxide Chat provides roleplay-focused chat commands with proximity awareness, job-specific channels, and private messaging.
Command Features
| Feature | Description |
|---|---|
| Aliases | Multiple names for the same command |
| Proximity | Distance-based message delivery |
| Line of Sight | Optional visibility requirement |
| Cooldowns | Rate limiting per command type |
| Job Validation | Server-side job verification |
Roleplay Commands
Commands for in-character roleplay actions.
/me
Perform a roleplay action visible to nearby players.
/me waves hello to everyone
Output: * John Smith waves hello to everyone
| Property | Value |
|---|---|
| Range | 15 meters |
| Line of Sight | Required |
| Cooldown | 1.5 seconds |
| Style | Italic, white text |
/do
Describe an environment or action result.
/do The door swings open with a creak
Output: ** The door swings open with a creak [John Smith]
| Property | Value |
|---|---|
| Range | 15 meters |
| Line of Sight | Required |
| Cooldown | 1.5 seconds |
| Style | Italic, gray text |
/whisper (/w)
Speak quietly to nearby players.
/whisper Hey, can you hear me?
/w Follow me quietly
Output: John Smith whispers: Hey, can you hear me?
| Property | Value |
|---|---|
| Range | 3 meters |
| Line of Sight | Not required |
| Cooldown | 1.5 seconds |
| Style | Amber text |
/shout (/s)
Yell to players in a large area.
/shout EVERYBODY GET DOWN!
/s POLICE! STOP!
Output: John Smith shouts: EVERYBODY GET DOWN!
| Property | Value |
|---|---|
| Range | 50 meters |
| Line of Sight | Not required |
| Cooldown | 1.5 seconds |
| Style | Red text |
Out of Character Commands
Commands for non-roleplay communication.
/ooc
Global out-of-character message visible to all players.
/ooc I need to go AFK for a minute
Output: [OOC] John Smith (5): I need to go AFK for a minute
| Property | Value |
|---|---|
| Scope | Global (all players) |
| Cooldown | 5 seconds |
| Style | Amber text with OOC prefix |
/looc
Local out-of-character message visible to nearby players.
/looc Sorry, need to check my settings
Output: Uses OOC styling but only visible to nearby players.
| Property | Value |
|---|---|
| Range | 20 meters |
| Line of Sight | Not required |
| Cooldown | 1.5 seconds |
| Style | Amber text with OOC prefix |
Private Messaging
Direct player-to-player communication.
/msg (/pm, /dm)
Send a private message to a specific player.
/msg 5 Hey, want to team up?
/pm 12 On my way to you
/dm 3 Check your phone
Usage: /msg [player_id] [message]
Output (to recipient): [PM from John Smith (5)]: Hey, want to team up?
Output (to sender): [PM to Jane Doe (12)]: Hey, want to team up?
| Property | Value |
|---|---|
| Scope | Private (two players) |
| Cooldown | 1 second |
| Style | Amber text |
/reply (/r)
Reply to the last player who sent you a PM.
/reply Sure, meet me at Legion Square
/r On my way!
Usage: /reply [message]
| Property | Value |
|---|---|
| Scope | Private |
| Cooldown | 1 second |
| Requirement | Must have received a PM |
Reply Tracking
- Last PM sender is automatically tracked
- Disconnecting clears reply tracking
- Each new PM updates the reply target
Job Radio Commands
Job-specific chat channels. Requires the corresponding job.
/lspd (/pd, /police)
Police department radio channel.
/lspd 10-4, responding to the scene
/police Need backup at Legion Square
Output: [LSPD] John Smith (Sergeant): 10-4, responding to the scene
| Property | Value |
|---|---|
| Required Job | police |
| Scope | All police players |
| Style | Blue text with LSPD prefix |
/ems (/ambulance, /medic)
Emergency medical services radio channel.
/ems Patient stabilized, en route to Pillbox
/medic Need a medic at the pier
Output: [EMS] John Smith (Paramedic): Patient stabilized, en route to Pillbox
| Property | Value |
|---|---|
| Required Job | ambulance |
| Scope | All EMS players |
| Style | Red text with EMS prefix |
/mechanic (/mech)
Mechanic shop radio channel.
/mechanic Vehicle ready for pickup
/mech New job at LSIA
Output: [MECHANIC] John Smith (Mechanic): Vehicle ready for pickup
| Property | Value |
|---|---|
| Required Job | mechanic |
| Scope | All mechanic players |
| Style | Orange text with MECHANIC prefix |
Admin Commands
Commands requiring admin permissions.
/announce (/announcement, /ann)
Send a server-wide announcement.
/announce Server restart in 10 minutes
/ann Double XP weekend is live!
| Property | Value |
|---|---|
| Permission | admin ACE |
| Scope | All players |
| Cooldown | 30 seconds |
| Style | Red text with ANNOUNCEMENT prefix |
Console Usage:
announce Server maintenance complete
/clearchat (/cc)
Clear chat history.
/clearchat -- Clear for all players
/clearchat 5 -- Clear for player ID 5
| Property | Value |
|---|---|
| Permission | admin ACE |
| Scope | All or specific player |
/testchat
Send test messages for all chat types (development/admin use).
/testchat -- Send test messages to yourself
Console Usage:
testchat 5 -- Send test messages to player ID 5
Utility Commands
/chatsettings
Open the chat settings panel.
/chatsettings
Opens a modal where you can customize:
- Chat position
- Font size
- Fade time
- Background opacity
- Per-type visibility and colors
Adding Custom Commands
Adding a Job Radio Channel
- Add command definition in
config/commands.lua:
{
name = 'taxi',
aliases = { 'cab', 'cabbie' },
description = 'Taxi company radio',
type = 'job',
jobs = { 'taxi' },
chatType = 'taxi',
}
- Add chat type styling in
config/main.lua:
Config.ChatTypes.taxi = {
prefix = 'TAXI',
color = '#FFFF00',
}
- Register the command in
client/commands.lua:
local function handleTaxiRadio(source, args)
if #args < 1 then
QBCore.Functions.Notify('Usage: /taxi [message]', 'error')
return
end
local message = table.concat(args, ' ')
TriggerServerEvent('oxide-chat:server:jobMessage', 'taxi', message)
end
RegisterChatCommand('taxi', handleTaxiRadio, {'cab', 'cabbie'})
Adding a Proximity Command
- Add to
config/commands.lua:
{
name = 'try',
description = 'Attempt an action (50/50 chance)',
type = 'proximity',
range = 15.0,
requireLOS = true,
chatType = 'me',
format = function(name, message)
local success = math.random() > 0.5
local result = success and 'succeeds' or 'fails'
return string.format('* %s attempts to %s and %s', name, message, result)
end,
}
- Register the command in
client/commands.lua:
RegisterCommand('try', function(source, args)
if #args < 1 then
QBCore.Functions.Notify('Usage: /try [action]', 'error')
return
end
local message = table.concat(args, ' ')
TriggerServerEvent('oxide-chat:server:proximityMessage', {
type = 'try',
message = message,
})
end, false)
Command Definition Properties
| Property | Type | Description |
|---|---|---|
name | string | Primary command name |
aliases | table | Alternative command names |
description | string | Help text for suggestions |
type | string | proximity, global, job, private, admin |
range | number | Proximity range in meters |
requireLOS | boolean | Require line of sight |
chatType | string | Chat type for styling |
jobs | table | Required jobs for job type |
permission | string | Required ACE permission |
cooldown | number | Override cooldown (ms) |
format | function | Message format function |
Format Function
The format function transforms the message before display:
format = function(name, message)
return string.format('* %s %s', name, message)
end
For global commands:
format = function(name, id, message)
return string.format('%s (%d): %s', name, id, message)
end