Customization
Everything you can change is in config.lua and locales/. The rest of the resource is escrowed, apart from the app’s screens.
Which file decides what
Section titled “Which file decides what”| File | What it decides | Open to edit |
|---|---|---|
config.lua | Framework, money, failure chance, police, the App Store listing, drugs, levels, zones | Yes |
locales/*.lua | The phone notifications, one file per language | Yes |
locales/locales.lua | The locale table the language files fill in | Yes |
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.js | The app’s screens, layout and button labels | — |
player_data.json | Every dealer’s sales, level and bonus. Written by the resource | Yes |
client/, server/ | The logic | Escrowed |
There is no separate bridge folder: the framework is chosen by Config.Framework below.
Framework and money
Section titled “Framework and money”| Option | What it does | Default |
|---|---|---|
Config.Framework | "ESX" or "QB", in capitals. On QBox, use "QB" — QBox runs QBCore resources through its compatibility layer | "ESX" |
Config.esxResourceName | The resource name of ESX, if yours is not the standard one | "es_extended" |
Config.qbResourceName | The resource name of QBCore, if yours is not the standard one. Leave it on "qb-core" on QBox | "qb-core" |
Config.BlackMoney | Pay in black money instead of clean cash | true |
Config.MoneyAsItem | Pay as an inventory item instead of into an account | true |
Config.MoneyItem | The item paid when MoneyAsItem is on and BlackMoney is off | "money" |
What the player actually receives:
| ESX | QBCore / QBox | |
|---|---|---|
| Black money, as item | Item black_money | Item blackmoney |
| Black money, as account | black_money account | Item blackmoney |
| Clean money, as item | Item from Config.MoneyItem | Item from Config.MoneyItem |
| Clean money, as account | Cash | Cash |
The deal
Section titled “The deal”| Option | What it does | Default |
|---|---|---|
Config.Failure | The chance, 0 to 100, that the buyer turns the player away after they knock. The drugs stay with the player | 55 |
Config.DealTimeout | Seconds to reach the door before the offer expires | 300 |
Config.MinimumPolice | Officers online before anybody buys. 0 switches the check off | 1 |
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.
Police
Section titled “Police”| Option | What it does | Default |
|---|---|---|
Config.PoliceJobs | The jobs counted as police, and the ones that receive alerts | police, sheriff |
Config.PoliceAlertChance | The chance, 0 to 100, that a successful sale is reported | 20 |
Config.PoliceNotifyAppName | The title of the alert on the officer’s lb-phone | "Police Dispatch" |
Config.PoliceBlipSprite | The blip placed where the sale happened | 161 |
Config.PoliceBlipColor | Its colour | 38 |
Config.PoliceBlipScale | Its size | 1.0 |
Config.PoliceBlipDuration | Seconds before the blip disappears | 120 |
Config.PriceMultipliers | Price tiers by number of officers online, each with minPolice, maxPolice and multiplier | See 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.
Who sees the app
Section titled “Who sees the app”| Option | What it does | Default |
|---|---|---|
Config.BlockedAppJobs | Jobs that cannot see or install the app. Checked when the player loads and whenever their job changes | police, sheriff, ambulance, mechanic |
The App Store listing
Section titled “The App Store listing”| Option | What it does | Default |
|---|---|---|
Config.name | The app’s name on the phone | "Drug Dealer" |
Config.description | The line under it in the App Store | "Deal dope, dodge the cops" |
Config.defaultApp | true puts it on every phone already installed; false means it is downloaded from the App Store | false |
Config.size | The size shown in the store, in KB | 25400 |
Config.price | What it costs to install | 0 |
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.
| Field | What it does |
|---|---|
item | The inventory item that is sold |
label | The name shown in the app and in notifications |
price | Price per unit, before bonuses |
minAmount, maxAmount | The range the amount of each deal is drawn from |
zones | Which zones of Config.NPCLocations a buyer can be in |
image | A file name inside ui/img/ |
minLevel | The 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.
Levels
Section titled “Levels”Config.levels lists the ranks in order. Each has a level number, a name, salesRequired (the total number of deals, not units) and bonusMultiplier.
| Level | Name | Sales | Bonus |
|---|---|---|---|
| 1 | Newbie | 0 | ×1.0 |
| 2 | Rookie | 25 | ×1.1 |
| 3 | Hustler | 75 | ×1.2 |
| 4 | Dealer | 150 | ×1.35 |
| 5 | Trader | 300 | ×1.5 |
| 6 | Boss | 600 | ×1.75 |
| 7 | Kingpin | 1200 | ×2.0 |
| 8 | Overlord | 2000 | ×2.25 |
| 9 | Tycoon | 3500 | ×2.5 |
| 10 | Legend | 5000 | ×3.0 |
Keep them in rising order of salesRequired; the level is worked out by walking down the list.
| Option | What it does | Default |
|---|---|---|
Config.dataFile | The 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:
| Field | What it does |
|---|---|
peds | Ped models, one picked at random to answer the door |
locations | Door positions (x, y, z and heading) |
| Zone | Area | Doors shipped |
|---|---|---|
| 1 | Grove | 1 |
| 2 | Pier and beach | 10 |
| 3 | Vinewood houses | 10 |
| 4 | Sandy Shores | 8 |
| 5 | Paleto Bay | 9 |
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”.
Languages
Section titled “Languages”Nine ship in locales/: en, es, fr, de, it, pt, pl, ru and tr. Set Config.Locale to one of them.
To add one:
- Copy
locales/en.luato a new file, for examplelocales/nl.lua. - Change the code at the top to
nland translate the text. - Add
locales/nl.luato theshared_scriptslist infxmanifest.lua, next to the others and aboveconfig.lua. - Set
Config.Locale = "nl", thenrefreshand 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.