Configuration

A fully documented config.lua for the MD Radio Audio script.

Config = {}

-- [[ General Settings ]]
Config.Volume = 0.2 -- Volume of the background audio (0.0 to 1.0)
Config.Distance = 6.0

-- [[ Sound Toggle ]]
-- Set the default state for the sound being enabled (true/false).
-- The command /toggleraudio will toggle this during gameplay.
Config.DefaultSoundEnabled = true

-- [[ Timing Settings ]]
-- The time in seconds between random radio audio
Config.MinDelay = 15
Config.MaxDelay = 45

-- [[ Framework Settings ]]
-- Options: 'ESX', 'QBCore', 'Standalone'
-- !!! IMPORTANT: Set this correctly based on your server framework !!!
Config.Framework = 'QBCore'

-- [[ Job Settings ]]
-- Only used if Framework is set to ESX or QBCore
Config.AllowedJobs = {
    ['police'] = true,
    ['sheriff'] = true
}

-- [[ Vehicle Settings ]]
-- Class 18 is Emergency (Police, Fire, Ambulance)
-- You can add other classes if needed, e.g., 13 (Commercial/Utility)
Config.AllowedVehicleClasses = {
    [18] = true
}

-- [[ Sound Files ]]
-- A list of files in 'html/sounds/' to play randomly
-- !!! IMPORTANT: Ensure these files exist in m_radio_audio/html/sounds/ !!!
Config.RadioFiles = {
    'audio_1.mp3',
    'audio_2.mp3',
    'audio_3.mp3'
}

-- [[ Debug ]]
-- !!! IMPORTANT: Set to true to see helpful messages in your console !!!
-- This is really only used for debugging, shouldn't be enabled in a live environment --
Config.Debug = false

Last updated