Installation
Requirements
Section titled “Requirements”| 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.
Step by step
Section titled “Step by step”1. Copy the resources
Section titled “1. Copy the resources”Put both folders in your resources directory, for example inside resources/[ScriptLab]/:
sl_shop_mlosl_shops
2. Add them to server.cfg
Section titled “2. Add them to server.cfg”sl_shop_mlo goes before sl_shops, and both go after your framework, inventory and oxmysql:
ensure oxmysqlensure qb-core # or es_extended / qbx_coreensure qb-inventory # or ox_inventory, qs-inventory...ensure sl_shop_mloensure sl_shops3. Turn off what would clash
Section titled “3. Turn off what would clash”- 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.
4. Add the items
Section titled “4. Add the items”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.luaintoqb-core/shared/items.lua, and copyinstall/qb-core/images/intoqb-inventory/html/images/. - ox_inventory (ESX or Qbox): paste
install/ox_inventory/items.luaintoox_inventory/data/items.lua, and copyinstall/ox_inventory/images/intoox_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.
5. Start the server
Section titled “5. Start the server”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.
6. Give the staff permissions
Section titled “6. Give the staff permissions”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 allowCheck that it works
Section titled “Check that it works”- Walk into a state 24/7, pick up a product, take it to the register and pay. The item must be in your inventory.
- As an admin, open the panel with
/slshops_admin. - Buy a shop that is for sale (the sale point in front of the door) and open the computer in the back room.
Updating
Section titled “Updating”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.