Skip to content

Core Business

Requirements

Framework
QBCoreESXQBX
Target
ox_targetqb-target
Database
MySQL
Inventory
QBOXQS+4

Setup

1
Add the Resource

Place core_business into your server's resources folder.

resources/
  [c8re]/
    core_business/
2
Install Node Dependencies

Core Business uses a Node.js module for vehicle image processing. Run this from inside the resource folder:

bash
cd resources/[c8re]/core_business
npm install

INFO

This installs dependencies for the greenscreen vehicle image generator (server/modules/imageProcessor.js). FiveM loads .js server scripts natively.

3
Import the Database

Execute both SQL files included with the resource:

sql
-- Run these in your database
SOURCE core_business.sql;
SOURCE core_properties.sql;

Or import through your database management tool (HeidiSQL, phpMyAdmin, etc).

TIP

core_business.sql creates the business tables. core_properties.sql seeds the default property data. You can also add properties in-game with /propertyeditor.

4
Configure the Framework

Open config.lua and set your framework:

lua
Config = {
    Framework = 'qb-core',              -- 'qb-core' or 'esx'
    FrameworkResource = 'qb-core',      -- Resource name of your framework
    NewFrameworkVersion = true,          -- ESX only: set false for versions < 1.8
}
5
Configure Inventory

Set your inventory system in config.lua:

lua
UseInventory = 'qb-inventory',          -- See supported options below
QBInventoryResourceName = 'qb-inventory', -- Only for qb-inventory forks
InventoryConfig Value
QBCore inventory (or forks: lj, ps)'qb-inventory'
ox_inventory'ox_inventory'
core_inventory'core_inventory'
qs-inventory (v2.6.0+)'qs-inventory'
codem-inventory (v1.6+)'codem-inventory'
tgiann-inventory'tgiann-inventory'
Custom'custom'

TIP

If using 'custom', implement the stash functions in server/modules/inv_integration.lua.

6
Configure Banking

Core Business distributes collected taxes to job accounts. Configure the banking integration in server/integration_main.lua:

  • QBCore — Uses qb-banking exports (GetAccountBalance, AddMoney, RemoveMoney)
  • ESX — Uses esx_addonaccount exports (GetSharedAccount)
lua
-- config.lua - Tax recipients
TaxesDistribution = {
    enabled = true,
    recipients = {
        { percent = 60, qb_account = "police",   esx_account = "society_police" },
        { percent = 30, qb_account = "ambulance", esx_account = "society_ambulance" },
        { percent = 10, qb_account = "mechanic",  esx_account = "society_mechanic" },
    }
}
7
Start the Resource

Add to your server.cfg after your framework and oxmysql:

cfg
ensure oxmysql
ensure qb-core
ensure core_business

DANGER

oxmysql must start before the script. Ensure the order is correct in your server.cfg.

8
Verify
  1. Start your server
  2. Join and check for any errors in the console
  3. Type /business to open the CEO tablet
  4. Visit the Business Registry NPC to create your first business

Optional Integrations

Core Business can integrate with other C8RE and third-party scripts:

ScriptPurposeConfig
core_gangsGang raids on propertiesConfig.UsingCoreGangs
illenium-appearanceClothing store propertiesAPI exports
qb-clothingClothing store propertiesAPI exports
qb-banking / esx_bankingATM propertiesAPI exports
qb-fuel / ox_fuel / LegacyFuelGas station fuel salesAPI exports

INFO

The API integration system allows any property to become a node for another script. See Exports & API for details on getClosestProperty and related exports.