Installation

1. Download Resource

Download the purchased resource from CFX Portal - the official site of FiveM with purchased resources.


2. Import Database Tables

This is a very important step - without it, the script will not work properly. Depending on the framework you are using (ESX or QB-Core), select the appropriate section below and paste the SQL code into your database.

Not sure how to do it?

Database for ESX
ALTER TABLE `owned_vehicles` ADD IF NOT EXISTS `tuning_data` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci';

CREATE TABLE IF NOT EXISTS `vms_business` (
  `id` varchar(50) NOT NULL DEFAULT '',
  `type` varchar(50) NOT NULL DEFAULT '',
  `owner` mediumtext DEFAULT NULL,
  `employees` longtext DEFAULT '{}',
  `stock` longtext DEFAULT '{}',
  `data` longtext DEFAULT '{}',
  `announcements` longtext DEFAULT '{}',
  `orders` longtext DEFAULT '{}',
  `history` longtext DEFAULT '{}'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `tuning_discount_codes` (
  `code` varchar(25) DEFAULT NULL,
  `mechanic_point` varchar(25) DEFAULT NULL,
  `percentage` int(11) NOT NULL,
  `count_to_use` int(6) NOT NULL,
  `currently_using` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
Database for QB-Core
ALTER TABLE `player_vehicles` ADD IF NOT EXISTS `tuning_data` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci';

CREATE TABLE IF NOT EXISTS `vms_business` (
  `id` varchar(50) NOT NULL DEFAULT '',
  `type` varchar(50) NOT NULL DEFAULT '',
  `owner` mediumtext DEFAULT NULL,
  `employees` longtext DEFAULT '{}',
  `stock` longtext DEFAULT '{}',
  `data` longtext DEFAULT '{}',
  `announcements` longtext DEFAULT '{}',
  `orders` longtext DEFAULT '{}',
  `history` longtext DEFAULT '{}'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `tuning_discount_codes` (
  `code` varchar(25) DEFAULT NULL,
  `mechanic_point` varchar(25) DEFAULT NULL,
  `percentage` int(11) NOT NULL,
  `count_to_use` int(6) NOT NULL,
  `currently_using` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

3. Required Framework Edits

This script requires a small adjustment inside your framework to ensure proper functionality. Each version of the framework (ESX, QB-Core, QBX-Core) has slightly different handling of vehicle or player data, so we’ve prepared separate instructions for each.

Please select the section below that matches your framework and apply the provided changes.

ESX.Game.GetVehicleProperties
  1. Navigate to the es_extended/client/functions.lua

  2. Find ESX.Game.GetVehicleProperties

  3. Replace this function with the one below

ESX.Game.SetVehicleProperties
  1. Navigate to the es_extended/client/functions.lua

  2. Find ESX.Game.SetVehicleProperties

  3. Replace this function with the one below

QBCore.Functions.GetVehicleProperties
  1. Navigate to the qb-core/client/functions.lua

  2. Find QBCore.Functions.GetVehicleProperties

  3. Replace this function with the one below

QBCore.Functions.SetVehicleProperties
  1. Navigate to the qb-core/client/functions.lua

  2. Find QBCore.Functions.SetVehicleProperties

  3. Replace this function with the one below

(QBOX-Core) Modifications in Framework
  1. Navigate to the qbx_core/bridge/qb/client/functions.lua

  2. Find functions.GetVehicleProperties

  3. Replace this function with the one below:

  1. Find functions.SetVehicleProperties

  2. Replace this function with the one below:

(QBOX-Core) lib.getVehicleProperties
  1. Navigate to the ox_lib/resource/vehicleProperties/client.lua

  2. Find lib.getVehicleProperties

  3. Replace this function with the one below

(QBOX-Core) lib.setVehicleProperties
  1. Navigate to the ox_lib/resource/vehicleProperties/client.lua

  2. Find lib.setVehicleProperties

  3. Replace this function with the one below


4. Start Resource

To start a resource in your server.cfg, ensure that it begins after your framework has been initiated. For instance, if you are using a framework like es_extended, you should start resource after it, like so:

Ensure there are no syntax errors or incorrect paths in your server.cfg.

Last updated

Was this helpful?