Skip to content

Installation

Resource Why
One framework: qb-core (QBCore), es_extended (ESX Legacy) or qbx_core (Qbox) Players, money and jobs. Detected automatically
oxmysql Database
An inventory: qb-inventory, ox_inventory, qs-inventory or UrantixPlayermenu Purchases go to the player’s inventory. Detected automatically
sl_shop_mlo Included with SL-Shops: our 24/7 interior and the map fixes of every shop
MySQL or MariaDB Stores shops, furniture, stock and sales
A fuel script (optional) Only for the LTD pumps. See Gas stations

Tested with sv_enforceGameBuild 3095.

Put both folders in your resources directory, for example inside resources/[ScriptLab]/:

  • sl_shop_mlo
  • sl_shops

sl_shop_mlo goes before sl_shops, and both go after your framework, inventory and oxmysql:

ensure oxmysql
ensure qb-core # or es_extended / qbx_core
ensure qb-inventory # or ox_inventory, qs-inventory...
ensure sl_shop_mlo
ensure sl_shops
  • Shop scripts that use the same shops (for example qb-shops): remove the 24/7, liquor store and LTD locations from them, or SL-Shops and that script will both sell there.
  • Store robbery scripts (for example qb-storerobbery): turn them off. SL-Shops has its own robberies for the registers and safes.

Every product is its own item of your inventory (55 products, 55 items), each with its picture: what you take from the shelf is what you get, and what you hold when you eat or drink it. They are ready in sl_shops/install/:

  • QBCore / qb-inventory: paste the items you are missing from install/qb-core/items.lua into qb-core/shared/items.lua, and copy install/qb-core/images/ into qb-inventory/html/images/.
  • ox_inventory (ESX or Qbox): paste install/ox_inventory/items.lua into ox_inventory/data/items.lua, and copy install/ox_inventory/images/ into ox_inventory/web/images/.
  • Other inventories: create the items with the same names and copy the pictures.

And for robberies: lockpick (registers), stethoscope (safe, not used up) and markedbills (the loot on QBCore and Qbox; ESX pays it as black money).

Skip the items your server already has. Eating and drinking them works on its own: see Configuration.

The database tables are created automatically: there is nothing to import. The shops appear on their own: state shops open and full, the rest for sale.

Check the server console: nothing in red from sl_shops or sl_shop_mlo. The console also says which framework, inventory and fuel script were detected.

The admin panel and commands are for your framework’s admins. You can also give them with an ace:

add_ace group.admin slshops.admin allow
  1. Walk into a state 24/7, pick up a product, take it to the register and pay. The item must be in your inventory.
  2. As an admin, open the panel with /slshops_admin.
  3. Buy a shop that is for sale (the sale point in front of the door) and open the computer in the back room.

Replace both folders with the new version and restart the server. Your config.lua and locales/ are open files: compare them with the new ones before replacing them. The database updates itself.