Portable stash backpacks for ox_inventory + ox_lib on Qbox (qbx_core) stacks—install those resources first via your framework’s docs.
Each bag exposes a stash stored in metadata (trade-safe, duplication-safe nesting checks). Bags can render streamed props tied to drawable IDs configured per gender.
- Place
w2f-backpackunderresources/…untouched (keep the folder namew2f-backpack). - Start after deps in
server.cfg:ensure ox_lib ensure ox_inventory ensure w2f-backpack - Copy the snippet below into
ox_inventory/data/items.lua(duplicate keys collide—merge carefully):
['small_backpack'] = {
label = 'Small Backpack',
weight = 750,
stack = false,
close = false,
consume = 0,
description = 'A compact backpack for extra storage.',
server = {
export = 'w2f-backpack.useBackpack',
},
},
['medium_backpack'] = {
label = 'Medium Backpack',
weight = 1200,
stack = false,
close = false,
consume = 0,
description = 'A reliable backpack with extra space.',
server = {
export = 'w2f-backpack.useBackpack',
},
},
['large_backpack'] = {
label = 'Large Backpack',
weight = 1800,
stack = false,
close = false,
consume = 0,
description = 'A large backpack with heavy capacity.',
server = {
export = 'w2f-backpack.useBackpack',
},
},
['duffle_bag'] = {
label = 'Duffle Bag',
weight = 2200,
stack = false,
close = false,
consume = 0,
description = 'A heavy duffle bag for carrying gear.',
server = {
export = 'w2f-backpack.useBackpack',
},
},-
Tune
config/config.lua:Config.Backpacks— capacities + metadata tagsConfig.Clothing— streamed bag component IDs (per gender where needed)Config.Security— blocked states (death, vehicles, recursion)Config.Animation— open animationsConfig.Notify— strings / icons feeding ox_lib notifies
-
Item icons: add PNGs for each backpack key and sync them across to ox_inventory (see
install_assets/README.md).
Restart ox_inventory after altering items.
| Command | What it fixes |
|---|---|
/fixbag |
Re-sync bag props if clothing desync |