Add to Store/Shop

The radio works with metadata, and this is generated automatically the first time if it has no metadata. To avoid this or any bug it is recommended to add to the store directly the code that gives the

Radio

The export to create the radio is this

exports['stRadio']:CreateRadio(false, false, true)

How to add in script shops

../config.lua
 {  name = 'radio', price = 250, amount = 50, info = exports['stRadio']:CreateRadio(false, false, true)},

Battery

The export to give battery %

exports['stRadio']:CreateBattery(10, 100) -- random number from 10 to 100

How to add in script shops

../config.lua
{ name = 'bat_low', price = 250, amount = 50, info = {batLevel = 100}},
{ name = 'bat_medium', price = 250, amount = 50, info = {batLevel = 100}},
{ name = 'bat_high', price = 250, amount = 50, info = {batLevel = 100}},

Jammer

The export to get battery %

exports['stRadio']:GetJammerTime()

How to add in script shops

../config.lua
{ name = 'radio_jammer', price = 250, amount = 50, info = 120},

Power Bank

The export to give battery %

exports['stRadio']:CreateBattery(1, 100) -- random number from 10 to 100

How to add in script shops

../config.lua
{ name = 'radio_powerbank', price = 250, amount = 50, info = {battery = 100},

Last updated

Was this helpful?