ORIGEN inventory
origen tutorial
STEP 1
GO TO origen_inventory/html/js/items.js Copy and paste the content after some displayMeta function
displayMeta('radio', (itemData, setTitle, setDescription) => {
setTitle('<p>' + itemData.label + '</p>');
setDescription('<p><strong>Alias: </strong><span>' + itemData.info.alias + '</span></p><p><strong>Freq: </strong><span>' + itemData.info.currentFreq + '</span></p><p><strong>Battery: </strong><span>' + itemData.info.battery + '</span></p>');
});
displayMeta('radio_powerbank', (itemData, setTitle, setDescription) => {
setTitle('<p>' + itemData.label + '</p>');
setDescription('<p><strong>Battery: </strong><span>' + itemData.info.battery + '%</span></p>');
});
displayMeta('bat_low', (itemData, setTitle, setDescription) => {
setTitle('<p>' + itemData.label + '</p>');
setDescription('<p><strong>Battery level: </strong><span>' + itemData.info.batLevel + '%</span></p>');
});
displayMeta('bat_medium', (itemData, setTitle, setDescription) => {
setTitle('<p>' + itemData.label + '</p>');
setDescription('<p><strong>Battery level: </strong><span>' + itemData.info.batLevel + '%</span></p>');
});
displayMeta('bat_high', (itemData, setTitle, setDescription) => {
setTitle('<p>' + itemData.label + '</p>');
setDescription('<p><strong>Battery level: </strong><span>' + itemData.info.batLevel + '%</span></p>');
});
displayMeta('radio_jammer', (itemData, setTitle, setDescription) => {
setTitle('<p>' + itemData.label + '</p>');
setDescription('<p><strong>Battery level: </strong><span>' + itemData.info.battery + ' seconds</span></p>');
});
STEP 2
GO TO origen_inventory\bridge\standalone\server -> Line ~71
if itemName == 'radio' then
local radioST = exports['stRadio']:CreateRadio(false, false, true)
metadata.id = radioST.id
metadata.prop = radioST.prop
metadata.alias = radioST.alias
metadata.currentFreq = radioST.currentFreq
metadata.freqFav = radioST.freqFav
metadata.freqLast = radioST.freqLast
metadata.password = radioST.password
metadata.modules = radioST.modules
metadata.favs = radioST.favs
metadata.secure = radioST.secure
metadata.battery = radioST.battery
metadata.api = radioST.api
end
if itemName == 'bat_low' then
metadata.batLevel = exports['stRadio']:CreateBattery(10, 100)
end
if itemName == 'bat_medium' then
metadata.batLevel = exports['stRadio']:CreateBattery(10, 100)
end
if itemName == 'bat_high' then
metadata.batLevel = exports['stRadio']:CreateBattery(10, 100)
end
if itemName == 'radio_powerbank' then
metadata.battery = 100
end
if itemName == 'radio_jammer' then
metadata.battery = exports['stRadio']:GetJammerTime()
end
STEP 3
GO TO origen_inventory/config/items.lua and copy and paste this
-- ST RADIO
['radio_red'] = {['name'] = 'radio_red',['label'] = 'Color frame red',['weight'] = 500,['type'] = 'item',['image'] = 'radio_red.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_blue'] = {['name'] = 'radio_blue',['label'] = 'Color frame blue',['weight'] = 500,['type'] = 'item',['image'] = 'radio_blue.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_purple'] = {['name'] = 'radio_purple',['label'] = 'Color frame purple',['weight'] = 500,['type'] = 'item',['image'] = 'radio_purple.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_pink'] = {['name'] = 'radio_pink',['label'] = 'Color frame pink',['weight'] = 500,['type'] = 'item',['image'] = 'radio_pink.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_lightblue'] = {['name'] = 'radio_lightblue',['label'] = 'Color frame lightblue',['weight'] = 500,['type'] = 'item',['image'] = 'radio_lightblue.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_orange'] = {['name'] = 'radio_orange',['label'] = 'Color frame orange',['weight'] = 500,['type'] = 'item',['image'] = 'radio_orange.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_yellow'] = {['name'] = 'radio_yellow',['label'] = 'Color frame yellow',['weight'] = 500,['type'] = 'item',['image'] = 'radio_yellow.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_green'] = {['name'] = 'radio_green',['label'] = 'Color frame green',['weight'] = 500,['type'] = 'item',['image'] = 'radio_green.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_white'] = {['name'] = 'radio_white',['label'] = 'Color frame white',['weight'] = 500,['type'] = 'item',['image'] = 'radio_white.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['radio_grey'] = {['name'] = 'radio_grey',['label'] = 'Color frame grey',['weight'] = 500,['type'] = 'item',['image'] = 'radio_grey.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Color frame for radio' },
['bat_low'] = {['name'] = 'bat_low',['label'] = 'Cheap battery',['weight'] = 500,['type'] = 'item',['image'] = 'bat_low.png',['unique'] = true,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Cheap battery, lasts little and fails a lot' },
['bat_medium'] = {['name'] = 'bat_medium',['label'] = 'Common battery',['weight'] = 500,['type'] = 'item',['image'] = 'bat_medium.png',['unique'] = true,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Battery in good condition, lasts a long time but can fail' },
['bat_high'] = {['name'] = 'bat_high',['label'] = 'Premium battery',['weight'] = 500,['type'] = 'item',['image'] = 'bat_high.png',['unique'] = true,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'High quality battery' },
['chip_5g'] = {['name'] = 'chip_5g',['label'] = '5G Chip',['weight'] = 500,['type'] = 'item',['image'] = 'chip_5g.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Chip for long distance talking' },
['chip_ghost'] = {['name'] = 'chip_ghost',['label'] = 'Ghost Chip',['weight'] = 500,['type'] = 'item',['image'] = 'chip_ghost.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Dont appear on any list' },
['chip_antihack'] = {['name'] = 'chip_antihack',['label'] = 'Antihack Chip',['weight'] = 500,['type'] = 'item',['image'] = 'chip_antihack.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Your radio will always be safe' },
['mic_walkie'] = {['name'] = 'mic_walkie',['label'] = 'Talkie Shoulder Microphone',['weight'] = 500,['type'] = 'item',['image'] = 'mic_walkie.png',['unique'] = false,['useable'] = false,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Walkie Talkie Shoulder Microphone' },
['hack_chip'] = {['name'] = 'hack_chip', ['label'] = 'Hack chip', ['weight'] = 500, ['type'] = 'item', ['image'] = 'hack_chip.png', ['unique'] = false,['useable'] = true,['shouldClose'] = false,['combinable'] = nil,['description'] = 'Unlock radios with password' },
['radio_server'] = {['name'] = 'radio_server',['label'] = 'Server',['weight'] = 500,['type'] = 'item',['image'] = 'radio_server.png',['unique'] = true,['useable'] = true,['shouldClose'] = false,['combinable'] = nil,['description'] = '' },
['radio_monitor'] = {['name'] = 'radio_monitor',['label'] = 'Monitor of hospital',['weight'] = 500,['type'] = 'item',['image'] = 'radio_monitor.png',['unique'] = true,['useable'] = true,['shouldClose'] = false,['combinable'] = nil,['description'] = '' },
['radio_server_bat'] = {['name'] = 'radio_server_bat',['label'] = 'Car battery',['weight'] = 500,['type'] = 'item',['image'] = 'radio_server_bat.png',['unique'] = true,['useable'] = true,['shouldClose'] = false,['combinable'] = nil,['description'] = '' },
['radio_cables'] = { ['name'] = 'radio_cables', ['label'] = 'Cables for battery', ['weight'] = 500, ['type'] = 'item', ['image'] = 'radio_cables.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = ''},
['radio_jammer'] = { ['name'] = 'radio_jammer', ['label'] = 'Radio Jammer', ['weight'] = 500, ['type'] = 'item', ['image'] = 'radio_jammer.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = ''},
['radio_powerbank'] = { ['name'] = 'radio_powerbank', ['label'] = 'Portable battery', ['weight'] = 500, ['type'] = 'item', ['image'] = 'radio_powerbank.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'battery for your radio'},
['radio_tool'] = { ['name'] = 'radio_tool', ['label'] = 'Tool for radio', ['weight'] = 500, ['type'] = 'item', ['image'] = 'radio_tool.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Tool for radios' },
['radio_broken'] = { ['name'] = 'radio_broken', ['label'] = 'Broken Radio', ['weight'] = 500, ['type'] = 'item', ['image'] = 'radio_broken.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Radio broked' },
['chip_waterproof'] = { ['name'] = 'chip_waterproof', ['label'] = 'Waterproof radio', ['weight'] = 500, ['type'] = 'item', ['image'] = 'chip_waterproof.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Waterproof for radio' },
Last updated
Was this helpful?