Exports
919RADIO exposes a small integration surface for inventory frameworks and other resources. All exports use the resource name amzn_smartradio.
Client exports
`useRadioItem`
ox_inventory item-use handler. Validates the item through ox_inventory, then opens the radio for the local player.
-- Wired from ox_inventory data/items.lua:
-- client = { export = 'amzn_smartradio.useRadioItem' }
exports['amzn_smartradio']:useRadioItem(data, slot)Parameters
| Field | Type | Description |
|---|---|---|
data |
table | ox_inventory item use payload |
slot |
number | Inventory slot |
You normally do not call this yourself. Point your radio item's client.export at amzn_smartradio.useRadioItem as shown in Installation.
Server exports
919RADIO does not currently register server exports. Server-side item use for non-ox inventories is handled inside modules_editable/radio_item/.
Events
`radio:client:openFromItem`
Server → client. Opens the radio UI after a successful item use on non-ox inventories. Other resources can trigger this for a player who already passed your own item checks:
-- server
TriggerClientEvent('radio:client:openFromItem', targetSource)The client still enforces Config.RequireItem via Bridge.HasRadioItem() when opening.
Admin permissions
The /radioadmin command and admin config callbacks require ACE permission smartradio.admin or admin. See Installation — Admin access and Configuration.
Admin ACE logic lives in the editable bridge:
-- modules_editable/bridge/bridge_s.lua
function Bridge.IsRadioAdmin(playerId)
return IsPlayerAceAllowed(playerId, 'smartradio.admin')
or IsPlayerAceAllowed(playerId, 'admin')
endExample - ox_inventory item
['radio'] = {
label = 'Radio',
weight = 1000,
stack = false,
consume = 0,
close = true,
client = {
export = 'amzn_smartradio.useRadioItem',
},
},Example - open radio from a custom script
-- server: after your own item / job checks
TriggerClientEvent('radio:client:openFromItem', source)Prefer the inventory item path for normal gameplay so Config.RequireItem and framework item hooks stay consistent.