Skip to content

Configuration

config.lua explained — channels, voice effects, jammer, and integrations.

All gameplay settings live in config.lua at the resource root (0r-radio/config.lua).

Open it in an editor and change only what you need — the file is commented, but this page is the short version.


Setup#

lua
setup = {
    debug = 4,              -- 0 = off, 1 = errors only, up to 4 = all logs (use 1 in production)
    checkVersion = true,
    notify = 'auto',
    progress = 'auto',
    menu = 'auto',
    voice = 'auto',
    replicateConvars = true,
},
OptionWhat it does
debugConsole noise. Keep at 1 on a live server unless you are troubleshooting.
checkVersionWarns if a newer release exists on startup.
notifyauto or: ox_lib, lt-ui, esx_notify, okokNotify, pNotify, mythic_notify, brutal_notify, wasabi_notify, origen_notify, lation_ui
progressauto or: ox_lib, lt-ui, progressbar, lation_ui, wasabi_uikit
menuauto or: ox_lib, lt-ui, qb-menu, lation_ui, wasabi_uikit
voiceauto or: pma-voice, saltychat
replicateConvarsWhen true, 0r-radio sets PMA-Voice convars on startup and validates them. Prefer setting convars manually in server.cfg if you already manage them — set to false in that case.

General#

OptionDefaultNotes
locale'en'Also: tr, de, fr, es, pt-br, pl, ru, it — files in locales/
item'advancedradio'Must match your inventory item name (see Items)
movementtrueWalk while the radio UI is open
leaveOnDeathtrueLeave the current channel when the player dies
micClickstrueDefault mic-click state for new players (they can change it in settings)
customMicClickstrueUse sounds from web/public/sounds/ instead of pma-voice / saltychat clicks
defaultVolume100Default radio volume for new players (0–100)

How frequencies work#

There are three kinds of channels. Think of them as layers:

  1. Reserved (config) — IDs listed in channels = { [1] = { ... }, [2] = { ... } }. Job-restricted, per-channel settings. Example: police on channel 1.
  2. Public — Frequencies 1 … frequency.publicChannels (default 1–200). Open to everyone unless that ID is already defined in channels.
  3. Password / custom — Frequencies from publicChannels + 1 up to frequency.max (default 201–500). Created in-game from the UI with a password.

If you change publicChannels, the ranges shift. Example with max = 500 and publicChannels = 250: 1–250 public, 251–500 password/custom.

lua
frequency = {
    max = 500,
    publicChannels = 200,
},

Channel label can be a locale key ('channels.police_dispatch') or plain text ('LSPD Tac 1').

Restricted channel example#

lua
channels = {
    [1] = {
        label = 'channels.police_dispatch',
        jammed = false,
        duty = true,
        showRole = true,
        jobs = { 'police' },
    },
},

Channel options#

SettingMeaning
labelChannel name (locale key or plain string)
jammedfalse = this channel is not affected by jammers
dutytrue = player must be on duty (job.onDuty) to join
showRoleShow each member's grade/role in the channel list
jobsAllow-list of job names; others are refused at join time

The default config maps channels 1–9 to LSPD, BCSO, and EMS frequencies. Extend or replace them as needed.


Voice effects#

Custom radio effects (radioEffect = 'custom') only work with pma-voice. saltychat still gets a working radio without the submix pipeline.

OptionDefaultNotes
radioEffect'custom''custom' = 0r-radio submix pipeline; 'pma' = pma-voice built-in; false = no effect
usePMAAnimationsfalsetrue = use pma-voice talk animations; disables talkAnimations presets
underwaterEffectstrueMuffled radio audio underwater (custom mode only)
distanceEffectstrueAudio quality by distance between players (custom mode only)

Advanced tuning (custom mode only)#

BlockPurpose
voiceEffectsSubmix definitions (radioNear, radioMid, radioFar, jammed, underWaterTalking)
radioDistanceDistance thresholds that pick each submix
environmentalEffectsInterior and weather interference (enabled, interior, weather.badWeathers)
radioDropoutsSimulated packet loss (enabled, jitter, stages per distance tier)

Defaults are tested. Tweak only if you know what each value does — comments in config.lua are the source of truth.


Jammer#

lua
jammer = {
    enabled = true,
    item = 'jammer',
    range = 75.0,
    minDistance = 15.0,
    prop = 'ch_prop_ch_mobile_jammer_01x',
    useVoiceEffectInsteadLeaving = true,
    job = true,
    jobs = { 'police', 'sheriff', 'swat' },
},
OptionDefaultNotes
enabledtrueTurn the jammer system on or off
item'jammer'Inventory item name (see Items)
range75.0Radius where radio signal is affected
minDistance15.0Minimum gap allowed between two placed jammers
prop'ch_prop_ch_mobile_jammer_01x'World model when placed
useVoiceEffectInsteadLeavingtruetrue = distorted submix while in range; false = remove from channel. Only when radioEffect = 'custom'
jobtrueIf true, only jobs below can place or pick up jammers
jobspolice, sheriff, swatAllowed jobs when job = true; if job = false, anyone with the item can use it

Customization#

lua
customization = {
    enabled = true,
    displayNames = true,
    colors = true,
},
OptionDefaultNotes
enabledtrueMaster switch for player customization
displayNamestrueCustom name on the channel list
colorstrueCustom badge color on the channel list

Keybinds#

lua
keybinds = {
    enabled = true,
    openRadio = 'EQUALS',    -- default: =
    nextChannel = 'PERIOD',  -- default: .
    prevChannel = 'COMMA',   -- default: ,
},
OptionDefaultNotes
enabledtrueEnable or disable the keybind system
openRadio'EQUALS'Open / toggle radio UI
nextChannel'PERIOD'Next channel
prevChannel'COMMA'Previous channel

Players can rebind these in FiveM's keybind settings. Defaults apply on first join.


Talk animations#

lua
talkAnimations = {
    enabled = true,
    animations = { ... },  -- three presets: handheld, shoulder, chest mic
},
OptionDefaultNotes
enabledtrue0r-radio talk animations; set false if another script handles radio anim
animations[0], [1], [2]Presets in the UI — do not edit dict/anim/prop unless swapping animations

Set usePMAAnimations = true (in the voice section) to let pma-voice handle talk animations instead.


Flashlight#

lua
flashlight = {
    enabled = true,
    drawDistance = 75.0,
    light = {
        color = { 255, 255, 210 },
        distance = 12.5,
        brightness = 1.0,
        roundness = 1.0,
        radius = 15.0,
        falloff = 0.75,
    },
},
OptionDefaultNotes
enabledtrueToggle flashlight from the radio UI
drawDistance75.0How far other players see the beam
light.colorRGBBeam color
light.distance12.5Light range
light.brightness1.0Brightness
light.roundness1.0Roundness
light.radius15.0Radius
light.falloff0.75Falloff

Locales & data#

Set locale to a supported code and edit strings in locales/*.json. Channel labels can use keys under "channels" in those files.

Player data is stored on the server (no database required):

FileContents
data/favorites.jsonSaved favorite channels
data/customization.jsonDisplay name and badge color