GIG ScriptsGIG Scripts

Dumpster

Search dumpsters for loot, or climb in and hide.

Dependencies

  • ox_lib
  • Qbox, QB-Core or ESX (to give the loot)
  • ox_target or qb-target (cfg.target)
server.cfg
ensure gig-dumpster

No database, no asset pack. The lids and hiding animation use vanilla props.

Items

The resource does not add items of its own. Whatever you list in the loot table has to exist in your inventory. The defaults reference bread, water_bottle and phone, which most servers already have.

Config

cfg.search.items is the default loot table. chance is a percentage rolled per item, so a player can find several things in one search or nothing at all:

items = {
    { name = 'bread',        chance = 90, amount = 1 },
    { name = 'water_bottle', chance = 40, amount = 1 },
    { name = 'phone',        chance = 10, amount = 1 },
},

cfg.zones overrides the loot table inside a radius. Use it for weapon drops behind a specific store, or to make a neighbourhood poorer or richer:

zones = {
    {
        coords = vector3(426.94, -1520.76, 29.29),
        radius = 10.0,
        items  = { { name = 'weapon_pistol', chance = 90, amount = 1 } },
    },
},

cfg.cooldown.player is the wait between searches for one player, cfg.cooldown.dumpster the wait before the same dumpster can be searched again. Both are in seconds and enforced on the server.

cfg.models maps each dumpster prop to the parts used while you are inside it. Only touch it if you add custom dumpster props.

Controls

Walk up to a dumpster and use the target. Once inside, press E to climb out. The key is a FiveM key mapping, so players can rebind it.

On this page