NX Dumpster Diving
Installation
Add the items and images to ox_inventory and start the resource.
Install
Download the resource
Download
nx-dumpsterdivingfrom Granted Assets in the Cfx.re Portal and place the folder in your resources, for exampleresources/[nx]/nx-dumpsterdiving.Add the items to ox_inventory
Open
install/ox.luaand copy every item intoox_inventory/data/items.lua, inside the mainreturn { }table:ox_inventory/data/items.luareturn { -- ...your existing items ['trash_bag'] = { label = 'Bag of Trash', weight = 500, stack = true, close = true, description = 'A box full of random garbage. Someone might want it.', }, -- ...paste the rest from install/ox.lua }Add the item images
Copy every image from
install/images/intoox_inventory/web/images/. The file names already match the item names, so there's nothing to rename. The sell menu uses these same images.Ensure it after its dependencies
It must start after ESX and the ox resources:
server.cfgensure es_extended ensure ox_lib ensure ox_target ensure ox_inventory # ...your other resources ensure nx-dumpsterdivingIf it's inside a bracket folder like
[nx], make sureensure [nx]comes afterox_inventory.Configure it
The defaults work out of the box. You'll probably want to check the buyer location, the prices and the notification system.
Restart your server
Do a full restart (ox_inventory only loads new items on start). Then walk up to any dumpster, use third eye and pick Search Dumpster.
Don't skip the items
If the items aren't in ox_inventory, players will always get "your pockets are full" instead of loot, because the items can't be added to their inventory.
Updating
- Back up your
config.lua. - Download the new version and replace the whole folder.
- Copy your config values back in, checking for any new options. If the update adds new items, add them from
install/ox.luatoo. - Restart the server.