CODEM inventory
Installation CODEM on stRadio
Last updated
Was this helpful?
Installation CODEM on stRadio
Last updated
Was this helpful?
GO TO codem-inventory/config/metadata.js -Copy and paste the content after some
} else if (item.name == "radio") {
let infoData = [
{ label: "Alias", value: iteminfo.alias || "Unknown" },
{ label: "Freq", value: iteminfo.currentFreq || "Unknown" },
{ label: "Battery", value: iteminfo.battery || "Unknown" },
];
returnString = infoData;
} else if (item.name.match("radio_powerbank")) {
let infoData = [
{ label: "Battery", value: iteminfo.battery || "Unknown" },
];
returnString = infoData;
} else if (item.name.match("bat_low")) {
let infoData = [
{ label: "Battery", value: iteminfo.batLevel || "Unknown" },
];
returnString = infoData;
} else if (item.name.match("bat_medium")) {
let infoData = [
{ label: "Battery", value: iteminfo.batLevel || "Unknown" },
];
returnString = infoData;
} else if (item.name.match("bat_high")) {
let infoData = [
{ label: "Battery", value: iteminfo.batLevel || "Unknown" },
];
returnString = infoData;
} else if (item.name.match("radio_jammer")) {
let infoData = [
{ label: "Battery", value: iteminfo.battery || "Unknown" },
];
returnString = infoData;
STEP 2
GO TO codem-inventory/editable/serverexport.lua -> line 599
elseif itemData.name == 'radio' then
local radioST = exports['stRadio']:CreateRadio(false, false, true)
info.id = radioST.id
info.prop = radioST.prop
info.alias = radioST.alias
info.currentFreq = radioST.currentFreq
info.freqFav = radioST.freqFav
info.freqLast = radioST.freqLast
info.password = radioST.password
info.modules = radioST.modules
info.favs = radioST.favs
info.secure = radioST.secure
info.battery = radioST.battery
info.api = radioST.api
elseif itemData.name == 'bat_low' then
info.batLevel = exports['stRadio']:CreateBattery(10, 100)
elseif itemData.name == 'bat_medium' then
info.batLevel = exports['stRadio']:CreateBattery(10, 100)
elseif itemData.name == 'bat_high' then
info.batLevel = exports['stRadio']:CreateBattery(10, 100)
elseif itemData.name == 'radio_powerbank' then
info.battery = 100
elseif itemData.name == 'radio_jammer' then
info.battery = exports['stRadio']:GetJammerTime()
end
GO TO qb-core/shared/items.lua and copy and paste this
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 = '' },
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' },
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 broken' },
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_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_jammer = { name = 'radio_jammer', label = 'Radio Jammer', weight = 500, type = 'item', image = 'radio_jammer.png', unique = true, useable = true, shouldClose = false, combinable = nil, description = '' },