Configuration
Kivo Radio has four config files. Edit them, then restart the resource with restart kivo-radio.
| File | Covers |
|---|---|
config/channels.lua |
Channel locking, demo mode and the periodic channel cleanup. |
config/jobChannels.lua |
Preset job channels. |
config/items.lua |
Item names, earpiece switch, framework and inventory overrides. |
config/proximity.lua |
Proximity radio hearing. |
When you add entries, keep the existing punctuation: a comma after each entry and a semicolon after the closing brace.
Channels
Section titled “Channels”File: config/channels.lua
| Option | Default | Values | What it does |
|---|---|---|---|
Config.AllowPlayerLocking |
true |
true or false |
Whether players may lock channels. false turns channel locking off. Players also need the radio.lock permission (see below). |
Config.DemoMode |
{ enabled = false } |
Table with enabled |
Demo mode for showcasing the interface. See Demo mode. |
Config.ChannelGcIntervalMs |
180000 (3 minutes) |
Milliseconds | How often the periodic channel cleanup runs. |
Config.ChannelGcPingTimeoutMs |
5000 (5 seconds) |
Milliseconds | How long the cleanup waits for players to answer. |
Leave the two Config.ChannelGc... values at their defaults unless you have a reason to change them.
Lock permission
Section titled “Lock permission”Players need the radio.lock permission to lock a channel. Grant it in server.cfg.
# everyone in the admin groupadd_ace group.admin radio.lock allow
# one specific playeradd_ace identifier.fivem:123456 radio.lock allowA player with the permission locks the channel they are on by pressing the lock button in the radio and typing a code on the keypad. Anyone joining that channel then has to enter the same code.
Demo mode
Section titled “Demo mode”Demo mode is for showcasing the interface without other players around. It is off by default.
Config.DemoMode = { enabled = false,};| Option | Default | Values | What it does |
|---|---|---|---|
enabled |
false |
true or false |
When true, a player can run /add <name> in the chat. The fake player then shows up in that player’s own channel roster, in both the members panel and the connected-players HUD. |
The fake players are entirely local. Only the player who ran the command sees them. Nothing is synced to the server or to other players.
To use it, set enabled = true, restart kivo-radio, connect to a channel and type /add followed by a name. Set it back to false when you are done. See Examples and troubleshooting for a walk through and edge cases.
Job channels
Section titled “Job channels”File: config/jobChannels.lua
Job channels are preset channels with a name. They appear in the radio’s Favorite Channels tab with their label, so a player can connect with one press. The tab has four rows. Job channels take the first rows and the player’s own favourites fill the rows that are left, so keep the number of job channels small.
Shipped file:
Config.JobChannels = { { code = "1.00", jobId = "police", lockCode = 1234, label = "Police", locked = true }, { code = "2.00", jobId = "ambulance", label = "EMS", locked = false },};| Field | Type | Required | What it does |
|---|---|---|---|
code |
string | Yes | The channel number as text with two decimals, such as "1.00" or "21.00". |
label |
string | No | The name shown next to the channel in the radio. |
jobId |
string | No | The name of the job the channel is for, for example "police". |
locked |
boolean | No | true locks the channel with lockCode. The default is unlocked. |
lockCode |
number | When locked = true |
The code players type on the radio keypad to join. Use a whole number up to four digits, written without quotes. |
Items and detection
Section titled “Items and detection”File: config/items.lua
Config.Items
Section titled “Config.Items”| Option | Default | Values | What it does |
|---|---|---|---|
enabled |
true |
true or false |
Master switch for the earpiece. When false the earpiece does not exist and every radio can be overheard. |
radio |
"radio" |
Item name | The radio item the earpiece is fitted to. |
earpiece |
"radio_earpiece" |
Item name | The earpiece item. |
openRadioOnUse |
true |
true or false |
Open the radio interface when the radio item is used or right clicked. |
cacheTtlMs |
10000 |
Milliseconds | How long the server remembers whether a player has an earpiece fitted. Fitting or removing an earpiece through Kivo Radio updates this at once. The value only matters for changes made by other resources, which are noticed after at most this long. |
Config.Framework
Section titled “Config.Framework”Default "auto".
| Value | Meaning |
|---|---|
"auto" |
Detects qbx_core, then qb-core, then es_extended, in that order. |
"qbx" |
Use QBX. |
"qb" |
Use QBCore. |
"esx" |
Use ESX. |
Override it only if detection picks the wrong framework. Radio and proximity hearing work without a framework. The earpiece needs a supported one.
Config.Inventory
Section titled “Config.Inventory”Default "auto".
| Value | Meaning |
|---|---|
"auto" |
Uses ox_inventory when it is running, otherwise the fallback. |
"ox" |
The earpiece is stored in the metadata of the radio item. It is fitted to one specific radio. |
"fallback" |
The earpiece is stored for the player instead. This is used for qb-inventory, qs-inventory, the default ESX inventory and similar. |
See Frameworks and inventories for details.
Proximity hearing
Section titled “Proximity hearing”File: config/proximity.lua. These options live in the table Config.RadioProximity.
Proximity hearing lets players near a radio overhear what comes out of it. Read Radio earpiece for the full picture.
| Option | Default | Values | What it does |
|---|---|---|---|
enabled |
true |
true or false |
Master switch. When false nothing runs and no events are sent. |
range |
3.0 |
Metres | How far the sound carries from the radio. |
updateIntervalMs |
400 |
Milliseconds | How often the server works out who can overhear what. It only runs while somebody is transmitting. |
clientUpdateIntervalMs |
200 |
Milliseconds | How often each client refreshes the distance based volume. |
baseVolume |
0.35 |
0.0 to 1.0 |
Volume of the overheard sound right at the radio. pma-voice plays normal radio at 0.6 by default, so keep this below that. |
edgeVolume |
0.05 |
0.0 to 1.0 |
The volume at the very edge of range, as a fraction of baseVolume. 0.0 fades to silence. Higher values keep the sound audible right up to the cutoff. With the defaults the volume at the edge is 0.35 * 0.05 = 0.0175. |
followListenerVolume |
true |
true or false |
Scale the overheard sound by the pma-voice radio volume of the player whose radio it comes from, so a radio turned down is overheard quietly. |
useSubmix |
true |
true or false |
Run the overheard speech through a dedicated audio effect so it sounds like it comes out of a speaker instead of being spoken next to you. |
skipWithinProximity |
true |
true or false |
Do not play the overheard sound for a talker the bystander can already hear normally. This keeps positional voice intact when the talker is standing right there. |
voiceTargetId |
1 |
Number | The mumble voice target that pma-voice uses for radio. Only change this on a modified pma-voice. |
debug |
false |
true or false |
Print the calculations to the server and client consoles. |
The overheard sound cannot be positioned in the world. The volume gets lower with distance from the radio, but the sound does not come from the direction of the radio.
Server convars
Section titled “Server convars”These are set in server.cfg. Use setr (not set). Restart the server after changing them.
| Convar | Default | What it does |
|---|---|---|
radio_maxChannels |
1000 |
The highest channel number players can use. |
radio_enableRadioCommands |
1 |
Set to 0 to turn off the /radio and /r commands. The other commands stay available. |
radio_useRadioAnim |
1 |
Set to 0 to turn off the radio prop and the animation while the radio is open. |
radio_defaultStartChannel |
21 |
The channel number the radio shows by default. |
setr radio_maxChannels 1000setr radio_enableRadioCommands 1setr radio_useRadioAnim 1setr radio_defaultStartChannel 21Personalisation
Section titled “Personalisation”There are no server settings for personalisation. Each player changes these in the radio, and they are remembered between sessions:
| Setting | Where |
|---|---|
| Radio name | Home tab, Name field. Shown to other members in the member list. |
| Favourite channels | Star button next to a channel. Shown in the Favorite Channels tab below the job channels. |
| Hud Scale | Settings tab. Size of the on-screen member list. |
| Radio Scale | Settings tab. Size of the radio. |
| Toggle Hud Display | Settings tab. Shows or hides the on-screen member list. |
| Radio Color | Settings tab. Accent colour of the radio. |
