Halo Radio
Installation
Import one table, add the radio item with its export, set your framework and start it after pma-voice.
Steps
1
Copy the resource
Place the
halo_radio folder in your resources directory.2
Run the SQL
Import
sql.sql.3
Add the radio item
Add (or update) the
radio item in ox_inventory with client.export = 'halo_radio.use' — use export, not event.4
Set your framework
Set
framework in config/config.lua. On QBox, also uncomment @qbx_core/modules/playerdata.lua in fxmanifest.lua.5
Set your channels
Edit
channels — the shipped job names (lspd, rangers, troopers, fib) are examples. See Configuration.6
Add to server.cfg
After pma-voice, ox_inventory and your framework (and dh_bridge if you use it).
SQL
sql.sql
CREATE TABLE IF NOT EXISTS `halo_radios_faves` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`charId` varchar(60) NOT NULL,
`radio` decimal(10,2) NOT NULL DEFAULT 0.00,
PRIMARY KEY (`id`),
KEY `charId` (`charId`)
) ENGINE=InnoDB;
Radio item
ox_inventory/data/items.lua
['radio'] = {
label = 'Radio',
weight = 500,
stack = false,
close = true,
client = {
export = 'halo_radio.use',
},
},
server.cfg
server.cfg
ensure oxmysql
ensure ox_lib
ensure pma-voice
# framework (one of):
ensure es_extended
# ensure qb-core
# ensure qbx_core
ensure ox_inventory
# ensure dh_bridge # only if Config.framework = 'dh_bridge'
ensure halo_radio
Troubleshooting
"You do not have a radio on you." — The player needs the
radio item."You can not connect to this signal!" — The channel is job/gang restricted and the player doesn't match.
Using the item crashes or does nothing — The item must use
client.export = 'halo_radio.use', not client.event.No one hears each other on a trunked channel — They're in different zones. Anyone outside every zone is on the control frequency (the channel number itself).
QBox job/gang not detected — Uncomment the
@qbx_core/modules/playerdata.lua line in fxmanifest.lua.