βš’οΈInstallation

Steps to follow to install the script

⚠️ Before you start, make sure you have all the script dependencies. ⚠️ Requeriments

1 - DATABASE

In the sql folder you will find the file that you will have to import into the database.

CREATE TABLE IF NOT EXISTS `businesses_decorations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `data` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `created_businesses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `business_info` longtext DEFAULT NULL,
  `business_data` longtext DEFAULT NULL,
  `business_items` longtext DEFAULT NULL,
  `business_logs` text DEFAULT NULL,
  `business_jobs` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `businesses_lonja_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `data` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `businesses_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `data` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `businesses_workbenches` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `data` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `business_outfits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `business` varchar(60) NOT NULL,
  `label` longtext DEFAULT NULL,
  `ped` longtext DEFAULT NULL,
  `components` longtext DEFAULT NULL,
  `props` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;


-- ONLY FOR ESX DEFAULT INVENTORY
-- ONLY FOR ESX DEFAULT INVENTORY
CREATE TABLE business_stashes (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name varchar(255),
    items LONGTEXT
);

⚠️The business_stashes table is only necessary if you are using the default ESX inventory. ⚠️

2 - INTEGRATIONS

qb-inventory

To use qb-inventory you will have to add an export for the correct functioning of the stashes.

Add the following code to the path qb-inventory/server/functions.lua.


qb-clothing

In qb-clothing/client/main.lua at the end of the file you must add this export.


Vehicle fuel

In custom/client/functions you will have to configure your function to set the vehicle's fuel.


Player outfits

In custom/client/functions you will have to configure your function to open the player's personal outfits.

3 - CFG

All the dependencies should start before the business_system

Last updated