Exports

Connect to frequency

"freq" Must be a number
exports['stRadio']:setRadioChannel(freq)

Connect to a frequency and remove voice range

"freq" Must be a number
exports['stRadio']:setnoRangeChannel(freq)

Get current battery

-- This will return the number between 0 and 100.
exports['stRadio']:GetBattery()

Check frequency permissions

The export automatically checks if the frequency is for a job.

  • If it is not in the job list it will return true.

  • If it is in the job list and has permission it will return true.

  • If it is in the job list and does not have permission it will return false.

exports['stRadio']:HasPlayerJobAllowed(freq)

Check frequency and voice range permissions

This export is to check if the config range in that frequency is activated or not, and automatically checks if the frequency is for a job.

  • If it is not in the job list it will return false.

  • If it is in the job list and does not have permission it will return false.

  • If it is in the job list and has permission it will return and has permissions in range return true.

exports['stRadio']:isNotRanged(freq)
This specific config on config_script file

Get current frequency

exports['stRadio']:getCurrentFreq()

Get list of players on player frequency

This will return the list of players and more information on the frequency that player is on.

exports['stRadio']:getCurrentListFreq()

Get Radio information

This will return all information from the player's radio. If it has no radio or is empty it will return false.

id          -> string
prop        -> string
alias       -> string
password    -> string
currentFreq -> number
freqFav     -> number
freqLast    -> number
secure      -> number
battery     -> number
modules     -> table
favs        -> table
api         -> table
exports['stRadio']:GetRadioInformation()
Example
local radioInfo = exports['pma-voice']:GetRadioInformation()
if radioInfo then
    local chip = radioInfo.modules.chip
    --- your code
end

Example of pma-voice to stRadio exports

exports['pma-voice']:setRadioChannel(freq)
to 
exports['stRadio']:setRadioChannel(freq)

Last updated

Was this helpful?