(Unofficial) Ox_inventory Support for SCNP25 Radio Script
Adds SCNP25 item support for Ox_inventory.
It is recommended to randomize all codeplug names to limit users to accessing radios only through the item system.
The example below should be placed in data > items.lua.
It shows how to create a radio item in Ox_inventory:
['expradio'] = {
label = 'Example Radio', -- What shows up when you hover over the radio
weight = -1,
stack = false,
close = true,
consume = 0,
server = {
export = 'scnp25_ox.radiotoolbox'
}
},Depending on the radio model you are using, you will need to rename the image to match the item name.
Example: if your item is leoradio, rename APX900.png to leoradio.png.
After renaming, upload the images to Ox_inventory > web > images.
Add your radio items to config.lua.
Instructions and an example item are included in the file comments.
- SCNP25 (Required)
- Ox_inventory (Required)
- Ox_lib (Optional) — If you do not wish to use Ox_lib, remove the following line from
server.lua:TriggerClientEvent('ox_lib:notify', inventory.id, {type = 'success', description = 'Radio assigned by ' .. dept})
This is an unofficial SCNP25 script.
SCN will not provide support for this add-on.
- Add a battery item
- Automatically turn off the radio when it is removed from the inventory