Description
A capacity engine for ESX/QBCore servers where every item declares a weight and a slot footprint, and the server enforces a max-weight and max-slot ceiling on every add. It is the foundation a crafting/survival economy stands on — without a trustworthy capacity layer, every downstream loot, craft and trade feature can be cheated.
Prompt Template
You are writing a FiveM resource for esextended (stable, exports getSharedObject).
The full prompt template and its reference Lua are part of a one-time pack. Pick your depth — both are lifetime access, no subscription, ever.
- 60 prompts + syntax-validated reference Lua
- Lifetime access — pay once
- All 510 prompts — the full library
- Per-prompt profit/trend intelligence (CSV + playbook)
- Lifetime free updates — new niches as the market moves
$49 for 60 · $199 for all 510 + intelligence — one-time, no subscription.
Expected Output
The reference Lua at content/expected-outputs/crafting/01-weight-slot-inventory-core.lua implements a shared ItemDefs registry, a client render/add/close NUI flow, and a server that probes a copy of…
The full prompt template and its reference Lua are part of a one-time pack. Pick your depth — both are lifetime access, no subscription, ever.
- 60 prompts + syntax-validated reference Lua
- Lifetime access — pay once
- All 510 prompts — the full library
- Per-prompt profit/trend intelligence (CSV + playbook)
- Lifetime free updates — new niches as the market moves
$49 for 60 · $199 for all 510 + intelligence — one-time, no subscription.
Known Failure Modes & Corrective Prompt
- Client-trusted totals — Claude may sum weight in the NUI and send it; a cheat client then lies. Force
computeTotalsto run only in the server section. - Stack overflow into one slot — without
math.ceil(count / maxStack)the slot count is wrong and the cap never fires. - Half-applied add — mutating
store[item]before the capacity check leaves a partial state on rejection. Require a probe copy.
Corrective re-prompt: "Move all weight and slot computation into the server section only, compute used slots as the sum of math.ceil(count/maxStack) per item, and validate against a probe copy of the store so a rejected add never mutates the live inventory."
Framework Integration
- ESX:
exports['es_extended']:getSharedObject(); key the store byxPlayer.identifier. - QBCore:
exports['qb-core']:GetCoreObject(); resolve the player withQBCore.Functions.GetPlayer(source)and key byPlayer.PlayerData.citizenid. - QBox: use
exports.qbx_core:GetPlayer(source)and the ox_lib item metadata shape if you bridge to ox_inventory.
Profit Potential
$80–$1200/mo on Tebex (expected ~$300). [INFERRED] priced inside the $50-389 standalone-script band against the signal-scraper corpus (tebex_snapshot n=100, median seller $11.85K/mo) for a saturated inventory niche.
Trend Signal
↘ saturated — corpus: ox_inventory (ox_* family, sibling of ox_mdt/ox_doorlock/ox_fuel) ships weight+slot natively and is free/dominant — paid base inventories compete against a free standard.
Sales Angle
Sell to teams who want to own their inventory logic instead of forking the free standard — a small, readable, framework-agnostic capacity core. Recommended Tebex price: $59.
Difficulty & Ship Time
advanced · ships in 1 day.