Installation
Overview
ML Shops builds shops and trader NPCs from an in-game admin panel. Each trader has its own model, outfit, animation, blip, stock, prices, opening hours and spawn positions, all saved in the database.
Quick Start
- Download from CFX Portal
- Extract to your
resourcesfolder asml_shops - Add to
server.cfg:
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_shopsLoad Order
ml_shops must start AFTER ml_bridge. Start ml_skills before it if you use skill locks.
Database
Tables are created on first start:
ml_shops_definitions: shopsml_shops_items: items, prices, costs and stock of each shopml_shops_npcs: traders, appearance, blip and opening hoursml_shops_shop_categories: item categories shown as tabs in the shopml_shops_vendor_categories: trader groups and the timer of their position rotationml_shops_trader_positions: extra spawn positions of rotating traders
The same SQL is in _INSTALL/ml_shops.sql if you prefer to import it by hand.
First Shop
- Open the admin panel with
/shopadmin - Create at least one category. Categories are the tabs players see inside a shop
- Create a trader, place it in the world and pick its look
- Add items to the trader. Every item needs a category and at least one cost: money, other items or both
The setup guide inside the panel walks through the same steps.
Verify
The console prints the version banner, with a line that starts with:
cfg
1[ml_shops] Resource started/shopadmindoes nothing: the player needs admin permission from the framework or ACE. Admin groups are set inml_bridge.- Trader not spawning: check that the trader is active, that its opening hours include the current hour, and that you are within
PedSpawnDistance. - Shop opens but buying fails: the player is farther than
PurchaseMaxDistancefrom the trader, or the shop was opened by export without being listed inConfig.AllowVirtualShop. - Item missing from the shop: the item name must exist in your inventory, and it needs stock above
0or infinite stock. - Skill locks ignored:
ml_skillsmust start beforeml_shops.