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 installINFO
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| Inventory | Config 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-bankingexports (GetAccountBalance,AddMoney,RemoveMoney) - ESX — Uses
esx_addonaccountexports (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_businessDANGER
oxmysql must start before the script. Ensure the order is correct in your server.cfg.
8
Verify
- Start your server
- Join and check for any errors in the console
- Type
/businessto open the CEO tablet - Visit the Business Registry NPC to create your first business
Optional Integrations
Core Business can integrate with other C8RE and third-party scripts:
| Script | Purpose | Config |
|---|---|---|
| core_gangs | Gang raids on properties | Config.UsingCoreGangs |
| illenium-appearance | Clothing store properties | API exports |
| qb-clothing | Clothing store properties | API exports |
| qb-banking / esx_banking | ATM properties | API exports |
| qb-fuel / ox_fuel / LegacyFuel | Gas station fuel sales | API 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.
