Skip to content

Installation

Five minutes. No SQL, no item file to import: what you need is lb-phone, one line in config.lua, and drugs in your inventory that the app can sell.


You needWhy
lb-phoneThe app lives on it, and every notification goes through it
ESX, QBCore or QBoxInventory, money, jobs and the player’s identity
Drug items in your inventoryThe app sells what players carry; it does not create items

Drop mic_drugdealer into your resources, for example resources/[mic]/mic_drugdealer.


2. Start it after lb-phone and your framework

Section titled “2. Start it after lb-phone and your framework”

In server.cfg, add ensure mic_drugdealer on a line below your framework and below lb-phone.

The app waits for lb-phone and adds itself again whenever lb-phone restarts, so the order is forgiving, but the framework must be up first: the server side asks for it the moment it starts.


Levels and sale counts are saved in player_data.json in the resource folder. The resource creates it if it is missing. Your server must be allowed to write to that folder.


This one is not detected. Open config.lua and set Config.Framework:

Your frameworkValue
ESX"ESX"
QBCore"QB"
QBox"QB"

Capitals matter. If your framework’s resource has a custom name, change Config.esxResourceName or Config.qbResourceName to match; otherwise leave them alone.

On QBox, use "QB" and leave Config.qbResourceName on "qb-core": QBox runs QBCore resources through its compatibility layer, and qbx_core provides qb-core.


The resource does not ship item definitions: it sells items your inventory already knows. The shipped config expects these names:

ItemSold asZonesLevel
mariaWeedGrove1
cocaCokePier, Paleto3
lsdLSDGrove, Pier, Vinewood2
metaMethSandy, Paleto4
mushMushroomGrove, Sandy2
opiumOpiumPaleto1
crackCrackGrove, Sandy3
heroinHeroinSandy, Paleto5
xtcEcstasyPier, Vinewood2
oxyOxycontinVinewood, Sandy3
leanLeanGrove, Pier1
hashHashGrove, Vinewood2

Your drugs are probably called something else. Change the item field of each entry in Config.drugs to match your inventory, rather than creating new items — see Customization.

The money items matter too:

  • ESX with Config.MoneyAsItem = true pays black_money (or Config.MoneyItem when black money is off) as an item — right for ox_inventory.
  • QBCore pays black money as an item called blackmoney. Make sure that item exists, or switch Config.BlackMoney off.

The pictures in ui/img/ are the app’s own drug icons. They are plain PNGs, so you may copy them into your inventory’s image folder if you want the same look there.


  1. Put Config.MinimumPolice = 0 for the test — the shipped value is 1, and nobody buys with no police online.
  2. Join with a job that is not in Config.BlockedAppJobs (police, sheriff, ambulance and mechanic are).
  3. Open lb-phone, find Drug Dealer in the App Store and install it.
  4. Give yourself a few maria, open the app, tap DRUGS, then Weed, then SELL.

It worked when a red route appears on the map with a countdown in the app. Drive there, walk up to the door marker and press E: the player knocks, a buyer steps out, and the phone says what you sold and for how much. PROFILE now shows one sale.


  • Set Config.MinimumPolice back to what your city wants.
  • Clear the test progress. player_data.json ships with example entries and keeps yours from testing. Delete the file; the resource creates an empty one on its next start.
  • Match every item name in Config.drugs to your inventory. A drug nobody can carry is a button that only ever says “You don’t have enough”.
  • Check the money item for your framework, above.
  • Check Config.BlockedAppJobs and Config.PoliceJobs use your job names.