Drug Sales · origen_ilegalv2
The drug sales system lets players sell drugs to NPC customers. It 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. |
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.
CustomerPriority = {
enabled = true,
distanceThreshold = 0.5, -- meters: customers closer are in the "near" group
priorityByArrival = true, -- earlier arrivals get served first
showWaitingMessages = true, -- show queue position messages to waiting customers
messageUpdateInterval = 0,
fixedMessages = true,
},Customer peds
NPC ped models used as customers. Add/remove entries as needed.
CustomerPeds = {
's_m_y_doorman_01',
'a_f_m_tourist_01',
'a_m_m_eastsa_02',
'a_m_m_polynesian_01',
'ig_priest',
'ig_ramp_hipster',
'ig_rashcosvki',
'ig_money',
'ig_hunter',
},Police alerts
PoliceAlerts = {
onReject = true, -- alert when customer rejects
onAccept = { enabled = true, percentage = 20 }, -- % chance on accept
},
PoliceJobs = {
['police'] = true,
['sheriff'] = true,
['sapd'] = true,
},Street sale settings
Shared settings used by both modes when a ped walks up to the player during a sale.
StreetSale = {
Enable = true, -- legacy guard, modes are controlled via Modes above
MaxDistance = 6.0, -- meters
CooldownTime = 5000, -- ms between attempts (anti-spam)
OnlyPeds = true, -- only NPC peds can buy
ExcludePlayerPeds = true, -- exclude player-controlled peds
IgnoreDeadPeds = true, -- skip dead peds as targets
PriceMultiplier = 0.8, -- 80% of the normal drug price
},Drug list
Define which items are sellable in DrugList. Each entry supports the following fields:
Base fields
| Field | Type | Description |
|---|---|---|
label | string | Display name shown in the interaction UI |
image | string | Optional image URL or path (used in the admin panel) |
quantity | { min, max } | Units sold per transaction |
price | { min, max } | Price per unit in $ |
prop | string | World prop held during the exchange |
rejectChance | number|nil | Per-drug reject % override. Falls back to RejectPercentage if nil |
policeChance | number|nil | Per-drug police alert % on accept override |
forSale | boolean | Whether this drug can be sold to NPCs. Defaults to true |
forConsumption | boolean | Whether this drug can be consumed by the player. Defaults to false |
effect (consumption only)
Applied when the player consumes the drug. Only used if forConsumption = true.
| Field | Type | Description |
|---|---|---|
type | string | Effect type key (see table below) |
value | number|nil | Intensity of the effect (meaning varies per type) |
duration | number|nil | Duration in seconds |
Available effect types:
| Key | Description | Uses value | Uses duration |
|---|---|---|---|
heal | Restore value% of max HP | ✅ (%) | — |
armor | Add value armor points | ✅ | — |
stamina | Restore stamina instantly | — | — |
heal_full | Full HP + full armor | — | — |
speed | Move speed multiplier | ✅ (multiplier) | ✅ |
superman | Speed ×2 + super jump | — | ✅ |
no_ragdoll | Disable ragdoll | — | ✅ |
super_jump | Enable super jump | — | ✅ |
invincible | God mode | — | ✅ |
one_punch | Massive melee damage | — | ✅ |
infinite_stamina | Infinite stamina | — | ✅ |
fireproof | Fire immunity | — | ✅ |
screen_high | Aliens fight post-fx | — | ✅ |
screen_drunk | Drunk shake + blur | ✅ (0–5 intensity) | ✅ |
blur | Screen blur fx | — | ✅ |
night_vision | Night vision | — | ✅ |
consume (consumption animation)
Controls the animation and progress bar shown when the player consumes the drug.
| Field | Type | Description |
|---|---|---|
animDict | string|nil | Animation dictionary |
animClip | string|nil | Animation clip |
animFlag | number | Animation flag (default 49) |
progressDur | number|nil | Progress bar duration in seconds |
progressLabel | string|nil | Progress bar label. Falls back to "Consuming {drug label}" |
canMove | boolean | Allow movement during consumption (default false) |
propModel | string|nil | Optional prop held during the animation |
propBone | number | Ped bone to attach prop to (default 57005 — right hand) |
propPos | { x, y, z } | Prop position offset |
propRot | { x, y, z } | Prop rotation offset |
Full entry example
DrugList = {
['packaged_weed'] = {
label = 'Gram of Marijuana',
quantity = { min = 1, max = 3 },
price = { min = 80, max = 150 },
prop = 'prop_weed_block_01',
forSale = true,
forConsumption = true,
effect = {
type = 'infinite_stamina',
duration = 30,
},
consume = {
animDict = 'amb@world_human_smoking@male@male1@base',
animClip = 'base',
animFlag = 49,
progressDur = 3,
progressLabel = 'Smoking...',
canMove = true,
},
},
['cokebaggy'] = {
label = 'Cocaine Bag',
quantity = { min = 1, max = 2 },
price = { min = 250, max = 400 },
prop = 'prop_drug_package_02',
forSale = true,
},
['meth_bag'] = {
label = 'Meth Bag',
quantity = { min = 1, max = 2 },
price = { min = 200, max = 350 },
prop = 'prop_drug_package_02',
forSale = true,
},
},Origin weed packages (by rarity)
Entry-level drug priced lower and tiered by rarity:
['weed_packed_common'] = { label = 'Marijuana Pack (Common)', quantity = { min = 1, max = 5 }, price = { min = 45, max = 75 }, prop = 'prop_weed_block_01' },
['weed_packed_uncommon'] = { label = 'Marijuana Pack (Uncommon)', quantity = { min = 1, max = 4 }, price = { min = 60, max = 95 }, prop = 'prop_weed_block_01' },
['weed_packed_rare'] = { label = 'Marijuana Pack (Rare)', quantity = { min = 1, max = 4 }, price = { min = 80, max = 115 }, prop = 'prop_weed_block_01' },
['weed_packed_epic'] = { label = 'Marijuana Pack (Epic)', quantity = { min = 1, max = 3 }, price = { min = 95, max = 130 }, prop = 'prop_weed_block_01' },
['weed_packed_legendary'] = { label = 'Marijuana Pack (Legendary)', quantity = { min = 1, max = 3 }, price = { min = 110, max = 148 }, prop = 'prop_weed_block_01' },The entire drug list can be managed directly from the admin panel (/gangadmin) without touching any config file. You can create, edit, and delete drugs at runtime — including prices, quantities, effects, and consumption animations. Changes are persisted in origen_drug_sales_custom in the database and merged with the static config on startup. Static entries without a DB override are treated as forSale = true, forConsumption = false by default.
Blacklisted zones
Sales are blocked inside configured zones. Add more entries as needed:
BlacklistedZones = {
{ name = "Police Station", coords = vector3(425.1, -979.5, 30.7), radius = 100.0 },
{ name = "Hospital", coords = vector3(298.7, -584.7, 43.2), radius = 100.0 },
{ name = "Airport", coords = vector3(-1037.45, -2737.04, 20.17), radius = 400.0 },
},Customer escape
If the seller ignores a waiting customer, the NPC flees after a timeout.
CustomerEscape = {
enabled = true,
escapeTime = 20000, -- ms before the customer runs
escapeDistance = { min = 40, max = 60 }, -- meters run before despawn
},Animations
Animations = {
phoneCall = {
enabled = true,
duration = 3000,
phoneModel = "prop_npc_phone_02",
},
exchange = {
enabled = true,
duration = 3000,
playerAnim = 'givetake1_a',
npcAnim = 'givetake1_b',
},
},Blip & messages
BlipSettings = {
enable = false, -- show sell point blip on the minimap
},
Messages = {
accepted = 'drug_sales.messages.accepted',
rejected = 'drug_sales.messages.rejected',
waiting = 'drug_sales.messages.waiting',
},Debug
Debug = {
enabled = false,
showBlacklistedZones = true,
showSaleRadius = true,
markerSettings = {
type = 1,
scale = { x = 1.0, y = 1.0, z = 100.0 },
color = { r = 255, g = 0, b = 0, a = 100 },
colorSaleRadius = { r = 0, g = 255, b = 0, a = 100 },
},
},