Skip to content
NivoDocs

Search documentation

Drugs Selling

Configuration

Every option of nv_drugs-selling with its default value. The files stay open (not escrowed), so you can edit them freely; restart nv_drugs-selling after a change.

Preview: the script is not released yet, so options can still change. This page is updated with every release.

Framework, inventory, target, dispatch, notifications and progress bar are not set here: nv_bridge detects them for all Nivo scripts at once. Database tables are created automatically by nv_bridge on first start (sql/001_tables.sql, no manual import). Texts come from locales/<language>.json (English is the default); set Config.Locale to switch.

config.lua

-- ════════════════════════════════════════════════════════════════════
--  nv_drugs-selling – drug selling: wholesale, faction contracts, courier (street selling is in street_config.lua)
--  1) Roaming wholesaler (changes location every hour): 30–50 pcs per player
--     per hour, lower price, the police are not alerted.
--  2) Contracts for illegal factions (Gang-type job): 100–350 pcs at a medium
--     price. Van → pier → boat across the sea → unloading → van → warehouse.
--     The police see the cargo position every 15 s, NPCs attack (2–3, pistols).
--  ⚠ Coordinates (locations, piers, warehouses, ambushes) are approximate.
-- ════════════════════════════════════════════════════════════════════
Config = {}

-- ── General ──────────────────────────────────────────────────────────
Config.Locale = 'en'               -- 'en', 'cs', 'de', 'fr', 'es', 'pt', 'tr', 'pl', 'it' or 'nl' (files in locales/), add your own language by copying en.json
-- Config.OnAlert = function(alert) return true end   -- optional: handle alerts yourself (framework, inventory, target and dispatch are set in nv_bridge/config.lua): alert = { jobs, code, title, message, coords, priority, blip, src }
Config.Admin = { group = 'group.admin' }   -- principal allowed to use /sellmenu (ox_lib adds the ACE command.sellmenu for it)
Config.DirtyMoney = { item = 'markedbills' }   -- dirty cash: ESX uses the 'black_money' account, QBCore/Qbox use this item
Config.Multipliers = { street = 1.0, wholesale = 1.0 }   -- global price multipliers (e.g. for server events)

--- Price multiplier by quality (same formula as nv_laboratorycreator): 0 → 0.6×, 100 → 1.5×.
function Config.qualityMult(q)
    q = math.max(0, math.min(100, tonumber(q) or 50))
    return 0.6 + q / 100 * 0.9
end

--- Item quality: from metadata (`metadata.quality`, nv_laboratorycreator), otherwise the fixed `q` from Config.Items, otherwise 50.
--- KuzQuality drugs (kq_meth2) have no quality in metadata, the quality is in the item name (low/mid/high),
--- so they have a fixed `q` in Config.Items. Cocaine (coke_brick) has a middle value (50).
function Config.qualityOf(name, metadata)
    local q = metadata and tonumber(metadata.quality)
    if q then return q end
    local e = Config.Items[name]
    return e and e.q or 50
end

-- Base prices (street ~ 1.0×; NPC wholesale 0.7×; faction contract 0.9×).
-- Items with `q` have a fixed quality (kq_meth_*): final price = price × qualityMult(q), on the street it matches street_config.
Config.Items = {
    weed_ak47 = { label = 'AK-47', price = 300 },   weed_banana = { label = 'Banana Kush', price = 380 },
    weed_purple = { label = 'Purple Haze', price = 460 }, weed_widow = { label = 'White Widow', price = 560 },
    hashish = { label = _L('hashish'), price = 700 },     coke_bag = { label = _L('cocaine_bag'), price = 220 },
    crack_rock = { label = 'Crack', price = 120 },
    -- KuzQuality (kq_meth2, kq_cocaine): meth in three qualities, cocaine as a brick
    kq_meth_low = { label = _L('meth_low_quality'), price = 520, q = 20 },
    kq_meth_mid = { label = _L('meth_medium_quality'), price = 520, q = 55 },
    kq_meth_high = { label = _L('meth_high_quality'), price = 520, q = 90 },
    coke_brick = { label = 'Kokain (cihla)', price = 2300 },
    meth_crystal = { label = 'Meth', price = 520 },   ecstasy_pill = { label = _L('ecstasy'), price = 150 },
    lsd_tab = { label = 'LSD', price = 240 },         dmt_vial = { label = 'DMT', price = 400 },
    ketamine_vial = { label = 'Ketamin', price = 260 }, xanax_pill = { label = 'Xanax', price = 140 },
    oxy_pill = { label = 'OxyContin', price = 180 },  opium_raw = { label = 'Opium', price = 300 },
    heroin_white = { label = _L('heroin_white'), price = 650 }, heroin_black = { label = _L('heroin_black'), price = 380 },
    fentanyl_patch = { label = 'Fentanyl', price = 800 },
}

