Creating a new item in ox_inventory is really easy.
Add the following snippet to ox_inventory/data/items.lua. The item image is already there by default.
['radio'] = {
label = 'Radio',
weight = 100,
stack = true,
close = true,
client = {
export = 'ac_radio.openRadio',
remove = function(total)
-- Disconnets a player from the radio when all his radio items are removed.
if total < 1 and GetConvar('radio_noRadioDisconnect', 'true') == 'true' then
exports.ac_radio:leaveRadio()
end
end
}
}For more detailed steps, visit the official "Creating items" guide.