Lua preview
-- Generated loot table (QBCore / ESX compatible)
-- Drop in as Config.LootTable and reference by item key.
Config = Config or {}
Config.LootTable = {
{
item = "sim_card",
label = "SIM Card",
category = "tech",
rarity = "common",
weight = 373,
chance = 37.3, -- %
minQty = 1,
maxQty = 5,
value = { min = 41, max = 130 },
},
{
item = "shotgun_shells",
label = "Shotgun Shells",
category = "ammo",
rarity = "common",
weight = 373,
chance = 37.3, -- %
minQty = 1,
maxQty = 4,
value = { min = 94, max = 241 },
},
{
item = "advanced_lockpick",
label = "Advanced Lockpick",
category = "tool",
rarity = "rare",
weight = 213,
chance = 21.3, -- %
minQty = 1,
maxQty = 2,
value = { min = 978, max = 1591 },
},
{
item = "rope",
label = "Rope",
category = "tool",
rarity = "common",
weight = 409,
chance = 40.9, -- %
minQty = 1,
maxQty = 4,
value = { min = 38, max = 98 },
},
{
item = "rolled_hundreds",
label = "Rolled Hundreds",
category = "cash",
rarity = "common",
weight = 334,
chance = 33.4, -- %
minQty = 1,
maxQty = 6,
value = { min = 303, max = 929 },
},
{
item = "sawed_off_shotgun",
label = "Sawed-Off Shotgun",
category = "weapon",
rarity = "uncommon",
weight = 182,
chance = 18.2, -- %
minQty = 1,
maxQty = 1,
value = { min = 2386, max = 3771 },
},
{
item = "pistol_ammo_box",
label = "Pistol Ammo Box",
category = "ammo",
rarity = "common",
weight = 530,
chance = 53, -- %
minQty = 1,
maxQty = 4,
value = { min = 87, max = 199 },
},
{
item = "assault_rifle",
label = "Assault Rifle",
category = "weapon",
rarity = "rare",
weight = 109,
chance = 10.9, -- %
minQty = 1,
maxQty = 1,
value = { min = 7629, max = 12080 },
},
{
item = "heavy_sniper",
label = "Heavy Sniper",
category = "weapon",
rarity = "epic",
weight = 52,
chance = 5.2, -- %
minQty = 1,
maxQty = 1,
value = { min = 19184, max = 25742 },
},
{
item = "raw_opium",
label = "Raw Opium",
category = "drug",
rarity = "rare",
weight = 164,
chance = 16.4, -- %
minQty = 1,
maxQty = 3,
value = { min = 2114, max = 4142 },
},
{
item = "surveillance_camera",
label = "Surveillance Camera",
category = "tech",
rarity = "uncommon",
weight = 188,
chance = 18.8, -- %
minQty = 1,
maxQty = 2,
value = { min = 409, max = 965 },
},
{
item = "repair_kit",
label = "Repair Kit",
category = "tool",
rarity = "uncommon",
weight = 296,
chance = 29.6, -- %
minQty = 1,
maxQty = 3,
value = { min = 331, max = 656 },
},
}
-- Example roll (server-side):
-- local roll = math.random(1, 100)
-- for _, entry in ipairs(Config.LootTable) do
-- if roll <= entry.chance then
-- local qty = math.random(entry.minQty, entry.maxQty)
-- exports.ox_inventory:AddItem(source, entry.item, qty)
-- break
-- end
-- end