A modern, State Bag synced ped looting system for FiveM with model-specific loot tables.
| Feature | Old Scripts | DPS LootPeds |
|---|---|---|
| Anti-Re-Loot | Delete body OR local table | State Bags (synced) |
| Body Handling | Delete = immersion break | Keep body, mark as searched |
| Loot Tables | Same for all peds | Model-specific (8 categories) |
| Framework | Single framework | QB/QBX/ESX bridge |
| Inventory | Single inventory | ox/qs/qb bridge |
- State Bag Sync - Looted status synced across ALL clients
- Keep Bodies - No more vanishing corpses (configurable)
- Visual Indicator - "[SEARCHED]" text above looted bodies
Different peds drop different items:
| Category | Examples | Loot |
|---|---|---|
| Police | Cops, Security, SWAT | Radio, handcuffs, armor, pistol ammo |
| Gang | Ballas, Vagos, Lost MC | Drugs, dirty money, knives, guns |
| Medical | Paramedics, Nurses | Bandages, medkits, painkillers |
| Worker | Construction, Truckers | Tools, scraps, sandwiches |
| Beach | Surfers, Lifeguards | Water, sunscreen, phone |
| Business | Suits, Beverly Hills | Cash, jewelry, wallet, creditcard |
| Homeless | Tramps, Methheads | Bottles, lighters, drugs |
| Military | Marines, Pilots | Armor, rifles, MREs |
- Police Alerts - Alert cops when someone loots a body
- Evidence System - Leave fingerprints (ps-evidence)
- qs-dispatch - Full dispatch integration
- Download and extract to your resources folder
- Configure
shared/config.lua - Add to server.cfg:
ensure ox_lib
ensure ox_target
ensure dps-lootpeds- QBCore
- QBX (Qbox)
- ESX
- ox_inventory
- qs-inventory
- qb-inventory
- codem-inventory
Config.EnableOnStart = true -- Enable on server start
Config.UseStateBags = true -- Use State Bags (recommended)
Config.DeletePedsWhenLooted = false -- Keep bodies (recommended)
Config.UseAllPeds = true -- Loot any dead NPCConfig.PedCategories = {
gang = {
patterns = { 'g_m_', 'g_f_' }, -- Matches all gang peds
cash = { min = 100, max = 500, chance = 70 },
loot = {
{ item = 'weed_brick', chance = 25 },
{ item = 'weapon_pistol', chance = 25 },
{ item = 'lockpick', chance = 35 },
}
},
-- Add more categories...
}Config.Restrictions = {
requireItem = false, -- Need an item to loot
requiredItem = 'lockpick', -- Which item
consumeItem = false, -- Consume it on use
jobRestricted = false, -- Restrict to certain jobs
blacklistedPeds = { 'player_zero' } -- Can't loot these
}| Command | Description |
|---|---|
/lootpeds on |
Enable looting system |
/lootpeds off |
Disable looting system |
Player A loots body → Server sets Entity(ped).state.isLooted = true
↓
State Bag syncs to ALL clients
↓
Player B approaches → Checks Entity(ped).state.isLooted
↓
Shows "[SEARCHED]" text, can't re-loot
Benefits:
- No body deletion required
- Synced across all players
- Survives player disconnects
- No performance overhead
-- Check if system is enabled
exports['dps-lootpeds']:IsSystemEnabled()
-- Check if a specific ped is looted
exports['dps-lootpeds']:IsPedLooted(pedEntity)
-- Manually trigger looting
exports['dps-lootpeds']:LootPed(pedEntity)Enable police alerts when players loot bodies:
Config.PoliceIntegration = {
enabled = true,
alertOnLoot = true,
policeJobs = { 'police', 'bcso' },
minPoliceOnline = 2,
alertChance = 25, -- 25% chance
}Leave evidence when looting (requires ps-evidence):
Config.Evidence = {
enabled = true,
fingerprints = true,
dna = false,
}- Remove
mh-lootpedsfrom your resources - Add
dps-lootpeds - The
providesin fxmanifest ensures backwards compatibility
- Added State Bag sync for looted status
- Added model-specific loot tables (8 categories)
- Added framework bridge (QB/QBX/ESX)
- Added inventory bridge (ox/qs/qb)
- Added police alert integration
- Added evidence system integration
- Added visual "[SEARCHED]" indicator
- Removed body deletion requirement
- Improved ox_target integration
- QBox compatibility
- qs-inventory support
- Original: mh-lootpeds by MaDHouSe
- Rewrite: @daemonAlex / DPS Development
GPL-3.0 License