Skip to content

Installation

ox_lib is not required. When it is running, cc_lib uses it for progress bars, the skill check and notifications.

Requirements

Requiredcc_lib 1.7.0 or newer. It is free.
Optionaloxmysql. With it, stats are stored in MySQL. Without it, they are stored in resource KVP.
OptionalAny 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

  1. Put the cc_dumpster folder in your resources folder. Keep the folder name: the NUI and the item icons load from nui://cc_dumpster/....
  2. In server.cfg, start it after your framework, inventory and cc_lib:
    cfg
    ensure cc_lib
    ensure cc_dumpster
  3. Add the items. Pick your inventory and paste one file:
    InventoryFileWhere it goes
    ox_inventoryinstall/items/ox_inventory.luaox_inventory/data/items.lua
    qb-inventory, ps-inventory, lj-inventory (qb-core items)install/items/qb-inventory.luaqb-core/shared/items.lua. Put the images from install/images/ in your inventory's image folder
    ESX (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 templateYour inventory's item list

    Skip any item you already have. On start, the console names every item it cannot find.

  4. 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 []
  5. Give your admins the ACE permission:
    cfg
    add_ace group.admin cc_dumpster.admin allow
  6. Optional: Discord logs. Put webhook URLs in a secrets .cfg file and use set, never setr (setr sends the value to every player):
    cfg
    set 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/..."
  7. 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

  1. 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.
  2. Search it. A find card slides in. Search it again and you get "You already went through this one."
  3. Type /scavenger to open the panel.
  4. As an admin, type /dumpsteradmin in 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

  1. Back up config.lua, server/config.lua, custom/, presets/ and locales/.
  2. Replace the folder.
  3. 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).