Discord Store
Urban Supply v2

Configuration

All configuration lives in config.lua. Every section is covered below. Values shown are the defaults shipped with the script.

Bridge Settings

These tell the script which resources you're running. Set Framework to 'auto' unless you have a specific reason to hardcode it.

config.lua
Config.Framework         = 'auto'           -- 'esx' | 'qb' | 'qbx' | 'auto'
Config.Inventory         = 'ox'             -- 'ox' | 'qb' | 'custom'
Config.Notify            = 'wasabi'         -- 'esx' | 'qb' | 'ox' | 'wasabi' | 'custom'
Config.Dispatch          = 'ak4y_dispatch'  -- 'ak4y_dispatch' | 'aty_dispatch' | 'cd_dispatch' | 'rcore_dispatch' | 'wasabi' | 'custom' | 'none'
Config.DirtyMoneyAccount = 'black_money'    -- must match your dirty money item/account name
Config.DispatchJobs      = {'police', 'sheriff'}

Core Settings

config.lua
Config.StartSell          = 'trap'
Config.StopSell           = 'stoptrap'
Config.MaxCustomer        = 15     -- max NPC buyers in pool
Config.CopRequired        = 0      -- min cops online to sell
Config.CopAlertPercentage = 20     -- % chance cop alert fires on sale
Config.CopAlertBlipTime   = 60     -- seconds blip stays on cop map
Config.RejectPercentage   = 20     -- % chance buyer rejects
Config.RobPercentage      = 20     -- % chance of robbery on rejection/sale
Config.AllowPoliceToSell  = true
Config.AllowEmsToSell     = true
Config.Cops               = { ['police'] = true, ['sheriff'] = true }
Config.Ems                = { ['ambulance'] = true }

Market System

Drug prices fluctuate weekly. Multipliers are applied on top of each drug's base price. The market resets every Sunday at 12:00 PM EST and persists across restarts via the drug_market database table.

config.lua
Config.MarketFluctuation   = true
Config.MarketMinMultiplier = 0.25  -- lowest a price can go (25% of base)
Config.MarketMaxMultiplier = 1.75  -- highest a price can go (175% of base)

Dynamic Pricing

When wasabi_police is installed, the script reads the live cop count and applies a price bonus. More cops online = higher risk = higher reward.

config.lua
Config.DynamicPricing         = true
Config.DynamicPricingCopBonus = {
    [0]  = 0.0,   -- no cops: no bonus
    [2]  = 0.05,  -- 2+ cops: +5%
    [5]  = 0.10,  -- 5+ cops: +10%
    [10] = 0.20,  -- 10+ cops: +20%
}

Heat System

Heat accumulates as players sell. Higher heat = higher cop alert chance. Heat decays over time automatically.

config.lua
Config.HeatDecayRate  = 15    -- points lost per decay tick
Config.HeatDecayTick  = 180   -- seconds between decay ticks (3 min)
Config.HeatLow        = 100   -- threshold for low heat  (+10% cop chance)
Config.HeatMed        = 500   -- threshold for med heat  (+30% cop chance)
Config.HeatHigh       = 1000  -- threshold for high heat (+60% cop chance + officer intel)

Leveling

Players earn XP by completing sales milestones. Each level unlocks higher-tier zones and provides a passive price bonus.

config.lua
Config.XPPerSale  = 10   -- base XP awarded per milestone
Config.SalesPerXP = 50   -- sales needed before XP is awarded

Config.Levels = {
    [1] = { xpRequired = 0,     label = "Newcomer",    xpBonus = 0    },
    [2] = { xpRequired = 500,   label = "Corner Boy",  xpBonus = 0.02 },
    [3] = { xpRequired = 1500,  label = "Hustler",     xpBonus = 0.05 },
    [4] = { xpRequired = 3000,  label = "Dealer",      xpBonus = 0.08 },
    [5] = { xpRequired = 6000,  label = "Connect",     xpBonus = 0.12 },
    [6] = { xpRequired = 10000, label = "Shot Caller", xpBonus = 0.16 },
    [7] = { xpRequired = 15000, label = "Boss",        xpBonus = 0.20 },
    [8] = { xpRequired = 25000, label = "Kingpin",     xpBonus = 0.25 },
}

Rob Protection by Level

config.lua
Config.RobProtectionByLevel = {
    [1] = 0.00,   -- no protection
    [4] = 0.10,   -- 10% less rob chance
    [6] = 0.25,   -- 25% less rob chance
    [8] = 0.50,   -- 50% less rob chance (Kingpin)
}

Zones

Zones define where players can sell. Each zone has its own price modifier, XP multiplier, minimum level requirement, and optional drug whitelist.

config.lua
Config.HeatZones = {
    {
        name          = "Davis",
        center        = { x = 95.0, y = -1550.0 },
        radius        = 150.0,
        bestDrugs     = { "cocaine", "meth_pooch" },
        minLevel      = 1,
        copChance     = nil,      -- nil = use global CopAlertPercentage
        robChance     = nil,      -- nil = use global RobPercentage
        priceModifier = 1.0,
        xpMultiplier  = 1.0,
        allowedDrugs  = nil,      -- nil = all drugs allowed
    },
    {
        name          = "Vinewood Hills",
        center        = { x = -500.0, y = 600.0 },
        radius        = 200.0,
        bestDrugs     = { "pressurep_pillz", "baddie_pack" },
        minLevel      = 6,        -- Shot Caller required
        copChance     = 40,
        robChance     = 5,
        priceModifier = 1.5,      -- 50% price premium
        xpMultiplier  = 2.0,      -- double XP
        allowedDrugs  = { "pressurep_pillz", "baddie_pack", "pretty_poison" },
    },
}

Drug List

Each drug entry defines its sell quantity range, base price, whether it pays dirty or clean money, and whether it participates in market fluctuation.

config.lua
Config.DrugList = {
    ['white_gold'] = {
        quantity   = { min = 1, max = 5 },
        price      = { min = 200, max = 200 },
        blackMoney = true,    -- true = dirty money | false = clean cash
        fluctuates = true,    -- true = weekly price changes
    },
    ['purple_dream'] = {
        quantity   = { min = 1, max = 5 },
        price      = { min = 800, max = 800 },
        blackMoney = false,
        fluctuates = false,   -- steady price, never fluctuates
    },
}

Level-Up Rewards

Defined in server/rewards.lua. Leave a level out entirely for no reward at that level. Supported types: weapon, item, money, black_money, vehicle.

server/rewards.lua
Config.LevelRewards = {
    [2] = {
        { type = 'weapon',      name = 'WEAPON_PISTOL', ammo = 50,    label = 'Pistol'      },
    },
    [4] = {
        { type = 'money',       amount = 5000,                       label = '$5,000 Cash' },
    },
    [6] = {
        { type = 'black_money', amount = 10000,                      label = '$10k Dirty'  },
    },
    [8] = {
        { type = 'vehicle',     model = 'bison',                       label = 'Trap Van'    },
        { type = 'black_money', amount = 25000,                      label = '$25k Dirty'  },
    },
}