SpicyTasty DOCS
WEBSTOREDISCORDYOUTUBE
  • 🚨READ ME
    • 🌶️Welcome to SpicyTasty
  • 📚SCRIPTS
    • RADIO
      • Installation
        • STEP 1
        • STEP 2
        • STEP 3
        • STEP 4
          • ORIGEN inventory
          • AK47 inventory
          • PS inventory
          • CORE inventory
          • OX inventory
          • LJ inventory
          • QB inventory
          • TGIANN inventory
          • CODEM inventory
          • QS inventory
        • STEP 5
        • STEP 6 (OPTIONAL)
      • Common Errors
      • Snippets
        • Exports
        • pma-voice
        • Add to Store/Shop
      • Config
    • NOTIFY
      • Installation
        • STEP 1
        • STEP 2
        • STEP 3
        • STEP 4
          • ESX
          • QBCore
      • Exports
      • Job Banners
  • BLINDBOX
    • Installation
  • 🫒PROPS
    • BUBUS
      • Installation
        • STEP 1
        • STEP 2
        • STEP 3
        • STEP 4
        • Step 5
          • stUsableProps
          • stBlindBox
    • BOTS
      • Installation
        • STEP 1
        • STEP 2
        • STEP 3
        • STEP 4
        • Step 5
          • stUsableProps
          • stBlindBox
Powered by GitBook
On this page
  • Connect to frequency
  • Connect to a frequency and remove voice range
  • Get current battery
  • Check frequency permissions
  • Check frequency and voice range permissions
  • Get current frequency
  • Get list of players on player frequency
  • Get Radio information
  • Example of pma-voice to stRadio exports

Was this helpful?

  1. SCRIPTS
  2. RADIO
  3. Snippets

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)

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)
PreviousSnippetsNextpma-voice

Last updated 3 months ago

Was this helpful?

📚
This specific config on config_script file