Item radio
rcore_radiocar comes with folder [optional]/rcore_itemradio
This resource will allow you to use item from your inventory and install it to your car you're sitting in
how to install
Go to the rcore_radiocar/config.lua and switch this to true
Config.OnlyCarWhoHaveRadio = true
ESX
in config.lua switch framework to "1"
So it is looking like this
Config.Framework = "1"
Items needed
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('radiocar_dismounter', 'radiocar_dismounter', '1', '0', '1')
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('radiocar', 'radiocar', '1', '0', '1')
QBCore
in config.lua switch framework to "2"
So it is looking like this
Config.Framework = "2"
Items needed
['radiocar_dismounter'] = { ['name'] = 'radiocar_dismounter', ['label'] = 'radiocar_dismounter', ['weight'] = 100, ['type'] = 'item', ['image'] = 'radiocar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'radiocar_dismounter' },
['radiocar'] = { ['name'] = 'radiocar', ['label'] = 'radiocar', ['weight'] = 100, ['type'] = 'item', ['image'] = 'radiocar.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'radiocar' },
Using ox_inventory?
You will need to enable ox_inventory in config.lua
Config.ox_inv = true
ox_inventory/data/items.lua
['radiocar_dismounter'] = {
label = 'radiocar_dismounter',
weight = 250,
close = true,
consume = 0,
client = {},
server = {
export = 'rcore_itemradio.radiocar_dismounter',
},
},
['radiocar'] = {
label = 'radiocar',
weight = 250,
close = true,
consume = 0,
client = {},
server = {
export = 'rcore_itemradio.radiocar',
},
},
Usage in game