Examples and troubleshooting
Example configurations
Section titled “Example configurations”Police, EMS and Fire channels
Section titled “Police, EMS and Fire channels”Police and EMS are locked with a code. Fire is not locked. Lock codes are whole numbers up to four digits, written without quotes.
Config.JobChannels = { { code = "1.00", jobId = "police", lockCode = 4821, label = "Police", locked = true }, { code = "2.00", jobId = "ambulance", lockCode = 7305, label = "EMS", locked = true }, { code = "3.00", jobId = "fire", label = "Fire", locked = false },};Players then see Police, EMS and Fire at the top of the Favorite Channels tab. A player who connects to Police is asked for the code.
Let admins lock channels
Section titled “Let admins lock channels”Locking is on by default (Config.AllowPlayerLocking = true). Give the permission to the group that should be able to lock channels.
add_ace group.admin radio.lock allowMembers of that group lock the channel they are on with the lock button in the radio.
Turn channel locking off
Section titled “Turn channel locking off”-- config/channels.luaConfig.AllowPlayerLocking = false;Smaller hearing range
Section titled “Smaller hearing range”Overhearing only when someone is almost touching the radio, and quieter. Change these three values in the existing Config.RadioProximity table in config/proximity.lua and leave the other lines as shipped.
range = 1.5, baseVolume = 0.2, edgeVolume = 0.0,Radio only, no overhearing
Section titled “Radio only, no overhearing”Turn off proximity hearing. The earpiece is then not needed, so you can switch it off as well.
-- config/proximity.luaConfig.RadioProximity.enabled = false;
-- config/items.luaConfig.Items.enabled = false;Players can open the radio with /radio or /r, unless you turned those commands off with radio_enableRadioCommands.
Overhearing on, but no items
Section titled “Overhearing on, but no items”Keep proximity hearing, skip the earpiece items. Every radio can be overheard.
-- config/items.luaConfig.Items.enabled = false;ox_inventory started late
Section titled “ox_inventory started late”If ox_inventory starts after Kivo Radio and you cannot change the order, force the mode.
-- config/items.luaConfig.Inventory = "ox";Demo mode for showcasing the interface
Section titled “Demo mode for showcasing the interface”Use this when you record a video or take screenshots and want the radio to show a busy channel without other players online.
-
Set the option in
config/channels.lua:Config.DemoMode = {enabled = true,}; -
Restart the resource with
restart kivo-radio. -
Open the radio and connect to a channel, for example
21.00. -
Open the chat and add a few fake players, one command per player:
/add Maya/add Jordan/add Sam -
The names appear in your channel roster, in the members panel and in the connected-players HUD on screen.
-
When you are done, set
enabled = falseagain and restartkivo-radio.
Demo mode edge cases:
| Situation | What to know |
|---|---|
| Demo mode is left on when the server goes live | Set enabled = false on a live server. The option is meant for showcasing only. |
| Another player is on the same channel | They do not see your fake players. The fake members are local to the player who ran /add. |
| You want to test voice, lock codes or proximity hearing | The fake players only appear in your own roster. Test with real players, as in the test steps on the Installation page. |
enabled = false (the default) |
/add does not add anyone. |
| You want the fake players to show up | Connect to a channel first. They are shown in the roster of the channel you are on. |
Edge cases
Section titled “Edge cases”| Situation | What happens |
|---|---|
| A player drops the radio that has the earpiece (ox_inventory) | The earpiece stays on that radio. Another radio the player picks up can be overheard until an earpiece is fitted to it. |
| A player has two radios (player based storage) | One fitted earpiece silences both. |
| A player reconnects to the server | Favourite channels, radio name and look are remembered between sessions. |
| A player is on the channel and also stands near another member | They hear the transmission through their own radio only. They do not get an extra overheard copy. |
| A bystander stands near a member whose radio has an earpiece | The bystander hears nothing from that radio. |
| Two radio resources are running | Commands and the radio item clash. Remove the other one. |
Troubleshooting
Section titled “Troubleshooting”The earpiece
Section titled “The earpiece”| Problem | Cause and fix |
|---|---|
| The Earpiece row is missing in the Settings tab. | The earpiece is not available. Check that Config.Items.enabled is true and that your framework is one of qbx_core, qb-core or es_extended. Start the framework before kivo-radio, or set Config.Framework (see Frameworks and inventories). |
| Using the earpiece item shows a message that radio accessories are not available. | Same cause as above. |
| A message says the player has no radio to fit the earpiece to. | The player has no item with the name in Config.Items.radio. Check that the item name in your inventory matches the config exactly. |
| Using the earpiece item does nothing at all. | The item is not registered as usable in your inventory, or it has a different name than Config.Items.earpiece. Compare the entry with the one on the Installation page. |
ox_inventory is installed but the earpiece behaves per player. |
ox_inventory started after Kivo Radio. Fix the start order or set Config.Inventory = "ox". |
| The earpiece state looks wrong after another script gave or took a radio. | The change is noticed within Config.Items.cacheTtlMs (10 seconds by default). Wait, or lower the value. |
| The radio item does not open the radio. | Config.Items.openRadioOnUse is false, or another resource handles the same item, or the item name differs from Config.Items.radio. Players can use /radio. |
Proximity hearing
Section titled “Proximity hearing”| Problem | Cause and fix |
|---|---|
| Bystanders hear nothing. | Go through this list. 1. Config.RadioProximity.enabled is true. 2. The bystander is within range of the radio owner, not only of the talker. 3. The bystander is not on that channel. 4. Another member of the channel is talking. 5. The radio owner’s radio is switched on and has no earpiece. 6. The radio owner has not turned the radio volume right down (when followListenerVolume is true). 7. The bystander is not already within normal voice range of the talker (when skipWithinProximity is true). |
| It works only for some players. | Check that voiceTargetId matches the voice target of your pma-voice. It is 1 in an unmodified pma-voice. |
| The overheard sound is too loud. | Lower baseVolume. Keep it below 0.6, which is the normal pma-voice radio volume. |
| The overheard sound is too quiet or cuts off too early. | Raise baseVolume or edgeVolume, or raise range. |
| The sound does not seem to come from the radio’s direction. | This is expected. The volume follows the distance, but the direction cannot be set. |
| You want to see what the script calculates. | Set debug = true in config/proximity.lua, restart kivo-radio and read the server and client consoles. Set it back to false afterwards. |
| Nobody hears anything on the radio at all, not even channel members. | This is a pma-voice problem. Check that pma-voice is started and that normal voice chat works. |
Channels and job channels
Section titled “Channels and job channels”| Problem | Cause and fix |
|---|---|
| A job channel is not in the list. | Check config/jobChannels.lua for typos, a missing comma after an entry, and that code is written like "1.00". Restart kivo-radio after the change. |
A job channel with locked = true does not ask for a code. |
Check that lockCode is set and written as a number without quotes, for example lockCode = 1234. Restart kivo-radio. |
| Players cannot lock a channel. | The player needs the radio.lock permission, Config.AllowPlayerLocking must not be false, and the player must be connected to a channel. |
/radio and /r do nothing. |
radio_enableRadioCommands is 0. Or the convar was set with set instead of setr. |
| Convar changes have no effect. | Use setr, put the line in server.cfg and restart the server. |
| Players want the radio prop and animation gone. | Set setr radio_useRadioAnim 0. |
/add does nothing. |
Demo mode is off. See the Demo mode section. |
Before asking for help
Section titled “Before asking for help”Collect these details:
- Your framework and inventory, with versions.
- Your start order from
server.cfg. - Any errors or warnings that Kivo Radio prints in the server console or the client console.
- The contents of the four config files, if you changed them.
