Radio
Frequencies
A frequency is a group of channels. Players join one channel at a time and talk to everyone in it.
| Work | Private | |
|---|---|---|
| Granted by | Job | Join code or invite |
| Channels | Defined in the config | Created by the owner |
| Chat history | Cleared on restart | Cleared on restart |
| Persistence | Config-driven | Stored in the database |
Work frequencies
config/radio.lua. Keyed by job name: a player receives the frequency on login and loses it when their job changes.
Config.WorkFrequencies = {
police = {
group = 'Police', -- label shown in the frequencies tab
icon = 'shield', -- id from web/src/utils/icons.js
color = '#3B82F6',
prefixes = { 'AIR', 'K-9', 'SWAT' }, -- callsigns offered on this frequency
dragGrade = 2, -- minimum job grade to drag members between channels
channels = {
{ id = 'police_dispatch', label = 'DISPATCH', max = 50 },
{ id = 'police_alpha', label = 'PATROL ALPHA', max = 20 },
},
},
}| Field | Description |
|---|---|
channels[].id | Unique internal id, must not collide with another channel |
channels[].label | Name shown in the UI |
channels[].max | Maximum simultaneous members |
Add a new job by copying the police block and renaming the key to the job name.
Private frequencies
Players create these from the second tab of the UI. The creator becomes the admin: they can add or delete channels, move members between channels and kick them. Anyone with the generated code can join.
Config.PrivateFreq = {
InactiveDays = 14, -- unused frequencies are deleted after this many days
CodeLength = 6,
CleanupInterval = 60, -- minutes between inactivity sweeps
Invite = {
MaxDistance = 15.0, -- metres to list a nearby player as invitable
Timeout = 30, -- seconds before an invite expires
},
}Creation limits
Limits are resolved by ACE permission, top to bottom: the first tier the player matches wins. Players matching none get Default.
Tiers = {
{ ace = 'of_radio.tier2', maxChannels = 10, maxMembers = 50, maxOwned = 5 },
{ ace = 'of_radio.tier1', maxChannels = 5, maxMembers = 20, maxOwned = 3 },
},
Default = { maxChannels = 2, maxMembers = 8, maxOwned = 3 },| Limit | Applies to |
|---|---|
maxChannels | Channels inside one frequency |
maxMembers | Members per channel |
maxOwned | Frequencies the player can own at once |
Grant a tier in server.cfg:
add_ace group.vip of_radio.tier1 allow
add_principal identifier.license:xxxxxxxx group.vip