Installation

1 min readUpdated 2 weeks ago

Overview

ML Shops is a shop system. Shops, traders, items, categories, and stock are all managed through an in-game admin panel and stored in the database. Supports NPC shopkeepers, blips, discounts, position cycling, and skills integration.

Quick Start

  1. Download from CFX Portal
  2. Extract to your resources folder as ml_shops
  3. Add to server.cfg:
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_shops
Load Order

ml_shops must start AFTER ml_bridge. Incorrect order causes startup errors.

Database

Auto Import

All tables are created automatically on first startup. No SQL to run manually.

Admin Panel

Access the admin panel with:

lua
1/shopadmin

Requires admin permission or the admin job (configurable in shared/config.lua).

From the admin panel you can create shops, assign traders, add items with prices and stock, configure NPC models, and set locations.

Verify

Start the server and check the console for:

lua
1[ml_shops] [INFO] ML Shops initialized

Open the admin panel to create your first shop.

Admin panel not opening:

Verify you have the correct permission or job defined in Config.Settings.AdminPermission / Config.Settings.AdminJob.

NPC not spawning:

Check that Config.Settings.PedSpawnDistance is not too low and the trader has valid coordinates set.