Lua preview
-- Generated loot table (QBCore / ESX compatible)
-- Drop in as Config.LootTable and reference by item key.
Config = Config or {}
Config.LootTable = {
{
item = "warehouse_key",
label = "Warehouse Key",
category = "key",
rarity = "rare",
weight = 130,
chance = 13, -- %
minQty = 1,
maxQty = 1,
value = { min = 1731, max = 3234 },
},
{
item = "sniper_rounds",
label = "Sniper Rounds",
category = "ammo",
rarity = "rare",
weight = 132,
chance = 13.2, -- %
minQty = 1,
maxQty = 2,
value = { min = 617, max = 1144 },
},
{
item = "pistol_ammo_box",
label = "Pistol Ammo Box",
category = "ammo",
rarity = "common",
weight = 556,
chance = 55.6, -- %
minQty = 1,
maxQty = 4,
value = { min = 85, max = 207 },
},
{
item = "usb_drive",
label = "USB Drive",
category = "tech",
rarity = "uncommon",
weight = 345,
chance = 34.5, -- %
minQty = 1,
maxQty = 3,
value = { min = 233, max = 563 },
},
{
item = "drill_kit",
label = "Drill Kit",
category = "tool",
rarity = "rare",
weight = 172,
chance = 17.2, -- %
minQty = 1,
maxQty = 1,
value = { min = 2151, max = 3869 },
},
{
item = "heavy_sniper",
label = "Heavy Sniper",
category = "weapon",
rarity = "epic",
weight = 52,
chance = 5.2, -- %
minQty = 1,
maxQty = 1,
value = { min = 16218, max = 29099 },
},
{
item = "gold_bar",
label = "Gold Bar",
category = "cash",
rarity = "epic",
weight = 90,
chance = 9, -- %
minQty = 1,
maxQty = 2,
value = { min = 22419, max = 43006 },
},
{
item = "gold_chain",
label = "Gold Chain",
category = "jewelry",
rarity = "uncommon",
weight = 327,
chance = 32.7, -- %
minQty = 1,
maxQty = 2,
value = { min = 938, max = 2170 },
},
{
item = "pearl_necklace",
label = "Pearl Necklace",
category = "jewelry",
rarity = "rare",
weight = 194,
chance = 19.4, -- %
minQty = 1,
maxQty = 1,
value = { min = 3007, max = 4272 },
},
{
item = "dirty_money_roll",
label = "Dirty Money Roll",
category = "cash",
rarity = "common",
weight = 353,
chance = 35.3, -- %
minQty = 1,
maxQty = 4,
value = { min = 608, max = 1599 },
},
{
item = "weed_baggie",
label = "Weed Baggie",
category = "drug",
rarity = "common",
weight = 426,
chance = 42.6, -- %
minQty = 2,
maxQty = 14,
value = { min = 59, max = 158 },
},
{
item = "weed_brick",
label = "Weed Brick",
category = "drug",
rarity = "uncommon",
weight = 324,
chance = 32.4, -- %
minQty = 1,
maxQty = 4,
value = { min = 863, max = 1672 },
},
}
-- 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