Configuration
Every option in STG Basic Radio config.lua, from the language and radio item to volume, job frequencies and notifications.
All settings live in stg-basicradio/config.lua. Restart the resource after a change.
Language
Config.Language = "en"Available: en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh, he, fi, no. To change a text, edit the matching file in stg-basicradio/locales/.
Radio item
Config.radioName = "radio"Name of the item that opens the radio. It must match the item name in your inventory.
Volume
Config.defaultVolume = 50Radio volume a player starts with, from 0 to 100. Each press of the arrow buttons changes it by 10. The volume is not saved, so it goes back to this value when the player rejoins.
Prop
Config.RadioProp = 'prop_cs_hand_radio'This option is in the config, but the current version does not use it: no prop is shown in the player's hand while the radio is open.
Notifications
Config.notify = function(type, message)
lib.notify({
title = 'Radio',
description = message,
type = type,
})
endCalled for every radio message: connected, disconnected, job frequency and volume changes. type is 'error' or 'success'. Replace the body to use your own notification system.
Job frequencies
Config.jobChannels = {
[1] = {
frequency = { "1", "2", "3", "4", "5" },
jobs = { "police", "bcso" }
},
[2] = {
frequency = { "2.0" },
jobs = { "ambulance" }
}
}Each entry locks a list of frequencies to a list of jobs. A player whose job is not in the list gets a notice and is not connected. Every frequency that is not listed here is open to everyone.
Prop
Type
The voice channel is the frequency as a number, so 2, 2.0 and 02 all join the same channel. In the default config, police on 2 and ambulance on 2.0 share one channel. Give every job its own whole numbers, for example 1 to 5 for police and 6 to 8 for ambulance, so the frequencies do not overlap.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.