Config.Police = { jobs = { 'police' }, minCops = 2 }   -- for contracts; convar nv_nopolice 1 = no minimum

-- ── roaming wholesaler ─────────────────────────────────────────
Config.Wholesale = {
    label = 'Velkoobchod', model = `g_m_m_armboss_01`, scenario = 'WORLD_HUMAN_STAND_IMPATIENT',
    rotateHours = 1,                 -- = limit cooldown (resets when the location changes)
    capMin = 30, capMax = 50,        -- max pieces per player per hour (random by slot)
    priceMul = 0.7,
    locations = {
        vec4(1243.04, -3155.38, 5.53, 270.0),   -- LS doky
        vec4(768.75, -1643.47, 30.09, 31.8),    -- LS Cypress
        vec4(-315.39, -2698.29, 7.55, 307.4),   -- LS Elysian
        vec4(1385.56, 3617.36, 34.89, 200.0),   -- Sandy Ace Liquor
        vec4(2342.03, 3054.24, 48.15, 180.0),   -- Sandy junkyard
        vec4(1688.42, 4930.85, 42.08, 330.0),   -- Grapeseed
        vec4(-447.98, 6008.37, 31.72, 315.0),   -- Paleto behind the station
        vec4(1702.79, 6416.86, 33.64, 200.0),   -- Paleto east
        vec4(-93.98, 6420.10, 31.48, 45.0),     -- Paleto Bay
    },
}

-- ── faction contracts ───────────────────────────────────────────────
Config.Contract = {
    jobs = { 'ballas', 'vagos', 'families' },   -- illegal factions (to be tuned)
    qtyMin = 100, qtyMax = 350,
    priceMul = 0.9,
    cooldownMin = 120,               -- na job
    timeoutMin = 60,                 -- the whole contract
    trackEvery = 15,                 -- s: cargo position for SASP
    vanModel = `speedo`, boatModel = `dinghy`,
    -- routes: from → to (the other side of the map)
    routes = { ls = { 'paleto' }, paleto = { 'ls' }, sandy = { 'ls', 'paleto' } },
    docks = {
        ls     = { label = _L('los_santos_port'), dock = vec3(1240.0, -3180.0, 5.5),  boat = vec4(1285.0, -3200.0, 0.3, 90.0),  van = vec4(1230.0, -3170.0, 5.5, 270.0) },
        paleto = { label = _L('paleto_port'),     dock = vec3(-275.0, 6640.0, 7.4),   boat = vec4(-300.0, 6665.0, 0.3, 135.0),   van = vec4(-268.0, 6630.0, 7.4, 45.0) },
        sandy  = { label = _L('sandy_port'),      dock = vec3(1340.0, 4270.0, 31.5),  boat = vec4(1352.0, 4272.0, 30.0, 85.0),   van = vec4(1330.0, 4262.0, 31.5, 265.0) },
    },
    warehouses = {
        ls     = { label = 'sklad Los Santos', coords = vec3(843.0, -2350.0, 30.3) },
        paleto = { label = 'sklad Paleto',     coords = vec3(-155.0, 6320.0, 31.3) },
        sandy  = { label = 'sklad Sandy',      coords = vec3(2410.0, 3147.0, 48.2) },
    },
    -- land traps (2–3 NPCs with pistols, easy to kill)
    ambush = {
        ls     = { vec3(1100.0, -2900.0, 5.9), vec3(950.0, -2500.0, 28.5), vec3(850.0, -2300.0, 30.0) },
        paleto = { vec3(-200.0, 6500.0, 31.0), vec3(-330.0, 6300.0, 31.0), vec3(-240.0, 6560.0, 8.0) },
        sandy  = { vec3(1900.0, 3800.0, 33.0), vec3(1500.0, 3650.0, 35.0), vec3(1350.0, 4250.0, 31.0) },
    },
    ambushPed = { model = `g_m_y_mexgoon_01`, weapon = `WEAPON_PISTOL`, health = 130, accuracy = 25, count = { 2, 3 }, trigger = 140.0 },
}

-- ── faction courier (dead drop) ─────────────────────────────────────────
-- A short contract without a boat: pick up a package at one place, deliver it to another within the
-- limit. SASP gets a dispatch with the pickup position. ⚠ Coordinates are approximate.
Config.Courier = {
    jobs = Config.Contract.jobs,
    cooldownMin = 15, timeoutMin = 12,
    payMin = 3500, payMax = 7500,             -- dirty money
    minDist = 900.0,                          -- A and B at least this far apart
    drops = {
        vec3(101.0, -1912.0, 20.8),    vec3(-12.0, -1445.0, 31.1),   vec3(321.0, -300.0, 54.0),
        vec3(1185.0, -3300.0, 5.5),    vec3(1392.0, 3604.0, 34.9),   vec3(1708.0, 4800.0, 41.9),
        vec3(-130.0, 6350.0, 31.5),    vec3(-1300.0, -1220.0, 4.7),
    },
}

