Skip to content

Customization

Everything you can change is in config.lua and locales/. The rest of the resource is escrowed, apart from the app’s screens.


FileWhat it decidesOpen to edit
config.luaFramework, money, failure chance, police, the App Store listing, drugs, levels, zonesYes
locales/*.luaThe phone notifications, one file per languageYes
locales/locales.luaThe locale table the language files fill inYes
ui/img/The app’s pictures: one per drug, the home-screen logo and the app icon (icon.png)Yes
ui/index.html, ui/styles.css, ui/script.jsThe app’s screens, layout and button labels—
player_data.jsonEvery dealer’s sales, level and bonus. Written by the resourceYes
client/, server/The logicEscrowed

There is no separate bridge folder: the framework is chosen by Config.Framework below.


OptionWhat it doesDefault
Config.Framework"ESX" or "QB", in capitals. On QBox, use "QB" — QBox runs QBCore resources through its compatibility layer"ESX"
Config.esxResourceNameThe resource name of ESX, if yours is not the standard one"es_extended"
Config.qbResourceNameThe resource name of QBCore, if yours is not the standard one. Leave it on "qb-core" on QBox"qb-core"
Config.BlackMoneyPay in black money instead of clean cashtrue
Config.MoneyAsItemPay as an inventory item instead of into an accounttrue
Config.MoneyItemThe item paid when MoneyAsItem is on and BlackMoney is off"money"

What the player actually receives:

ESXQBCore / QBox
Black money, as itemItem black_moneyItem blackmoney
Black money, as accountblack_money accountItem blackmoney
Clean money, as itemItem from Config.MoneyItemItem from Config.MoneyItem
Clean money, as accountCashCash

OptionWhat it doesDefault
Config.FailureThe chance, 0 to 100, that the buyer turns the player away after they knock. The drugs stay with the player55
Config.DealTimeoutSeconds to reach the door before the offer expires300
Config.MinimumPoliceOfficers online before anybody buys. 0 switches the check off1

The amount sold is picked at random between the drug’s minAmount and maxAmount when the player taps SELL; the door is picked at random from the drug’s zones.


OptionWhat it doesDefault
Config.PoliceJobsThe jobs counted as police, and the ones that receive alertspolice, sheriff
Config.PoliceAlertChanceThe chance, 0 to 100, that a successful sale is reported20
Config.PoliceNotifyAppNameThe title of the alert on the officer’s lb-phone"Police Dispatch"
Config.PoliceBlipSpriteThe blip placed where the sale happened161
Config.PoliceBlipColorIts colour38
Config.PoliceBlipScaleIts size1.0
Config.PoliceBlipDurationSeconds before the blip disappears120
Config.PriceMultipliersPrice tiers by number of officers online, each with minPolice, maxPolice and multiplierSee below

Shipped tiers: 1–2 officers ×1.0, 3–4 ×1.2, 5–6 ×1.4, 7–9 ×1.6, 10 or more ×2.0. With a number of officers no tier covers, prices stay at ×1.0.

How the price is worked out. The level bonus and the police bonus are added, not multiplied: a level-5 dealer (×1.5) selling with six officers online (×1.4) gets 1 + 0.5 + 0.4 = ×1.9 the base price.

Every officer with a job in PoliceJobs gets the alert; there is no on-duty check.


OptionWhat it doesDefault
Config.BlockedAppJobsJobs that cannot see or install the app. Checked when the player loads and whenever their job changespolice, sheriff, ambulance, mechanic

OptionWhat it doesDefault
Config.nameThe app’s name on the phone"Drug Dealer"
Config.descriptionThe line under it in the App Store"Deal dope, dodge the cops"
Config.defaultApptrue puts it on every phone already installed; false means it is downloaded from the App Storefalse
Config.sizeThe size shown in the store, in KB25400
Config.priceWhat it costs to install0

The app icon is ui/img/icon.png. Replace the file to change it.


Config.drugs is a list; each entry is one button in the app.

FieldWhat it does
itemThe inventory item that is sold
labelThe name shown in the app and in notifications
pricePrice per unit, before bonuses
minAmount, maxAmountThe range the amount of each deal is drawn from
zonesWhich zones of Config.NPCLocations a buyer can be in
imageA file name inside ui/img/
minLevelThe dealer level needed to sell it

To add a drug, add an entry, put its picture in ui/img/, and make sure the item exists in your inventory. Pictures already there that the shipped list uses: baggy_weed.png, baggy_cocaine.png, lsd.png, baggy_meth.png, mushroom.png, opium.png, crack.png, drug_heroin.png, xtc_baggy.png, oxy.png, drug_lean.png, drug_hash.png.


Config.levels lists the ranks in order. Each has a level number, a name, salesRequired (the total number of deals, not units) and bonusMultiplier.

LevelNameSalesBonus
1Newbie0×1.0
2Rookie25×1.1
3Hustler75×1.2
4Dealer150×1.35
5Trader300×1.5
6Boss600×1.75
7Kingpin1200×2.0
8Overlord2000×2.25
9Tycoon3500×2.5
10Legend5000×3.0

Keep them in rising order of salesRequired; the level is worked out by walking down the list.

OptionWhat it doesDefault
Config.dataFileThe file in the resource folder that stores each dealer’s progress"player_data.json"

Progress is kept per character: the ESX identifier or the QBCore citizen ID.


Config.NPCLocations is numbered; the numbers are what a drug’s zones refers to. Each zone has:

FieldWhat it does
pedsPed models, one picked at random to answer the door
locationsDoor positions (x, y, z and heading)
ZoneAreaDoors shipped
1Grove1
2Pier and beach10
3Vinewood houses10
4Sandy Shores8
5Paleto Bay9

You can add zones and doors freely. One thing to know: the zone name in the police alert comes from the resource itself and only knows zones 1 to 5; any zone you add is reported as “Unknown Zone”.


Nine ship in locales/: en, es, fr, de, it, pt, pl, ru and tr. Set Config.Locale to one of them.

To add one:

  1. Copy locales/en.lua to a new file, for example locales/nl.lua.
  2. Change the code at the top to nl and translate the text.
  3. Add locales/nl.lua to the shared_scripts list in fxmanifest.lua, next to the others and above config.lua.
  4. Set Config.Locale = "nl", then refresh and restart the resource.

The locales cover the phone notifications. The app’s own buttons — DRUGS, PROFILE, SELL, CANCEL and the profile screen — are written in ui/script.js and ui/index.html.