twinded_trashbin
A trashbin searching script for RedM. Players can search trashbins scattered across the map to find random loot, or look inside to access a shared stash inventory.
Dependencies
| Resource | Required | Notes |
|---|---|---|
| twinded_libs | Yes | Free shared library |
Compatibility
Cross-framework — works with VORP, RSG, QBCore RedM, QRCore, RedEM:RP, RPX, TPZ-CORE, and FRP. Framework is auto-detected by twinded_libs.
Installation
bash
ensure twinded_libs
ensure twinded_trashbinConfig Files
| File | Description |
|---|---|
settings.lua | Main settings, trashbin locations, loot tables, cooldowns |
lang.lua | Translation strings |
webhook.lua | Custom webhook handler (when Config.Webhook.type = 'custom') |
See the Configuration guide for how to override these files.
Configuration Reference
settings.lua
| Option | Type | Default | Description |
|---|---|---|---|
Config.SearchTime | number | 10000 | Search duration (milliseconds) |
Config.TrashbinBlip | boolean | false | Show map blips for trashbin locations |
Config.TimeToRefill | table | { 300, 600 } | Random cooldown range (seconds) between searches { min, max } |
Config.TrashSlots | number | 500 | Inventory slots per shared stash |
Config.ClearCommand | string | "cleartrash" | Admin command to clear all trashbin inventories |
Config.AdminGroups | table | { ["superadmin"]=true, ["admin"]=true } | Groups allowed to use admin command (hash table format) |
Config.Webhook.type | string | "discord" | 'discord' or 'custom' |
Config.Webhook.url | string | "" | Discord webhook URL |
Loot Table Format
Each item in the loot table uses this format:
lua
["item_name"] = {
Label = "Display Name",
Amount = { 1, 3 }, -- { min, max } random amount range
Chance = 40, -- Drop chance (1-100 percentage)
}Trashbin Location Fields
Each entry in Config.TrashBins:
| Field | Type | Description |
|---|---|---|
Prop | string or false | Prop model to spawn (false = use existing world object) |
Pos | table | Coordinates: { x, y, z } |
Items | table | Loot table for this location (use a shared DefaultLoot variable or define custom) |
Features
- Searchable trashbins — Hold prompt to search with animation and progress bar
- Shared stash — Each trashbin has its own shared inventory
- Random loot — Configurable items with individual drop chances and amount ranges
- Cooldown system — Random refill time between searches to prevent farming
- 94 pre-configured locations — Valentine, Saint Denis, Rhodes, Blackwater, Armadillo, and more
- Prop spawning — Automatically spawns trashbin props at configured locations
- Optional blips — Toggle map blips for trashbin locations
- Custom loot per location — Each trashbin can have its own loot table
- Admin command —
/cleartrashto clear all trashbin inventories and reset cooldowns - Webhook logging — Discord logging or custom handler
Troubleshooting
| Problem | Solution |
|---|---|
| Script doesn't start | Make sure twinded_libs is started before twinded_trashbin |
| No blips on map | Set Config.TrashbinBlip = true in your custom settings |
| Can't interact | Check you are close enough to the trashbin |
| "Someone already searched" | The trashbin is on cooldown — wait for Config.TimeToRefill |
| Props not spawning | Verify Prop field is set (not false) in the trashbin config |

