Troubleshooting
The things that actually go wrong, and where to look.
A change to a file did nothing
Section titled “A change to a file did nothing”A plain restart does not re-read fxmanifest.lua. If you added a file — a new locale, say — type refresh in the server console first, then restart mic_drugdealer. Changes to config.lua only need the restart.
The app is not in the App Store
Section titled “The app is not in the App Store”In order:
- Is lb-phone running? The app waits for it and adds itself as soon as it starts.
- Is the player’s job in
Config.BlockedAppJobs? Police, sheriff, ambulance and mechanic cannot see it by default. Test with another job. - Is
Config.defaultAppoff? Then the app is not on the home screen until it is installed from the App Store.
The server console errors on start about getSharedObject or GetCoreObject
Section titled “The server console errors on start about getSharedObject or GetCoreObject”Config.Framework does not match your server, or the framework started after this resource. Use "ESX" or "QB" in capitals, and put ensure mic_drugdealer below your framework in server.cfg.
On QBox, the value is "QB" — QBox runs QBCore resources through its compatibility layer — with Config.qbResourceName left on "qb-core", and qbx_core must start before mic_drugdealer.
The app opens but says “No drugs available”
Section titled “The app opens but says “No drugs available””The folder has been renamed. The app’s screens talk to the resource by the name mic_drugdealer; put the folder name back.
“Not enough police officers online!”
Section titled ““Not enough police officers online!””Config.MinimumPolice ships at 1, so with nobody on a job from Config.PoliceJobs online, nobody buys. Set it to 0 to switch the check off, or make sure your police job names are in Config.PoliceJobs.
“You don’t have enough … in your inventory”
Section titled ““You don’t have enough … in your inventory””The item name in Config.drugs must be the exact item name in your inventory. The shipped list uses names such as maria, coca and meta; yours are probably different. Also remember the amount is drawn between minAmount and maxAmount — a player carrying 2 can be asked for 8.
“You need to be level … to sell …”
Section titled ““You need to be level … to sell …””That drug’s minLevel is above the player’s level. PROFILE in the app shows their level and how many sales are left to the next one. Lower minLevel, or edit the levels, in config.lua.
“The buyer rejected the offer and the sale failed!”
Section titled ““The buyer rejected the offer and the sale failed!””That is Config.Failure: the chance, out of 100, that the door stays shut after the knock. It ships at 55, so more than half of the doors say no. The player keeps the drugs; they just have to start a new deal.
“The offer has expired!”
Section titled ““The offer has expired!””The player took longer than Config.DealTimeout seconds (300) to reach the door. Raise it if your zones are far from where players usually are.
The money went somewhere unexpected
Section titled “The money went somewhere unexpected”Check the table in Customization under “Framework and money”. The two surprises:
- On QBCore, black money is always paid as an item called
blackmoney, even withConfig.MoneyAsItemoff. If that item does not exist in your inventory, the payment is lost. Create it, or setConfig.BlackMoney = false. - On ESX with
Config.MoneyAsItem = true, the payment is an item. That is what ox_inventory expects; with an inventory that keeps money as accounts, setMoneyAsItem = false.
The paid amount is higher than the notification said
Section titled “The paid amount is higher than the notification said”The phone notification shows the base price with the level bonus. The server then adds the police bonus from Config.PriceMultipliers, so with more officers online the player receives more than the notification announced.
Police are not getting alerts
Section titled “Police are not getting alerts”Only a share of successful sales is reported — Config.PoliceAlertChance, 20 out of 100 by default. The officers must have lb-phone and a job listed in Config.PoliceJobs. The blip lasts Config.PoliceBlipDuration seconds.
Levels reset after a restart
Section titled “Levels reset after a restart”Progress lives in player_data.json inside the resource folder. If the server cannot write there — a read-only folder, or a host that restores files on every restart — nothing is kept. The console prints an error when a save fails.