Vehicle Radio Display

View Sonoran Radio on a working, in-vehicle 3D display!

Vehicle Radio Display (Video Tutorial)

The vehicle radio display is a free Tebex script fully compatible with the free version of Sonoran Radio.

Sonoran Radio - Vehicle Display

Installation (Written)

1. Download the Script

"Purchase" the free vehicle radio display from the Sonoran Store.

Once purchased, see: How to download the script from your Keymaster account.

2. Install the script

A. Extract Folders

Extract the script's two folders (sonoran-radiodisplay and sonoran-radiodisplay_helper) to a folder in your server's resources folder called [sonoranradio].

Radio Display - Folders

B. Rename Config Files

Inside of the sonoran-radiodisplay folder:

  • Rename config.changeme.lua to config.lua

  • Rename radios.changeme.json to radios.json

C. Start the Resource

To start the display resource and give the auto-updater permissions to run, paste the following into your server.cfg

# Start the Radio Display Resource
ensure sonoran-radiodisplay

# Grant permissions to the auto-updater
add_ace resource.sonoran-radiodisplay command allow
add_ace resource.sonoran-radiodisplay_helper command allow

Configuration

The config.lua file allows you to customize the labels, ACE permissions, and more!

Default config.lua
Config = {}

Config.debug_mode = false -- Enable debug mode
Config.configuration_version = 1.0
Config.auto_update = true -- Enable auto updates

Config.lang = {
    addNewRadioHelp = 'Open the menu to begin spawning a new in-car model model',
    vehNotCompatible = 'This vehicle is not compatible with the in-car model placement system!',
    vehAlrRadio = 'This vehicle already has a valid in-car radio!',
    radioMenuHeader = 'Sonoran In-Car Radio',
    creditsPanel = 'Made by',
    spawningSubMenu = 'In-Car Radio Spawning',
    attachingSubMenu = 'Attaching',
    deletionSubMenu = 'Are you sure?',
    radioAttachMenuButton = 'Attach In-Car Radio',
    deleteMenuButton = 'Delete Current In-Car Radio',
    spawnMenuButton = 'Spawn In-Car Radio',
    deletionConfirmationButton = 'Yes, remove from all of these vehicles',
    deletionCancelButton = 'Cancel',
    deletionCancelled = 'In-Car Radio deletion cancelled',
    noRadioFound = 'No In-Car Radio is in this vehicle!',
    modelComboBox = 'Model:',
    vehAlrRadioNoti = '~r~This vehicle already has an In-Car Radio of this type',
    notInVeh = '~r~You must be in a vehicle!',
    vehicleBone = 'Radio - Vehicle Bone',
    object = "Object:",
    vehicleBoneComboBox = 'Vehicle Bone',
    objectName = 'Sonoran In-Car Radio',
    attachButton = 'Attach',
    detachButton = 'Detach',
    confirmPlacementButton = 'Apply to all of this vehicle model',
    cannotGoFaster = '~r~You cannot go any faster!',
    cannotGoSlower = '~r~You cannot go any slower!',
}

Config.commands = {
    carRadioMenu = 'radiodisplay',
    restricted = false -- should the radio display menu be restricted?
}

Config.permissionMode = "ace" -- Available Options: ace, framework, custom

-- Ace Permissions Section --
Config.acePerms = {
    aceObjectUseMenu = "sonoran.incarradio", -- Select the ace for placing new In-Car radios
    aceObjectAdminUseMenu = "sonoran.incarradio.admin", -- Select the ace for placing new In-Car radios into all vehicles of the same model
}

-- Framework Related Settings --
Config.framework = {
    frameworkType = "qb-core", -- This setting controls which framework is in use options are esx or qb-core
    civilianJobNames = {"unemployed"}, -- An array of job names that should be allowed to use the radio menu
    adminJobNames = {"admin"}, -- An array of job names that should be allowed to use the radio menu as an admin
    useCivilianJobListAsBlacklist = false, -- This will treat the civilian job list as a blacklist rather than a whitelist
}

-- Configuration For Custom Permissions Handling --
Config.custom = {
    checkPermsServerSide = true, -- If true the permission event will be sent out to the server side resource, this is recommended
    permissionCheck = function(_, type) -- This function will always be called server side.
        if type == 0 then -- Check permission to use the menu
            return true or false -- Return true if they have admin, return false if they don't
        end
    end
}

Config.general = {
    notificationType = "native", -- Available options: native, pNotify, okokNotify
    useAllowlistAsBlacklist = false, -- If true, the Config.allowlistedCars will be treated as an blacklist
}

Config.allowlistedCars = {
    "POLICE",
    "POLICE2",
    "POLICE3",
    "POLICE4",
    "FBI",
    "FBI2",
    "SHERIFF",
    "SHERIFF2",
}

Spawning the Radio Display

Use the /radiodisplay command while in a vehicle to spawn a new display.

  • Use the keys displayed at the bottom of your screen to move and rotate the display into position.

  • Select Attach to attach the display to your vehicle.

    • See the config.lua Config.acePerms.aceObjectUseMenu for permission restrictions.

  • Select Apply to all of this vehicle model to have the radio display automatically added whenever the vehicle type is spawned.

    • See the config.lua Config.acePerms.aceObjectAdminUseMenu for permission restrictions.

radios.json Property Explanation

Property Name
Example
Notes

ID

2

ID must be unique. No other radar can share this ID

Position

This is a table that contains the x, y, and z coords of the radar

Rotation

This is a table that contains the x, y, and z rotation of the radar

Vehicle

POLICE

This is the vehicles spawn code

Bone

-1

This is the index of the bone you would like to attach the radar to

Commands

Command Name
Command Description
Required Permissions

/radiodisplay

This command will initiate the radar spawning and attaching process

As configured

Default Vehicles

Vehicle Spawncode
Adds Radio by Default

FBI

yes

FBI2

yes

POLICE

yes

POLICE2

yes

POLICE3

yes

POLICE4

yes

POLICEOLD1

no

POLICEOLD2

no

SHERIFF

yes

SHERIFF2

yes

Additional Display Resources

Loving the radio display? Check out our in-vehicle police radar and radar detector displays!

Sonoran Store: Radar Display
Sonoran Store: Radar Detector

Changelog

v1.0.0

  • Initial Release

Last updated

Was this helpful?