Configuration — ns-radio
Everything is in config.lua (not escrowed). Values marked -- example are samples: replace them.
| Key | Default | Meaning |
|---|---|---|
Config.Framework | 'auto' | 'qbox', 'qbcore', 'esx', 'standalone' |
Config.Locale | 'en' | 'en' / 'tr'; add locales/<code>.lua for more |
Config.Inventory | 'auto' | 'ox', 'framework', 'none' (no item needed) |
Config.Features.MemberList | true | people on the channel + who is talking (radio screen, edge list) |
Config.Features.Presets | true | 4 presets (Menu > Presets) |
Config.Features.Animation | true | radio prop + animation while open and while talking |
Config.Item.required | true | players need the item to open the radio and to stay on a channel |
Config.Item.name | 'radio' | item name |
Config.Item.checkInterval | 3000 | ms; the server re-checks players on a channel (item, job, duty, gang) |
Config.Command | 'radio' | command that opens the radio ('' = none) |
Config.Keys.open | '' | default key for the command; players can bind it in Settings > Key Bindings > FiveM |
Config.Channels.min / max | 1 / 500 | frequency range (two decimals) |
Config.Channels.step | 1 | CH up / down step |
Config.Channels.restricted | police / EMS on 1–10 | locked ranges, see below |
Config.Channels.names | 1–3 | names shown on the LCD and the member list |
Config.MemberList.showNames | 'all' | 'all', 'restricted' (names on locked channels only), 'none' (count only) |
Config.MemberList.maxShown | 12 | edge list: longer lists show "+N more" (Menu > Members scrolls) |
Config.MemberList.allowHide | true | players may hide their name on public channels (Menu > Visibility); locked channels always show it |
Config.Names.custom | true | players pick their radio name (Menu > Radio name); off = character names |
Config.Names.maxLength | 20 | characters |
Config.Volume.default / step | 60 / 10 | radio volume 0–100 |
Config.Death.powerOff | false | dead / downed players can never talk; true also takes them off the channel |
Config.Ui.scale | 1.0 | size of the radio on screen |
Config.Animation.hold | cellphone@ text anim | animation while the radio is open |
Config.Animation.prop | prop_cs_hand_radio, bone 28422 | prop model, bone and offsets |
Config.Animation.talkDefault | 'handheld' | talk style of a new character |
Config.Animation.talkStyles | handheld, shoulder | talk styles players can pick, see below |
Config.Animation.busyStyle | 'shoulder' | used instead of a prop style with a weapon in hand or in a vehicle |
Locked ranges
restricted = {
{ from = 1, to = 10, jobs = { police = 0, ambulance = 0 }, onDuty = true },
{ from = 11, to = 11, jobs = { police = 3 } }, -- 11.00 - 11.99: police grade 3+
{ from = 420, to = 420, gangs = { 'ballas' } },
},
from/toare whole numbers and include their decimals:from = 1, to = 10locks 1.00 … 10.99.jobs = { [job] = minimum grade }; a plain list{ 'police', 'ambulance' }also works (grade 0).onDuty = truerequires the job to be on duty. Going off duty takes the player off withincheckInterval.gangswork on Qbox / QBCore (and standalone viaConfig.Standalone.getGang). ESX has no gangs.- A player matching either
jobsorgangsmay join.
Names
[1] = 'LSPD / EMS 1' names 1.00 … 1.99 unless an exact frequency has its own name ([1.5] = 'Detectives').
Talk animations
While a player holds pma-voice's radio key, ns-radio plays their talk style (pma-voice's own radio animation is
turned off while ns-radio runs). 'none' is always offered in the menu.
talkStyles = {
{ id = 'handheld', dict = 'cellphone@', clip = 'cellphone_call_listen_base', prop = true },
{ id = 'shoulder', dict = 'random@arrests', clip = 'generic_radio_chatter', prop = false },
{ id = 'mystyle', label = 'My style', dict = 'my@anim', clip = 'my_clip', prop = true }, -- a streamed anim
},
label is only needed when the locales have no anim_<id> key. A dictionary that does not exist is skipped.
Notes
- Talking uses pma-voice's radio key (
voice_defaultRadio, default Left Alt) and its radio volume / mic click settings; ns-radio sets volume and clicks per character when the radio is powered on. - Keys on the radio: left soft key = Menu (Select / Save in menus), right soft key = Name (Back in menus), red key = power, the key under the left soft key = delete / back, 4-way pad: ↑ / ↓ channel (moves in lists), ← / → volume, middle = OK. Channel knob and volume knob: click the left / right half or scroll.
- Keyboard while the radio is open: digits and
.type a frequency, Enter = OK, Backspace = delete / back, ↑ / ↓, ← / →, + / - volume, ESC closes. In the name editor the keyboard types the name.