Overview
E-commerce stores owned by players with NPCs cash on delivery system for FiveM. Players can register stores, manage inventory, and customers can place orders with NPC delivery.
Features
- Player-Owned Stores - Custom branding and store management
- NPC Delivery System - Cash on delivery with NPC drivers
- Store Registration - Admin approval system
- Employee Management - Add employees for restocking
- Order Tracking - View and manage customer orders
- Tablet UI - Interface with prop animation
Framework Setup ⚠️
This script supports QBCore and Qbox frameworks. You CANNOT have both loaded simultaneously.
For Qbox (Default):
- Keep
@qbx_core/modules/lib.luauncommented inshared_scripts - Keep
@qbx_core/modules/playerdata.luauncommented inclient_scripts - COMMENT OUT
@qb-core/client/main.luainclient_scripts
For QBCore:
- COMMENT OUT
@qbx_core/modules/lib.luainshared_scripts - COMMENT OUT
@qbx_core/modules/playerdata.luainclient_scripts - Keep
@qb-core/client/main.luauncommented inclient_scripts
Dependencies
Required:
ox_lib- UI libraryoxmysql- Database handlerox_inventoryorqb-inventory- Inventory systemox_targetorqb-target- Interaction system (or use 3DText)
Framework:
qbx_core(for Qbox) ORqb-core(for QBCore)
Installation
1
Extract Resource
Extract the sg-online-stores folder to your resources/[scripts] directory
2
Configure Framework
Configure framework in fxmanifest.lua (see Framework Setup above)
3
Configure Settings
Edit config.lua to match your server setup
4
Add to server.cfg
ensure sg-online-stores5
Restart Server
Database tables are created automatically on first run
Configuration
Edit config.lua to customize:
- Framework: Auto-detect or manually set (
qbcore/qbox) - Inventory:
ox_inventoryorqb-inventory - Menu System:
ox_liborqb-menu - Interaction:
ox_target,qb-target, or3DText - Registration Fee: Default is R250,000
- Default Delivery Fee: Default is R10,000
Usage
Commands
/market- Open the e-commerce interface (configurable in config.lua)
Store Management
- Register Store: Pay registration fee and submit for approval
- Admin Approval: Admins can approve/reject/suspend stores
- Stock Items: Add items from your inventory to your store
- Set Prices: Configure pricing for each item
- Manage Orders: View and process customer orders
- Withdraw Funds: Store owners can withdraw accumulated funds
- Employees: Add employees to help with restocking