fivemeconomydrugscriminalroleplay
Building a Drug Economy in FiveM — Processing, Selling and Turf War
March 22, 2026
2 min read
4 views
Drug Economy in FiveM
The drug economy is one of the most highly engaging systems in criminal RP because it combines risk, reward, and social conflict.
Economy Chain
Harvest Seeds → Process Raw → Sell to NPC/Player
(Weed Plants) (Weed Lab) (Dealer NPCs)
Config
Config.Drugs = {
weed = {
seed = 'weed_seed',
raw = 'weed_raw',
processed = 'weed',
growTime = 3600, -- 1 real hour
harvestAmount = { min = 3, max = 8 },
processTime = 10000,
processAmount = 1, -- raw 2 -> processed 1
processNeeds = 2,
basePrice = 500,
priceVariance = 0.3, -- ±30%
},
meth = {
seed = nil,
raw = 'chemicals',
processed = 'meth',
processTime = 30000,
processAmount = 2,
processNeeds = 5,
basePrice = 2000,
priceVariance = 0.4,
}
}
Config.GrowSpots = {
{ coords = vector3(-1268.0, -1594.0, 4.0), drug = 'weed', label = 'garden plot 1' },
{ coords = vector3(-1279.0, -1610.0, 3.0), drug = 'weed', label = 'garden plot 2' },
}
Config.Labs = {
{ coords = vector3(-1089.7, -1600.2, 4.4), drug = 'meth', label = 'Lab Nuea' },
{ coords = vector3(1150.0, -1600.0, 35.0), drug = 'weed', label = 'Lab Tai' },
}
Config.Dealers = {
{ coords = vector3(165.0, -1718.0, 29.0), drug = 'weed', multiplier = 1.0 },
{ coords = vector3(-1589.0, -1078.0, 13.0), drug = 'meth', multiplier = 1.2 },
}
Dynamic Pricing
-- server.lua
local drugPrices = {}
-- Calculate price based on supply/demand
local salesHistory = {} -- {[drug] = count in last 1 hour}
local function GetDrugPrice(drug)
local base = Config.Drugs[drug].basePrice
local variance = Config.Drugs[drug].priceVariance
local sales = salesHistory[drug] or 0
-- The more you sell, the lower the price (higher supply)
local demandMultiplier = 1.0 - (math.min(sales, 50) / 50 * variance)
-- a little random noise
local noise = (math.random() - 0.5) * 0.1
return math.floor(base * (demandMultiplier + noise))
end
-- Reset sales history every 1 hour
Citizen.CreateThread(function()
while true do
Citizen.Wait(3600000)
salesHistory = {}
-- broadcast new price
TriggerClientEvent('drug:priceUpdate', -1, GetAllPrices())
end
end)
-- Sell
RegisterNetEvent('drug:sell')
AddEventHandler('drug:sell', function(drug, amount)
local src = source
local xPlayer = ESX.GetPlayerFromId(src)
-- Check item
local item = xPlayer.getInventoryItem(drug)
if item.count < amount then
TriggerClientEvent('M2.Notify:Notify', src, 'error', 'Not enough medicine', 3000)
return
end
local price = GetDrugPrice(drug) * amount
xPlayer.removeInventoryItem(drug, amount)
xPlayer.addMoney(price)
-- Update sales history
salesHistory[drug] = (salesHistory[drug] or 0) + amount
TriggerClientEvent('M2.Notify:Notify', src, 'success',
string.format('Sell %d %s for $%d', amount, drug, price), 5000)
end)
Growing System
-- server.lua — save plants in DB
local activePlants = {}
RegisterNetEvent('drug:plant')
AddEventHandler('drug:plant', function(spotId)
local src = source
local xPlayer = ESX.GetPlayerFromId(src)
local drug = GetSpotDrug(spotId)
-- Check seed
local seedItem = Config.Drugs[drug].seed
if not xPlayer.getInventoryItem(seedItem) then return end
xPlayer.removeInventoryItem(seedItem, 1)
local harvestTime = GetGameTimer() + (Config.Drugs[drug].growTime * 1000)
activePlants[spotId] = {
owner = xPlayer.identifier,
drug = drug,
harvestTime = harvestTime
}
-- DB record
MySQL.insert.await(
'INSERT INTO drug_plants (spot_id, owner, drug, harvest_time) VALUES (?, ?, ?, ?)',
{ spotId, xPlayer.identifier, drug, harvestTime }
)
end)
Summary
A good drug economy has a balance between risk (police, turf war) and reward (profit). Dynamic pricing allows the market to not saturate and players to diversify their behavior.
Related Articles
Breaking: GTA Online อัพเดท "Money Fronts" — FiveM Server Owners ต้องทำอะไร?
Rockstar ปล่อย GTA Online อัพเดท Money Fronts มีผลกระทบต่อ FiveM servers บางส่วน นี่คือสิ่งที่ต้องทำทันทีหลังอัพเดท
Community Spotlight: Script และ Projects ที่น่าสนใจจาก FiveM Community
รวม scripts, tools และ projects ที่โดดเด่นจาก FiveM community ในช่วงที่ผ่านมา ตั้งแต่ free resources ถึง open-source projects
txAdmin อัพเดทใหม่ — Dashboard, Diagnostics และ Ban System ที่ดีขึ้น
txAdmin ซึ่งตอนนี้เป็นส่วนหนึ่งของ Cfx.re อย่างเป็นทางการ ได้รับการอัพเดทครั้งใหญ่ มี features ใหม่ที่ทำให้ Server Management ง่ายขึ้นมาก