> For the complete documentation index, see [llms.txt](https://docs.0resmon.org/0resmon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0resmon.org/0resmon/0resmon-1/0r-resources/0r-radio-v3/configuration.md).

# Configuration

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,
},
```

| Option             | What it does                                                                                                                                                                          |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `debug`            | Console noise. Keep at `1` on a live server unless you are troubleshooting.                                                                                                           |
| `checkVersion`     | Warns if a newer release exists on startup.                                                                                                                                           |
| `notify`           | `auto` or: `ox_lib`, `lt-ui`, `esx_notify`, `okokNotify`, `pNotify`, `mythic_notify`, `brutal_notify`, `wasabi_notify`, `origen_notify`, `lation_ui`                                  |
| `progress`         | `auto` or: `ox_lib`, `lt-ui`, `progressbar`, `lation_ui`, `wasabi_uikit`                                                                                                              |
| `menu`             | `auto` or: `ox_lib`, `lt-ui`, `qb-menu`, `lation_ui`, `wasabi_uikit`                                                                                                                  |
| `voice`            | `auto` or: `pma-voice`, `saltychat`                                                                                                                                                   |
| `replicateConvars` | When `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

| Option            | Default           | Notes                                                                                                   |
| ----------------- | ----------------- | ------------------------------------------------------------------------------------------------------- |
| `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](/0resmon/0resmon-1/0r-resources/0r-radio-v3/items.md)) |
| `movement`        | `true`            | Walk while the radio UI is open                                                                         |
| `leaveOnDeath`    | `true`            | Leave the current channel when the player dies                                                          |
| `micClicks`       | `true`            | Default mic-click state for new players (they can change it in settings)                                |
| `customMicClicks` | `true`            | Use sounds from `web/public/sounds/` instead of pma-voice / saltychat clicks                            |
| `defaultVolume`   | `100`             | Default 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,
},
```

{% hint style="info" %}
Channel `label` can be a locale key (`'channels.police_dispatch'`) or plain text (`'LSPD Tac 1'`).
{% endhint %}

### Restricted channel example

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

### Channel options

| Setting    | Meaning                                                  |
| ---------- | -------------------------------------------------------- |
| `label`    | Channel name (locale key or plain string)                |
| `jammed`   | `false` = this channel is not affected by jammers        |
| `duty`     | `true` = player must be on duty (`job.onDuty`) to join   |
| `showRole` | Show each member's grade/role in the channel list        |
| `jobs`     | Allow-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

{% hint style="warning" %}
Custom radio effects (`radioEffect = 'custom'`) only work with **pma-voice**. saltychat still gets a working radio without the submix pipeline.
{% endhint %}

| Option              | Default    | Notes                                                                                    |
| ------------------- | ---------- | ---------------------------------------------------------------------------------------- |
| `radioEffect`       | `'custom'` | `'custom'` = 0r-radio submix pipeline; `'pma'` = pma-voice built-in; `false` = no effect |
| `usePMAAnimations`  | `false`    | `true` = use pma-voice talk animations; disables `talkAnimations` presets                |
| `underwaterEffects` | `true`     | Muffled radio audio underwater (custom mode only)                                        |
| `distanceEffects`   | `true`     | Audio quality by distance between players (custom mode only)                             |

### Advanced tuning (custom mode only)

| Block                  | Purpose                                                                                 |
| ---------------------- | --------------------------------------------------------------------------------------- |
| `voiceEffects`         | Submix definitions (`radioNear`, `radioMid`, `radioFar`, `jammed`, `underWaterTalking`) |
| `radioDistance`        | Distance thresholds that pick each submix                                               |
| `environmentalEffects` | Interior and weather interference (`enabled`, `interior`, `weather.badWeathers`)        |
| `radioDropouts`        | Simulated 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' },
},
```

| Option                         | Default                          | Notes                                                                                                       |
| ------------------------------ | -------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `enabled`                      | `true`                           | Turn the jammer system on or off                                                                            |
| `item`                         | `'jammer'`                       | Inventory item name (see [Items](/0resmon/0resmon-1/0r-resources/0r-radio-v3/items.md))                     |
| `range`                        | `75.0`                           | Radius where radio signal is affected                                                                       |
| `minDistance`                  | `15.0`                           | Minimum gap allowed between two placed jammers                                                              |
| `prop`                         | `'ch_prop_ch_mobile_jammer_01x'` | World model when placed                                                                                     |
| `useVoiceEffectInsteadLeaving` | `true`                           | `true` = distorted submix while in range; `false` = remove from channel. Only when `radioEffect = 'custom'` |
| `job`                          | `true`                           | If `true`, only `jobs` below can place or pick up jammers                                                   |
| `jobs`                         | police, sheriff, swat            | Allowed jobs when `job = true`; if `job = false`, anyone with the item can use it                           |

***

## Customization

```lua
customization = {
    enabled = true,
    displayNames = true,
    colors = true,
},
```

| Option         | Default | Notes                                  |
| -------------- | ------- | -------------------------------------- |
| `enabled`      | `true`  | Master switch for player customization |
| `displayNames` | `true`  | Custom name on the channel list        |
| `colors`       | `true`  | Custom badge color on the channel list |

***

## Keybinds

```lua
keybinds = {
    enabled = true,
    openRadio = 'EQUALS',    -- default: =
    nextChannel = 'PERIOD',  -- default: .
    prevChannel = 'COMMA',   -- default: ,
},
```

| Option        | Default    | Notes                                |
| ------------- | ---------- | ------------------------------------ |
| `enabled`     | `true`     | Enable 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
},
```

| Option       | Default             | Notes                                                                      |
| ------------ | ------------------- | -------------------------------------------------------------------------- |
| `enabled`    | `true`              | 0r-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,
    },
},
```

| Option             | Default | Notes                               |
| ------------------ | ------- | ----------------------------------- |
| `enabled`          | `true`  | Toggle flashlight from the radio UI |
| `drawDistance`     | `75.0`  | How far other players see the beam  |
| `light.color`      | RGB     | Beam color                          |
| `light.distance`   | `12.5`  | Light range                         |
| `light.brightness` | `1.0`   | Brightness                          |
| `light.roundness`  | `1.0`   | Roundness                           |
| `light.radius`     | `15.0`  | Radius                              |
| `light.falloff`    | `0.75`  | Falloff                             |

***

## 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):

| File                      | Contents                     |
| ------------------------- | ---------------------------- |
| `data/favorites.json`     | Saved favorite channels      |
| `data/customization.json` | Display name and badge color |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.0resmon.org/0resmon/0resmon-1/0r-resources/0r-radio-v3/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
