gta6/prompts
crafting
Vaultintermediatecrafting

Nested Containers & Backpacks

ESX/QBCore container items (backpacks, duffels, crates) that open their own sub-inventory with an independent server-enforced weight cap.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~85 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

Nested containers for ESX/QBCore: a backpack, duffel or crate item opens its own sub-inventory with an independent weight cap, letting players expand and organize their carry. The server owns each container instance and enforces its cap, so storage cannot be cheated or duplicated.

Prompt Template

You are writing a FiveM resource for esextended (stable, exports getSharedObject).

πŸ”’ Eyes-only β€” locked prompt body

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.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Expected Output

The reference Lua at content/expected-outputs/crafting/04-nested-containers-backpacks.lua implements per-instance container records, a server usedWeight check against each type's independent cap, and…

πŸ”’ Eyes-only β€” locked prompt body

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.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Client-tracked contents β€” storing the bag's items in NUI lets a cheat client dupe or overflow. Keep containers server-side.
  • Container-in-container β€” allowing a backpack inside a duffel creates infinite nested weight. Reject container types in cont:store.
  • Wrong weight sum β€” a flawed usedWeight lets the cap never fire. Sum ItemWeight*count over all contents each time.

Corrective re-prompt: "Keep every container's contents and weight cap server-side, reject any cont:store whose item type is itself a container, and recompute usedWeight as the sum of ItemWeight*count over all contents before allowing the add."

Framework Integration

  • ESX: exports['es_extended']:getSharedObject(); tie a containerId to the bag item's metadata.
  • QBCore: exports['qb-core']:GetCoreObject(), QBCore.Functions.GetPlayer(source); store the containerId in item info.
  • QBox: exports.qbx_core:GetPlayer(source); ox_inventory already models containers via stash metadata β€” bridge cont:open to its stash API.

Profit Potential

$250–$3500/mo on Tebex (expected ~$900). [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 rising container niche.

Trend Signal

β†— rising β€” corpus: ox_inventory container metadata is a live ecosystem primitive; premium nested-container UIs recur in tebex_topsellers.

Sales Angle

The carry-expansion upsell every survival/RP server wants β€” a clean sub-inventory UI on top of whatever base inventory the server already runs. Recommended Tebex price: $79.

Difficulty & Ship Time

intermediate Β· ships in 1 day.