Bablo ResourcesDocs

Drug Traces

When a player successfully uses a loose-powder drug, there is a chance it leaves a trace on the ground nearby. Traces only come from real consumption, never from carrying or trading drugs.

Configuration Options

These settings are in shared/config/drug_traces.lua. The inventory adapter is in shared/bridge/drugs.lua.

Items

DrugTraceConfig.Items lists the consumable items that can leave a trace and the substance each one is. Add your server’s own drug items here:

LUA
Items = {
    cokebaggy = { substance = 'Cocaine' },
},

Chance and Cooldown

Chance is the chance a use leaves a trace (15%) and CooldownSeconds the wait per player and substance (180 seconds).

ox_inventory

With OxInventory = true, consumption through ox_inventory is detected automatically.

Other Drug Resources

Other resources can report a consumption with the RegisterDrugConsumption export. Add the resource name to AllowedResources first:

LUA
AllowedResources = {
    ['qb-smallresources'] = true,
    -- ['my-drugs'] = true,
},