Backpack manufacturing business for FiveM (Qbox, QBCore, or ESX) with:
- Tiered craft and sell progression (5 tiers, 200 levels)
- Balanced anti-boost XP (must craft and sell to gain XP)
- Wearable storage bags with unique per-item stash data
- Shop, crafting, profile UI and achievements support
Features
-
Manufacturing progression
- Tier 1-4 progression across levels 1-100 (upgrades every 5 levels)
- Tier 5 progression across levels 101-200 (upgrades every 20 levels)
- Perk effects are automatically derived from player level/rank state
-
Anti-boost XP system
- XP is granted only when crafted and sold counts are paired per tier
- Farming lower tiers after unlocking higher tiers gives reduced XP
- Notifications explain when XP is earned (or why it is not)
-
Two bag item types
- Crafted product bags (used for manufacturing/selling loop)
- Wearable storage bags (
wear_*) with unique stash IDs
-
Immersive selling flow
- NPC walks in, player confirms with
E, handoff animation, NPC leaves with bag prop
- NPC walks in, player confirms with
-
UI
- Separate Bags category for wearable storage
- Tier lock checks for wearable purchases
- Profile/perk/manufacturing display in NUI
Dependencies
Required (see fxmanifest.lua):
ox_liboxmysqlcommunity_bridge(handles framework + inventory bridge)shock_ui— standalone FiveM NUI for notifications, progress, inputs, and hints;
Get shock_ui (public release)
-
shock_ui FiveM release (GitHub)
Installation
Install &ensureshock_ui -
Drop resource, run
install/sql/backpacks.sql -
Merge items (
install/items.luafor ox_inventory, or QB/ESX files) -
Start order:
ox_lib→oxmysql→ core →ox_inventory→community_bridge→shock_ui→shock-backpacks
Progression Model
- Tier unlocks derive from level (
maxTierfrom level config) - Rank/progression is computed from level and XP (no separate perk XP track)
- XP is awarded by paired tier actions:
- Crafting increases crafted count for tier
- Selling increases sold count for tier
- XP is granted when
min(crafted, sold)increases
Wearable Bag Storage
- Wearable bags are non-stack and unique
- Each bag gets a metadata UID
- Using a wearable bag can apply configured ped clothing (
Config.BagClothing) if enabled - Opening bag calls server callback to register/open stash:
- stash id format:
shock_backpack_bag_<uid>
- stash id format:
- If bag is lost, stash access is effectively lost with it
Security Hardening
- Server-side validation for purchase/sale inputs (item names, quantities, payment method)
- Server-side sale quantity cap enforcement (cannot exceed unlocked batch cap)
- Bag open callback rate-limited to reduce spam abuse
- Existing inventory, price, tier-lock and resource-origin checks remain enforced
Commands
- Sell start:
/sellbackpack - Sell stop:
/stopbackpacksell
Troubleshooting
-
Shop or sell money wrong / not applying (ESX vs QB)
- Try
Config.Framework = 'universal'so cash is resolved acrosscash/money. - Or set explicitly:
'esx','qbcore'/'qbox'. - Verify community_bridge matches your framework (Qbox vs QBCore vs ESX).
- Try
-
Bags not opening
- Verify wearable items use
client.export = 'shock-backpacks.openBackpack' - Confirm
Config.BagStoragehas an entry for eachwear_*item
- Verify wearable items use
-
No XP gained
- Craft and sell must be paired for the same tier
- Selling only (or crafting only) will eventually show no-XP hint
-
Tier lock confusion
- Check
shared/levelConfig.luamaxTiermapping - Check
Config.WearableBagTierfor shop-lock thresholds
- Check
| Code is accessible | No (configs editable via escrow_ignore, not full code) |
| Subscription-based | No ✓ |
| Lines (approximately) | ~6,500 |
| Requirements | community_bridge or shock-UI |
| Support | Yes |