-- /devmenu (Locations): handover places for small deliveries and possible wholesaler places (add, delete, move)

street_config.lua

-- ════════════════════════════════════════════════════════════════════
--  nv_drugs-selling – street drug selling to NPCs: copied from nv_drugs-selling (11 Oct 2026) so that nv_drugs-selling works standalone.
--  Config.Sell applies here (prices, zones, reputation, factions, quality); values from the DB (/sellmenu) override it at runtime.
-- ════════════════════════════════════════════════════════════════════
lib.locale()


-- ════════════════════════════════════════════════════════════════════
--  SELLING DRUGS TO NPCs
--
--  No menu or UI. When you have a drug in your inventory, an ox_target option
--  "Sell <drug>" appears on passers-by. You click, an
--  animation with a progress bar plays and the NPC pays you.
--
--  Add only items to `Items` that you really have in ox_inventory.
-- ════════════════════════════════════════════════════════════════════
-- 23 Sep 2026: paid in DIRTY money (black_money), laundered in nv_laundry / nv_oxyrun.
-- The sale numbers were not changed: drugs stay above the illegal average,
-- their real earnings are lowered only by the loss from laundering (15–40 %).
Config.Sell = {
    enabled = true,

    Distance   = 2.0,      -- dosah ox_targetu na NPC
    Duration   = 6000,     -- sale duration (ms)

    --  EKONOMIKA
    --
    --  `Cooldown` (waiting between two sales by the same player) is
    --  DISABLED — 0 means there is no wait at all and you can sell to one NPC
    --  after another. It used to be 45 s and the whole earnings calculation was based on it:
    --  68 sales per hour, weed ~25,500 $/h, meth ~44,900 $/h,
    --  perico ~71 400 $/h.
    --
    --  Without it the cap is given only by `Duration` (6 s per sale) and by
    --  how fast the player finds the next NPC — so in reality several times
    --  higher earnings. If that turns out to be too much, just put a number
    --  of seconds back here; the logic for it is prepared.
    Cooldown   = 0,        -- 0 = no waiting between sales (per player)

    --  WARNING: `PedCooldown` is something DIFFERENT and intentionally stays. It says how
    --  long the same NPC will not buy again. Without it a single pedestrian could be
    --  milked endlessly without the player even moving.
    PedCooldown = 600,     -- how long the same NPC will not buy again (seconds)

    -- How many police officers must be online for selling to be possible. 0 = disabled.
    --
    -- ⚠ DEV: on the development server this is 0 so you can sell without police.
    -- On PRODUCTION it should be 1 (28 Sep 2026 flop: 3 → 1, SASP is short on people)
    -- — this very line is changed when committing.
    RequiredPolice = 1,

    -- Fallback in case /jobscreator is not running. Otherwise ALL
    -- jobs of type `leo` are taken (see policeOnline in server/selldrugs.lua), so
    -- a new department on the server is counted automatically.
    PoliceJobs     = { 'police' },

    -- % chance that the NPC refuses and you sell nothing (you keep the item)
    RefuseChance = 15,

    -- ────────────────────────────────────────────────────────────────
    --  ZONES (7 Oct 2026) – street selling is not the same everywhere
    --  priceMul = price multiplier, refuse = surcharge to the refusal chance (%),
    --  police = % chance that a refusal/suspicious deal calls the police,
    --  mug = % chance that the dealer robs you and attacks (the drugs are gone, the money is not).
    --  Outside the zones `DefaultZone` applies. ⚠ Coordinates and radii are approximate.
    -- ────────────────────────────────────────────────────────────────
    DefaultZone = { label = _L('city'), priceMul = 1.0, refuse = 0, police = 15, mug = 5 },
    Zones = {
        { label = 'Vinewood / Rockford',  center = vec3(-300.0, 100.0, 60.0),   radius = 750.0,  priceMul = 1.25, refuse = 10, police = 35, mug = 3 },
        { label = 'Davis / Strawberry',   center = vec3(100.0, -1700.0, 30.0),  radius = 800.0,  priceMul = 0.90, refuse = -5, police = 10, mug = 18 },
        { label = 'Vespucci / Del Perro', center = vec3(-1200.0, -1100.0, 5.0), radius = 700.0,  priceMul = 1.10, refuse = 5,  police = 25, mug = 6 },
        { label = 'Sandy / Grapeseed',    center = vec3(1800.0, 3700.0, 34.0),  radius = 1300.0, priceMul = 0.95, refuse = 0,  police = 8,  mug = 12 },
        { label = 'Paleto',               center = vec3(-200.0, 6300.0, 31.0),  radius = 900.0,  priceMul = 0.85, refuse = -5, police = 5,  mug = 8 },
    },

    -- Negotiation: the player asks for a markup, the NPC refuses it more often as the markup grows
    -- and a greedy demand raises the chance that the dealer robs you (mug + ask × MugPerPct).
    Negotiation = { enabled = true, Asks = { 0, 10, 20, 30 }, RefusePerPct = 1.8, MugPerPct = 0.3 },

    -- Territories (8 Oct 2026, and the gang script): in your own turf you sell for more and more safely,
    -- in a foreign turf it is riskier. Brand = drugs with metadata.brand (from the lab) go 5 % higher.
    Turf = { enabled = true, homePrice = 1.08, homeMug = 0.4, foreignMug = 1.4, brandPrice = 1.05 },

    -- ────────────────────────────────────────────────────────────────
    --  QUALITY — the price depends on how well it was cooked
    --
    --  Drugs made by ratio mixing (and the drug-production script) carry
    --  `quality` 0–100 in the metadata. NPCs pay more for better goods.
    --
    --  Price per piece = base × quality multiplier × faction bonus × level bonus
    --
    --  `Min`/`Max` say how far the multiplier reaches. Between them it is interpolated
    --  linearly, so quality 50 gives exactly the middle.
    --
    --  An item WITHOUT metadata (older stock, fixed recipes) is treated as
    --  `Vychozi` — otherwise everything made before this change
    --  would suddenly sell for the minimum.
    -- ────────────────────────────────────────────────────────────────
    Quality = {
        enabled = true,

        Min = 0.55,   -- kvalita 0   → 55 % ceny
        Max = 1.45,   -- kvalita 100 → 145 % ceny

        -- Item without `quality` in the metadata. 50 is deliberately the exact middle
        -- between Min and Max, so the multiplier comes out as 1.0 and older stock
        -- sells for exactly the same price as before. A higher value would
        -- silently make it more expensive, a lower one would devalue it.
        Vychozi = 50,

        -- Below this quality the NPC will not take the goods at all. 0 = disabled.
        -- So junk cannot be sold on the street; the player should throw it away.
        Odmitnout = 20,

        -- The chance of refusal grows the worse the goods are. It is added
        -- to `RefuseChance` at quality 0 and decreases linearly to zero.
        RefusePenalty = 20,
    },

    -- Sale animation. The player hands over, the NPC takes.
    Anim = {
        dict     = 'mp_common',
        player   = 'givetake1_a',
        ped      = 'givetake1_b',
    },

    -- ── props in hands during the sale ──
    --
    --  The deal happens in three beats, so it looks like a real deal
    --  and not an exchange in the blink of an eye:
    --
    --    1. the player holds the drug (`player`), the NPC has empty hands
    --    2. `Timing.handover` — the drug disappears from the player and appears on the NPC
    --    3. `Timing.stash`    — the NPC puts the drug away (the prop disappears)
    --    4. `Timing.payout`   — NPC vytiahne peniaze do VLASTNEJ ruky
    --    5. `Timing.handback` — the money passes from the NPC's hand to the player
    --    6. `Timing.pocket`   — the player puts it away (the prop disappears)
    --
    --  So the money takes the same path as the drug, only in the opposite direction —
    --  it does not materialize in the player's hand, someone really hands it over.
    --
    --  Times are in ms from the start of the sale and must increase; keep the last one below
    --  `Duration` (otherwise the last beat will not have time to show).
    --
    --  Oba propy sedia na pravej ruke — bone 28422 = PH_R_Hand.
    --
    --  WATCH OUT for the bone numbers, it is easy to mix them up:
    --    28422 = PH_R_Hand    right hand, meant for holding props
    --    60309 = PH_L_Hand    LEFT hand (not the right one, as it might seem!)
    --    57005 = SKEL_R_Hand  right, but skeletal — the prop sits worse
    --    18905 = SKEL_L_Hand  left skeletal
    --
    --  `PH_` bones belong on props, they are built for exactly that.
    --  After the sale finishes or is cancelled everything is always deleted.
    --
    --    model      model name (must exist in the game or in the stream)
    --    bone       bone the prop is attached to
    --    pos/rot    offset and rotation relative to the bone — fine-tune per model
    --
    --  You can set the whole section (or the individual `player`/`ped`) to `nil`
    --  and the sale runs without props.
    Props = {
        enabled = true,

        --  When each beat plays (ms from the start of the sale).
        --  With `Duration = 6000` this pace fits — every step is visible
        --  and the last one still finishes before the progress bar ends.
        Timing = {
            handover = 1000,   -- the drug passes from the player's hand to the NPC
            stash    = 2000,   -- the NPC puts it away (the prop disappears)
            payout   = 2800,   -- NPC vytiahne peniaze do svojej ruky
            handback = 4000,   -- the money passes from the NPC's hand to the player
            pocket   = 5200,   -- the player puts it away (the prop disappears)
        },

        -- a package of the drug in the player's hand
        --  Note: `weapon_*` models (e.g. `weapon_acidpackage`) are weapons,
        --  not objects — `CreateObject` does not load them and the prop does not appear.
        --  A regular object model belongs here.
        player = {
            -- ⚠ 2026-08-26: `m25_1_prop_m51_bag_weed_01a` je z MLO packu,
            -- which does not exist on this server — the console reported
            -- "prop did not load" on every sale and the player held an empty hand.
            -- Replaced with the vanilla baggie, which is in the base game.
            model = 'prop_weed_bottle',
            bone  = 28422,
            pos   = vec3(0.10, 0.02, 0.01),
            rot   = vec3(-90.0, 10.0, 0.0),
        },

        -- money the NPC finally hands to the player
        ped = {
            model = 'bkr_prop_scrunched_moneypage',
            bone  = 28422,
            pos   = vec3(0.10, 0.01, 0.0),
            rot   = vec3(-90.0, 0.0, 0.0),
        },
    },

    -- ── what can be sold ──
    --  label   text in ox_target and in the notification
    --  min/max cena za jeden kus
    --  amount  how many pieces go at once
    --  account 'money' (cash) or 'bank'
    --  alert   % chance that someone reports it to the police
    --  xp      (optional) XP multiplier for this drug — 1.0 when missing
    Items = {
        { item = 'weed_bag',         label = _L('weed'),            icon = 'fa-solid fa-cannabis',  min = 220, max = 280,  amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'weed_blue_bag',    label = _L('blue_weed'),       icon = 'fa-solid fa-cannabis',  min = 240, max = 300,  amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'weed_maroon_bag',  label = _L('maroon_weed'),     icon = 'fa-solid fa-cannabis',  min = 280, max = 350,  amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'weed_yellow_bag',  label = _L('yellow_weed'),     icon = 'fa-solid fa-cannabis',  min = 300, max = 400,  amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'meth_bag',          label = 'meth',             icon = 'fa-solid fa-flask',     min = 500, max = 650,  amount = { 1, 2 }, account = 'black_money', alert = 30 },

        -- ── nv_laboratorycreator (7 Oct 2026): prices ≈ base in nv_laboratorycreator/shared/drugs.lua ──
        { item = 'weed_ak47',   label = 'AK-47',          icon = 'fa-solid fa-cannabis', min = 270, max = 330, amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'weed_banana', label = 'Banana Kush',    icon = 'fa-solid fa-cannabis', min = 340, max = 420, amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'weed_purple', label = 'Purple Haze',    icon = 'fa-solid fa-cannabis', min = 410, max = 510, amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'weed_widow',  label = 'White Widow',    icon = 'fa-solid fa-cannabis', min = 500, max = 620, amount = { 1, 2 }, account = 'black_money', alert = 25 },
        { item = 'hashish',     label = _L('hashish_2'),          icon = 'fa-solid fa-cookie',   min = 630, max = 770, amount = { 1, 2 }, account = 'black_money', alert = 28 },
        { item = 'coke_bag',    label = 'kokain',         icon = 'fa-solid fa-snowflake', min = 200, max = 240, amount = { 1, 3 }, account = 'black_money', alert = 30 },
        { item = 'crack_rock',  label = 'crack',          icon = 'fa-solid fa-gem',      min = 100, max = 140, amount = { 1, 3 }, account = 'black_money', alert = 30 },
        -- drugs v2 (chemical lab nv_laboratorycreator), prices ≈ base in nv_laboratorycreator/shared/drugs2.lua
        { item = 'meth_crystal',   label = 'meth',          icon = 'fa-solid fa-flask',     min = 470, max = 570, amount = { 1, 2 }, account = 'black_money', alert = 32 },
        { item = 'ecstasy_pill',   label = _L('ecstasy_2'),        icon = 'fa-solid fa-pills',     min = 130, max = 170, amount = { 1, 4 }, account = 'black_money', alert = 25 },
        { item = 'lsd_tab',        label = 'LSD',           icon = 'fa-solid fa-eye',       min = 210, max = 270, amount = { 1, 3 }, account = 'black_money', alert = 25 },
        { item = 'dmt_vial',       label = 'DMT',           icon = 'fa-solid fa-vial',      min = 350, max = 450, amount = { 1, 2 }, account = 'black_money', alert = 28 },
        { item = 'ketamine_vial',  label = 'ketamin',       icon = 'fa-solid fa-syringe',   min = 230, max = 290, amount = { 1, 2 }, account = 'black_money', alert = 28 },
        { item = 'xanax_pill',     label = 'xanax',         icon = 'fa-solid fa-pills',     min = 120, max = 160, amount = { 1, 4 }, account = 'black_money', alert = 22 },
        { item = 'oxy_pill',       label = 'OxyContin',     icon = 'fa-solid fa-pills',     min = 160, max = 200, amount = { 1, 3 }, account = 'black_money', alert = 25 },
        { item = 'opium_raw',      label = 'opium',         icon = 'fa-solid fa-seedling',  min = 270, max = 330, amount = { 1, 2 }, account = 'black_money', alert = 28 },
        { item = 'heroin_white',   label = _L('white_heroin'),   icon = 'fa-solid fa-syringe',   min = 580, max = 720, amount = { 1, 2 }, account = 'black_money', alert = 35 },
        { item = 'heroin_black',   label = _L('black_heroin'),  icon = 'fa-solid fa-syringe',   min = 340, max = 420, amount = { 1, 2 }, account = 'black_money', alert = 35 },
        { item = 'fentanyl_patch', label = 'fentanyl',      icon = 'fa-solid fa-bandage',   min = 720, max = 880, amount = { 1, 2 }, account = 'black_money', alert = 40 },

        -- ── kq_meth2 a kq_cocaine (24. 9. 2026) ───────────────────────
        -- Band from nv_fences/README.md: solo ~20,000 $/h dirty
        -- (clean ~14,500 after laundering), group ~29,000 $/h per head.
        --
        -- METH: a batch is max 10 pcs, with gathering materials and cooking ~20 min,
        -- so ~3 batches/h. Medium quality (575 $) = ~5,750 $ per batch,
        -- ~17,000 $/h; high (775 $) ~23,000 $/h. Low is a penalty for
        -- botched cooking. The middle = the existing meth_bag, so prices do not clash.
        -- Costs: propane 1,000 $ per 5 batches, station 15,000 $,
        -- distiller 25,000 $, van kit 10,000 $.
        { item = 'kq_meth_low',       label = _L('meth_low_quality_2'),   icon = 'fa-solid fa-flask', min = 350, max = 450, amount = { 1, 2 }, account = 'black_money', alert = 30 },
        { item = 'kq_meth_mid',       label = 'meth',                   icon = 'fa-solid fa-flask', min = 500, max = 650, amount = { 1, 2 }, account = 'black_money', alert = 30 },
        { item = 'kq_meth_high',      label = _L('meth_high_quality_2'),  icon = 'fa-solid fa-flask', min = 700, max = 850, amount = { 1, 2 }, account = 'black_money', alert = 30 },
        --
        -- COKE: 1 brick = 80 coca leaves + 2 gasoline + 1 acid, solo
        -- ~7–9 bricks/h (gathering is the bottleneck, plants regrow in 30 min).
        -- 8 × 2,300 $ = ~18,400 $/h solo; a crew shares the pits, barrels and
        -- fire pits, so per head it comes out similar. A brick is sold
        -- one at a time and is reported more often than a baggie. Gang zones (and the gang script)
        -- pay more per brick (5,200 $), that is a bonus for the turf.
        { item = 'coke_brick',        label = 'cihlu koksu',            icon = 'fa-solid fa-cubes', min = 2000, max = 2600, amount = { 1, 1 }, account = 'black_money', alert = 40 },
        --
        -- WEED BRICK (26 Sep 2026): drops from the plane (kq_smugglers),
        -- yachts and Cayo, but nobody used to buy it on the street and gang zones
        -- are empty – it was dead loot. Price = 10 baggies (that is how many
        -- a brick gives in the gang script), so ~2,500 $, like a gang zone.
        { item = 'weed_brick',        label = _L('a_brick_of_weed'),            icon = 'fa-solid fa-cannabis', min = 2200, max = 2800, amount = { 1, 1 }, account = 'black_money', alert = 40 },

        -- ── LEAN (lean) ─────────────────────────────────────
        -- Mixed cups. They are sold the same way as weed, so they
        -- also count towards turfs — `nv_sell:sv:sold` is caught by the gang script.
        --
        -- The price goes by the STRENGTH OF THE SYRUP, not the lemonade: Robitussin is
        -- the weakest, Tussionex the strongest and the most expensive. The ice variant
        -- is a notch higher — it cools better and relieves more stress.
        --
        -- Sold one at a time (`amount = { 1, 1 }`): a cup is a finished
        -- product, not a baggie that could be split.
        --
        -- `alert` is lower than for weed — a cup in hand looks like
        -- lemonade, not like a baggie.

        -- Robitussin AC — the weakest
        { item = 'cup_lemon_lime_robitussin_ac',            label = 'lean',              icon = 'fa-solid fa-wine-glass', min = 150, max = 190,  amount = { 1, 1 }, account = 'black_money', alert = 15 },
        { item = 'cup_orange_robitussin_ac',                label = 'lean',              icon = 'fa-solid fa-wine-glass', min = 150, max = 190,  amount = { 1, 1 }, account = 'black_money', alert = 15 },
        { item = 'cup_lemon_lime_robitussin_ac_ice',        label = 'lean s ledem',      icon = 'fa-solid fa-wine-glass', min = 175, max = 225,  amount = { 1, 1 }, account = 'black_money', alert = 15 },
        { item = 'cup_orange_robitussin_ac_ice',            label = 'lean s ledem',      icon = 'fa-solid fa-wine-glass', min = 175, max = 225,  amount = { 1, 1 }, account = 'black_money', alert = 15 },

        -- Hi-Tech
        { item = 'cup_lemon_lime_hitech_syrup',             label = 'lean',              icon = 'fa-solid fa-wine-glass', min = 175, max = 220,  amount = { 1, 1 }, account = 'black_money', alert = 15 },
        { item = 'cup_orange_hitech_syrup',                 label = 'lean',              icon = 'fa-solid fa-wine-glass', min = 175, max = 220,  amount = { 1, 1 }, account = 'black_money', alert = 15 },
        { item = 'cup_lemon_lime_hitech_syrup_ice',         label = 'lean s ledem',      icon = 'fa-solid fa-wine-glass', min = 205, max = 260,  amount = { 1, 1 }, account = 'black_money', alert = 15 },
        { item = 'cup_orange_hitech_syrup_ice',             label = 'lean s ledem',      icon = 'fa-solid fa-wine-glass', min = 205, max = 260,  amount = { 1, 1 }, account = 'black_money', alert = 15 },

        -- Promethazine s kodeinem
        { item = 'cup_lemon_lime_promethazine_codeine',     label = 'lean',              icon = 'fa-solid fa-wine-glass', min = 200, max = 250,  amount = { 1, 1 }, account = 'black_money', alert = 18 },
        { item = 'cup_orange_promethazine_codeine',         label = 'lean',              icon = 'fa-solid fa-wine-glass', min = 200, max = 250,  amount = { 1, 1 }, account = 'black_money', alert = 18 },
        { item = 'cup_lemon_lime_promethazine_codeine_ice', label = 'lean s ledem',      icon = 'fa-solid fa-wine-glass', min = 235, max = 295,  amount = { 1, 1 }, account = 'black_money', alert = 18 },
        { item = 'cup_orange_promethazine_codeine_ice',     label = 'lean s ledem',      icon = 'fa-solid fa-wine-glass', min = 235, max = 295,  amount = { 1, 1 }, account = 'black_money', alert = 18 },

        -- Actavis OG — rare
        { item = 'cup_lemon_lime_actavis_og',               label = 'Actavis lean',      icon = 'fa-solid fa-wine-glass', min = 235, max = 290,  amount = { 1, 1 }, account = 'black_money', alert = 20 },
        { item = 'cup_orange_actavis_og',                   label = 'Actavis lean',      icon = 'fa-solid fa-wine-glass', min = 235, max = 290,  amount = { 1, 1 }, account = 'black_money', alert = 20 },
        { item = 'cup_lemon_lime_actavis_og_ice',           label = 'Actavis s ledem',   icon = 'fa-solid fa-wine-glass', min = 275, max = 340,  amount = { 1, 1 }, account = 'black_money', alert = 20 },
        { item = 'cup_orange_actavis_og_ice',               label = 'Actavis s ledem',   icon = 'fa-solid fa-wine-glass', min = 275, max = 340,  amount = { 1, 1 }, account = 'black_money', alert = 20 },

        -- Tussionex — the strongest, the most expensive
        { item = 'cup_lemon_lime_tussionex_yellow',         label = 'Tussionex lean',    icon = 'fa-solid fa-wine-glass', min = 270, max = 340,  amount = { 1, 1 }, account = 'black_money', alert = 22 },
        { item = 'cup_orange_tussionex_yellow',             label = 'Tussionex lean',    icon = 'fa-solid fa-wine-glass', min = 270, max = 340,  amount = { 1, 1 }, account = 'black_money', alert = 22 },
        { item = 'cup_lemon_lime_tussionex_yellow_ice',     label = 'Tussionex s ledem', icon = 'fa-solid fa-wine-glass', min = 315, max = 395, amount = { 1, 1 }, account = 'black_money', alert = 22 },
        { item = 'cup_orange_tussionex_yellow_ice',         label = 'Tussionex s ledem', icon = 'fa-solid fa-wine-glass', min = 315, max = 395, amount = { 1, 1 }, account = 'black_money', alert = 22 },
    },

    -- Message for the police (goes through the dispatch, if it is running)
    Dispatch = {
        enabled  = true,
        code     = '10-14',
        priority = 2,
        title    = _L('suspected_drug_dealing'),
        message  = _L('a_citizen_reported_a_suspicious_deal'),
        blip     = { sprite = 51, color = 1, scale = 0.7 },
    },

    -- ────────────────────────────────────────────────────────────────
    --  FACTIONS — whoever has their name on the street gets more for a drug.
    --
    --  The key is the name of the job OR gang (QB knows both, ESX job/group).
    --  The first matching entry is found for the player in the order: job → gang → ESX
    --  group. When nothing matches, there is no bonus.
    --
    --    priceMul     price multiplier per piece        (1.15 = +15 %)
    --    amountBonus  how many extra pieces the NPC takes at once
    --    refuseMul    refusal chance multiplier (0.5 = half)
    --    xpMul        multiplier of gained XP
    --    alertMul     multiplier of the chance of reporting to the police
    --    items        (optional) list of items the bonus applies to;
    --                 when missing, it applies to everything
    --
    --  The faction bonus is MULTIPLIED with the level bonus, not added — so
    --  a faction veteran at max level gets roughly 1.25 × 1.30 = ~1.6× the price.
    -- ────────────────────────────────────────────────────────────────
    Factions = {
        enabled = true,

        List = {
            ['ballas'] = {
                label       = 'Ballas',
                priceMul    = 1.25,
                amountBonus = 1,
                refuseMul   = 0.6,
                xpMul       = 1.25,
                alertMul    = 0.9,
            },
            ['families'] = {
                label       = 'Families',
                priceMul    = 1.20,
                amountBonus = 1,
                refuseMul   = 0.7,
                xpMul       = 1.20,
            },
            ['lost'] = {
                label       = 'Vagos',
                priceMul    = 2.0,
                amountBonus = 0,
                refuseMul   = 0.8,
                xpMul       = 1.15,
            },
            -- Example of a faction that has a bonus only on its own range:
            -- ['cartel'] = {
            --     label    = 'Cartel',
            --     priceMul = 1.40,
            --     items    = { 'coke_bag', 'meth_bag' },
            -- },
        },
    },

    -- ────────────────────────────────────────────────────────────────
    --  LEVELING — the more you sell, the more the NPC takes from you.
    --
    --  XP drops for every SUCCESSFUL sale: `XpPerSale` + `XpPerUnit` × pcs,
    --  further multiplied by `xp` from the item in `Items` (if given) and
    --  the faction bonus. A refused sale gives no XP.
    --
    --  Every level adds:
    --    priceMul    +PerLevel.price   (0.02 = +2 % za level)
    --    refuseMul   −PerLevel.refuse  (0.03 = −3 % of the original chance)
    --    amount      +1 piece for every `PerLevel.amountEvery` levels
    --
    --  Caps (`Max*`) keep the economy in check — without them level 25
    --  would make weed into heists. Especially careful now that `Cooldown = 0`:
    --  the amount bonus is felt the most during continuous selling.
    -- ────────────────────────────────────────────────────────────────
    Leveling = {
        enabled = true,

        XpPerSale = 8,     -- base per sale
        XpPerUnit = 4,     -- extra for every piece sold

        --  How much XP the next level costs. The curve is quadratic:
        --    potreba(L→L+1) = Curve.base + Curve.step * L ^ Curve.pow
        --  base 100 / step 45 / pow 1.35 means roughly:
        --    L1 145 XP · L5 ~485 XP · L10 ~1 105 XP · L20 ~2 600 XP
        MaxLevel = 25,
        Curve    = { base = 100, step = 45, pow = 1.35 },

        PerLevel = {
            price       = 0.02,   -- +2 % cena za level
            refuse      = 0.03,   -- −3 % (relative) refusal chance per level
            amountEvery = 5,      -- +1 piece per sale for every 5 levels
            xp          = 0.00,   -- possible speed-up of XP gathering per level
        },

        --  Caps — how much leveling can add/take at most.
        MaxPriceMul    = 1.60,  -- cena najviac +60 %
        MinRefuseMul   = 0.25,  -- refusal drops to a quarter at most
        MaxAmountBonus = 4,     -- najviac +4 kusy k rozsahu z `Items`

        --  Notification when advancing to a higher level.
        NotifyLevelUp = true,
        --  Also show the gained XP in the notification after a sale.
        NotifyXp      = true,

        --  Ranks — purely cosmetic for the notification and /dealerstats.
        --  `from` is the level from which the rank applies (sorted ascending).
        Ranks = {
            { from = 0,  label = _L('random_pedestrian') },
            { from = 3,  label = _L('street_dealer') },
            { from = 7,  label = 'Dealer' },
            { from = 12, label = 'Distributor' },
            { from = 18, label = _L('smuggler') },
            { from = 25, label = 'Boss' },
        },

        --  Command to show your own progress (nil = disabled).
        Command = 'dealerstats',
    },
}