Skip to content

Installation

Five minutes: one SQL file, one line in config.lua, one line in server.cfg.


You needWhy
lb-phoneThe app lives on it
oxmysqlOffers, likes and takings are kept in your database
ESX, QBCore or QBoxInventory, money and the player’s identity

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


Import pawnshop.sql from the resource folder once, with HeidiSQL, phpMyAdmin or whatever you use. It creates three tables:

TableWhat it holds
pawn_offersEvery listing: item, quantity, price, price type, seller, dates and metadata
pawn_earningsEach seller’s takings waiting to be cashed out
liked_offersWho liked which offer

The resource does not create them by itself.

It worked when the three tables are in the same database your server uses.


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

The app waits for lb-phone and adds itself again whenever lb-phone restarts, so a late phone is fine; the framework and oxmysql must be up first.


Open config.lua:

OptionESXQBCoreQBox
Config.Framework"esx""qb""qb"
Config.InventoryImagePath"ox_inventory/web/images/""qb-inventory/html/images/""ox_inventory/web/images/"

The framework is not detected, and it is written in lower case. On QBox, use "qb": QBox runs QBCore resources through its compatibility layer. The image path is only for the pictures in the app — any inventory works, as long as the path points at the folder where its item images are.


There are none to add. The app sells whatever players already carry. Anything you never want traded goes in Config.BlackList (see Customization).


  1. Open lb-phone. Pawn Shop is on the home screen already — it is installed by default.
  2. Create an offer: pick an item from your inventory, set a quantity and a price, and choose Unit or Total.
  3. On a second character, open the app and buy it.

It worked when the item leaves the seller’s inventory when the offer is posted, arrives in the buyer’s when it is bought, and the seller sees the money under Pending at the top of the app, ready to transfer.


  • Decide where the money comes from. Config.Bank = true uses bank accounts. Paying in items needs money to be an inventory item — read Customization first.
  • Set Config.Expire knowingly. An offer that expires is removed with its items; they do not go back to the seller.
  • Fill Config.BlackList with anything that must not change hands: the shipped list only holds burger and weapon_appistol as examples.
  • Move the pawn shop to where you want it, if you turn on Config.RequireLocation.