STG ScriptsDocumentation
Radio System V2

Installation

Install STG Radio System V2 on your FiveM server in six steps, including the database table and the radio and jammer items.

Radio System V2

STG Radio System V2

ESXQBCoreQBOX
View in store

Download the script

Sign in to the Cfx.re portal with the account you used at checkout and download stg-radiov2 from Granted Assets.

Move the resource

Extract the zip and place the stg-radiov2 folder inside the [STG] category folder in your resources directory. Keep the folder name exactly stg-radiov2. The [SETUP] folder next to it holds the SQL file and item images, it does not go into resources.

resources/
└── [STG]/
    └── stg-radiov2/

Install the dependencies

Radio System V2 needs ox_lib, oxmysql and one voice resource: pma-voice, mumble-voip or saltychat. Skip this step if your server already runs them.

Import the database table

Run [SETUP]/sql.sql on your server database, for example with HeidiSQL or phpMyAdmin. It creates the stg_radio table that stores each character's radio nickname and favorite channels.

CREATE TABLE `stg_radio` (
    `identifier` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
    `nick` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
    `favorite` LONGTEXT NULL DEFAULT '{}' COLLATE 'utf8_general_ci'
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

Add the items

The script uses two items: radio to open the radio and jammer to plant a signal jammer. Add any your inventory does not have yet. Item images are in [SETUP]/images/.

Add to ox_inventory/data/items.lua:

['radio'] = {
    label = 'Radio',
    weight = 1000,
    stack = false,
},

['jammer'] = {
    label = 'Jammer',
    weight = 1000,
    stack = false,
},

Copy radio.png and jammer.png to ox_inventory/web/images/.

Add to qb-core/shared/items.lua:

radio = { name = 'radio', label = 'Radio', weight = 2000, type = 'item', image = 'radio.png', unique = true, useable = true, shouldClose = true, description = 'You can communicate with this through a signal' },
jammer = { name = 'jammer', label = 'Jammer', weight = 2000, type = 'item', image = 'jammer.png', unique = true, useable = true, shouldClose = true, description = 'Blocks radio signals around it' },

Copy radio.png and jammer.png to qb-inventory/html/images/.

Run on your database:

INSERT INTO items (name, label) VALUES
    ('radio', 'Radio'),
    ('jammer', 'Jammer');

If you use other item names, change Config.ItemName and Config.Jammer.item to match.

Start the script

Make sure [STG] starts after your framework, oxmysql, ox_lib and your voice resource in server.cfg:

ensure oxmysql
ensure ox_lib
# your framework: es_extended or qb-core
# your voice resource: pma-voice, mumble-voip or saltychat
ensure [STG]

Then restart the whole server.

Nothing happens or the console shows an error? See Common Errors.

Next steps

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page