sg-online-stores

v2.0.0

E-commerce stores owned by players with NPCs cash on delivery system for FiveM.

QBCore / QBoxPurchase

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):

  1. Keep @qbx_core/modules/lib.lua uncommented in shared_scripts
  2. Keep @qbx_core/modules/playerdata.lua uncommented in client_scripts
  3. COMMENT OUT @qb-core/client/main.lua in client_scripts

For QBCore:

  1. COMMENT OUT @qbx_core/modules/lib.lua in shared_scripts
  2. COMMENT OUT @qbx_core/modules/playerdata.lua in client_scripts
  3. Keep @qb-core/client/main.lua uncommented in client_scripts

Dependencies

Required:

  • ox_lib - UI library
  • oxmysql - Database handler
  • ox_inventory or qb-inventory - Inventory system
  • ox_target or qb-target - Interaction system (or use 3DText)

Framework:

  • qbx_core (for Qbox) OR qb-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-stores
5

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_inventory or qb-inventory
  • Menu System: ox_lib or qb-menu
  • Interaction: ox_target, qb-target, or 3DText
  • 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

  1. Register Store: Pay registration fee and submit for approval
  2. Admin Approval: Admins can approve/reject/suspend stores
  3. Stock Items: Add items from your inventory to your store
  4. Set Prices: Configure pricing for each item
  5. Manage Orders: View and process customer orders
  6. Withdraw Funds: Store owners can withdraw accumulated funds
  7. Employees: Add employees to help with restocking