Drug Sales

The drug sales system lets players sell drugs to NPC customers. It now supports two independent sale modes that can run simultaneously or be enabled individually.

Sale modes

Config.DrugSales.Modes = {
    ZoneSale = {
        Enable                = true,
        RequireReputation     = false,  -- require street rep to start
        MinReputationToStart  = 90,
    },

    ItemSale = {
        Enable = true,
    },
}
Mode
Trigger
Description

ZoneSale

Gang quick menu (F6)

Peds walk TO the player. Only works if the player is in a gang.

ItemSale

Use a drug item from inventory

Opens a menu to sell to a nearby ped or consume the drug. Usable items are registered automatically on server start.

The old `/startsell` and `/stopsell` commands have been **removed**. `ZoneSale` is now started and stopped exclusively from the gang quick menu (F6). Setting `Config.DrugSales.Enable = false` disables the entire system regardless of the modes above.


Core settings

Config.DrugSales = {
    Enable             = true,
    CopRequired        = 0,      -- min police online to allow sales
    CopAlertBlipTime   = 200,    -- ms the police alert blip stays on the map
    AllowPoliceToSell  = false,

    MaxCustomer               = 30,  -- total customers queued per seller
    MaxSimultaneousCustomers  = 1,
    RejectPercentage          = 20,  -- % chance customer refuses

    CustomerSpawnTime       = { min = 3, max = 7 },  -- seconds before next customer
    CustomerInteractionTime = 60,                     -- seconds seller has to interact

    UseBlackMoney = true,   -- pay out as dirty money

    MinDistanceBetweenSales = 50.0,  -- meters between active sell points
    SaleRadius              = 50.0,  -- active sale area radius around the seller
}

Customer priority queue

Controls the order in which waiting customers are served.


Customer peds

NPC ped models used as customers. Add/remove entries as needed.


Police alerts


Street sale settings

Shared settings used by both modes when a ped walks up to the player during a sale.


Drug list

Define which items are sellable in DrugList. Each entry supports:

Field
Type
Description

label

string

Display name in the interaction UI

quantity

{ min, max }

Units sold per transaction

price

{ min, max }

Price per unit in $

prop

string

World prop held during the exchange

Origin weed packages (by rarity)

Entry-level drug priced lower and tiered by rarity:

You can also add drugs dynamically from the admin panel at runtime — those are stored in `origen_drug_sales_custom` in the database and merged with the static list.


Blacklisted zones

Sales are blocked inside configured zones (Police Station, Hospital, Airport by default). Add more entries as needed:


Customer escape

If the seller ignores a waiting customer, the NPC flees after a timeout.


Animations


Blip & messages


Debug

Last updated