Config

All configuration is done in shared/config.lua.

Basic settings

Config.Debug = false -- Enable/disable debug mode
Config.DisableDefaultRadio = true -- Disable default GTA V radio

Framework configuration

Config.Framework = {
    ESX = {
        resourceName = 'es_extended',
        export = 'getSharedObject'
    },
    QBCore = {
        resourceName = "qb-core",
        export = "GetCoreObject",
    }
}

Target

Config.Target = {
    enabled = true, -- false = use markers instead of ox_target
    resource = 'ox_target', -- Target resource name
}

Keybinds

Config.Radio = {
    keybind = {
        enabled = true,
        name = 'car_radio',
        description = 'Car Radio',
        defaultKey = 'F9' -- Default key
    }
}

Sound and control

Config.Radio = {
    onlyHostCanControl = true, -- Only host can control radio in vehicle
    sound = {
        vehicleRange = 10.0, -- Vehicle radio sound range
        defaultVolume = 0.15 -- Default volume
    }
}

Radio locations

Config.Radio.locations = {
    ['mechanic_garage'] = {
        coords = vector3(133.4, -3031.3, 7.0), -- Location coordinates
        radius = 10.0, -- Interaction radius
        label = 'Mechanic Garage', -- Location label
        jobs = {'mechanic'}, -- Required jobs
        
        -- Object configuration (optional)
        object = {
            model = 'prop_boombox_01',
            heading = 90.0
        },
        
        -- Marker configuration (when target disabled)
        marker = {
            type = 1,
            size = vector3(1.5, 1.5, 1.0),
            color = { r = 0, g = 255, b = 0, a = 100 }
        },
        
        -- Default playback queue
        defaultQueue = {
            {
                title = 'RADIO ZET',
                url = 'https://29053.live.streamtheworld.com/RADIO_ZET.mp3',
                artist = 'Polish Radio Hits'
            }
        }
    }
}

Default stations

Config.Radio.defaultStations = {
    {
        name = 'POP RADIO',
        url = 'https://sluchaj.link:5443/popradio',
        description = 'Best Pop Hits'
    },
    {
        name = 'RADIO ZET',
        url = 'https://29053.live.streamtheworld.com/RADIO_ZET.mp3',
        description = 'Polish Radio Hits'
    }
}

Permission system

Config.Radio.permissions = {
    enabled = false, -- Enable/disable permission system
    
    -- Permission modes:
    -- 'everyone' - access for all players
    -- 'vehicle' - only vehicle owners
    -- 'player' - specific players
    -- 'combined' - combination of vehicle + player
    mode = 'player',
    
    vehicle = {
        useOwnership = true, -- Check vehicle ownership
        usePermissionTable = true, -- Use permission table
        allowSharedAccess = false, -- Allow others to use someone else's radio
    },
    
    player = {
        usePermissionTable = true, -- Use permission table
    },
    
    locations = {
        usePermissions = false, -- Use permissions for locations
    }
}

Public sessions

Config.Radio.publicSessions = {
    enabled = true,
    sessionTimeout = 300, -- Delete session after x seconds of inactivity
    maxListenersPerSession = 20, -- Maximum listeners per session
}

Admin commands

Config.AdminCommand = {
    radioGive = {
        enabled = true,
        commandName = 'radiogive',
        requiredGroup = { 'superadmin' }
    },
    radioRemove = {
        enabled = true,
        commandName = 'radioremove',
        requiredGroup = { 'superadmin' }
    },
    radioCheck = {
        enabled = true,
        commandName = 'radiocheck',
        requiredGroup = { 'superadmin' }
    },
}

Give permissions

Grant radio access to players, vehicles or locations

/radiogive [player/vehicle/location] [id/plate/name] [player_id (for locations)]

Examples:

# Give permission to player with ID 1
/radiogive player 1

# Give permission to vehicle with plate ABC123
/radiogive vehicle ABC123

# Give location permission to player ID 1 for mechanic_garage
/radiogive location mechanic_garage 1

Remove permissions

Remove radio access

/radioremove [player/vehicle/location] [id/plate/name] [player_id (for locations)]

Examples:

# Remove permission from player with ID 1
/radioremove player 1

# Remove permission from vehicle with plate ABC123
/radioremove vehicle ABC123

# Remove location permission from player ID 1 for mechanic_garage
/radioremove location mechanic_garage 1

Check permissions

Check existing permissions

/radiocheck [player/vehicle/location/all] [id/plate/name] [player_id (for locations)]

Examples:

# Display all permissions
/radiocheck all

# Check permissions for player with ID 1
/radiocheck player 1

# Check permissions for vehicle with plate ABC123
/radiocheck vehicle ABC123

# Check location permission for player ID 1 at mechanic_garage
/radiocheck location mechanic_garage 1

Last updated