Oxide StudiosOxide Studios

Commands Reference

Complete command documentation for Oxide Chat.

Table of Contents


Overview

Oxide Chat provides roleplay-focused chat commands with proximity awareness, job-specific channels, and private messaging.

Command Features

FeatureDescription
AliasesMultiple names for the same command
ProximityDistance-based message delivery
Line of SightOptional visibility requirement
CooldownsRate limiting per command type
Job ValidationServer-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

PropertyValue
Range15 meters
Line of SightRequired
Cooldown1.5 seconds
StyleItalic, 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]

PropertyValue
Range15 meters
Line of SightRequired
Cooldown1.5 seconds
StyleItalic, 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?

PropertyValue
Range3 meters
Line of SightNot required
Cooldown1.5 seconds
StyleAmber text

/shout (/s)

Yell to players in a large area.

/shout EVERYBODY GET DOWN!
/s POLICE! STOP!

Output: John Smith shouts: EVERYBODY GET DOWN!

PropertyValue
Range50 meters
Line of SightNot required
Cooldown1.5 seconds
StyleRed 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

PropertyValue
ScopeGlobal (all players)
Cooldown5 seconds
StyleAmber 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.

PropertyValue
Range20 meters
Line of SightNot required
Cooldown1.5 seconds
StyleAmber 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?

PropertyValue
ScopePrivate (two players)
Cooldown1 second
StyleAmber 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]

PropertyValue
ScopePrivate
Cooldown1 second
RequirementMust 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

PropertyValue
Required Jobpolice
ScopeAll police players
StyleBlue 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

PropertyValue
Required Jobambulance
ScopeAll EMS players
StyleRed 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

PropertyValue
Required Jobmechanic
ScopeAll mechanic players
StyleOrange 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!
PropertyValue
Permissionadmin ACE
ScopeAll players
Cooldown30 seconds
StyleRed 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
PropertyValue
Permissionadmin ACE
ScopeAll 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

  1. Add command definition in config/commands.lua:
{
    name = 'taxi',
    aliases = { 'cab', 'cabbie' },
    description = 'Taxi company radio',
    type = 'job',
    jobs = { 'taxi' },
    chatType = 'taxi',
}
  1. Add chat type styling in config/main.lua:
Config.ChatTypes.taxi = {
    prefix = 'TAXI',
    color = '#FFFF00',
}
  1. 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

  1. 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,
}
  1. 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

PropertyTypeDescription
namestringPrimary command name
aliasestableAlternative command names
descriptionstringHelp text for suggestions
typestringproximity, global, job, private, admin
rangenumberProximity range in meters
requireLOSbooleanRequire line of sight
chatTypestringChat type for styling
jobstableRequired jobs for job type
permissionstringRequired ACE permission
cooldownnumberOverride cooldown (ms)
formatfunctionMessage 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