PS inventory
Last updated
Was this helpful?
Last updated
Was this helpful?
GO TO ps-inventory/html/js/app.js -> line ~523 Copy and paste the content after some "};"
/* Copy from here /
} else if (itemData.name == "radio") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<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>"
);
} else if (itemData.name == "radio_powerbank") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Battery: </strong><span>" +
itemData.info.battery +
"%</span></p>"
);
} else if (itemData.name == "bat_low") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Battery level: </strong><span>" +
itemData.info.batLevel +
"%</span></p>"
);
} else if (itemData.name == "bat_medium") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Battery level: </strong><span>" +
itemData.info.batLevel +
"%</span></p>"
);
} else if (itemData.name == "bat_high") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Battery level: </strong><span>" +
itemData.info.batLevel +
"%</span></p>"
);
} else if (itemData.name == "radio_jammer") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Battery level: </strong><span>" +
itemData.info.battery +
" seconds</span></p>"
);
/ Copy up to here */
GO TO ps-inventory/server/main.lua -> line 2417 EXAMPLE
-- Copy from here
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
-- Copy up to here
GO TO qb-core/shared/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' },