Installation
ox_lib is not required. When it is running, cc_lib uses it for progress bars, the skill check and notifications.
Requirements
| Required | cc_lib 1.7.0 or newer. It is free. |
| Optional | oxmysql. With it, stats are stored in MySQL. Without it, they are stored in resource KVP. |
| Optional | Any inventory, target, notify, progress, skill-check or dispatch script that cc_lib supports. See Compatibility. |
ox_lib is not required. When it is running, cc_lib uses it for progress bars, the skill check and notifications.
OneSync must be on (legacy or infinity), and the server needs an FXServer build that runs Lua 5.4.
Steps
- Put the
cc_dumpsterfolder in your resources folder. Keep the folder name: the NUI and the item icons load fromnui://cc_dumpster/.... - In
server.cfg, start it after your framework, inventory andcc_lib:cfgensure cc_lib ensure cc_dumpster - Add the items. Pick your inventory and paste one file:
Inventory File Where it goes ox_inventory install/items/ox_inventory.luaox_inventory/data/items.luaqb-inventory, ps-inventory, lj-inventory (qb-core items) install/items/qb-inventory.luaqb-core/shared/items.lua. Put the images frominstall/images/in your inventory's image folderESX (default inventory) install/items/esx.sqlRun it on your database Others (qs, codem, tgiann, core, origen) Use the qb-core or ox block as a template Your inventory's item list Skip any item you already have. On start, the console names every item it cannot find.
- ox_inventory only. Turn off ox's own dumpster loot. If you leave it on, every dumpster is a second, uncapped source of items:cfg
setr inventory:dumpsterloot [] - Give your admins the ACE permission:cfg
add_ace group.admin cc_dumpster.admin allow - Optional: Discord logs. Put webhook URLs in a secrets
.cfgfile and useset, neversetr(setrsends the value to every player):cfgset cc_dumpster_log_economy "https://discord.com/api/webhooks/..." set cc_dumpster_log_finds "https://discord.com/api/webhooks/..." set cc_dumpster_log_security "https://discord.com/api/webhooks/..." set cc_dumpster_log_admin "https://discord.com/api/webhooks/..." - Restart the server. The console prints
cc_dumpster config OK, or one line for each problem it found.
There is no SQL to run. The resource creates and upgrades its own tables (cc_dumpster_schema, cc_dumpster_players) on start. sql/install.sql is included if you would rather run it yourself.
Check that it works
- Join, walk to any dumpster and target it. You should see Dig through the dumpster. Without a target script, you get an
[E]key prompt instead. - Search it. A find card slides in. Search it again and you get "You already went through this one."
- Type
/scavengerto open the panel. - As an admin, type
/dumpsteradminin the server console. It prints the status.
Default locations
All default locations are on the vanilla map. The recycler stands at Rogers Salvage & Scrap in La Puerta. The four loot areas are Rockford Hills, Vinewood Hills, the industrial zone and the docks. Move the recycler with Config.Recycler.coords and the areas with ServerConfig.Areas. If you move the recycler, also change ui.away_body in your locale file, which tells players where it is.
Updating
- Back up
config.lua,server/config.lua,custom/,presets/andlocales/. - Replace the folder.
- Copy your backed-up files back over the new ones, then read the changelog for new options. A new option you have not added falls back to its default, and the console tells you about any option that is out of range.
The database upgrades itself on start. To keep your economy in one file that survives updates, use a preset (see Configuration).