Before starting, you must log in to the CFX portal to download the asset. You will be able to download it as many times as you want on the official CFX page. Just as you download it the first time, you will also download it multiple times in the future to get updates.
1
Logging in to the CFX Portal
First, log in to the official CFX portal by clicking here.
2
Finding Your Assets
Once logged in, navigate to the Granted Assets section to access your purchased assets. You can download them by clicking the "Download" button.
Remember, if you encounter any issues or errors when starting the asset, you can check here to see if the problem is related.
Updating to the latest artifacts and gamebuild is essential to avoid common server issues. Here's how to do it properly:
1
Update Artifacts
Completely replace your current artifacts with the latest version. Download the appropriate artifacts for your operating system from the official links:
To ensure proper functionality, [gangs] must be started directly below your framework and inventory folders. This guarantees smooth initialization and prevents potential conflicts.
Database Installation
For this step, we highly recommend using HeidiSQL to avoid issues, as it provides an updated version of MariaDB. We have a guide that explains step-by-step how to use HeidiSQL. If you choose to use phpMyAdmin, we will not be responsible for any errors that may occur in your database.
It is essential to execute the SQL file completely for this asset to function correctly.
DROP TABLE IF EXISTS `gangs`;
CREATE TABLE IF NOT EXISTS `gangs` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`label` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`grades` TEXT NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'latin1_swedish_ci' ENGINE = InnoDB;
DROP TABLE IF EXISTS `gangs_members`;
CREATE TABLE IF NOT EXISTS `gangs_members` (
`index` INT(11) NOT NULL AUTO_INCREMENT,
`gang` LONGTEXT NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
`grade` LONGTEXT NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
`cid` LONGTEXT NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
`char` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`index`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT = 9;
DROP TABLE IF EXISTS `gangs_money`;
CREATE TABLE IF NOT EXISTS `gangs_money` (
`index` INT(11) NOT NULL AUTO_INCREMENT,
`gang` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`amount` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`index`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT = 2;
DROP TABLE IF EXISTS `gangs_territories`;
CREATE TABLE IF NOT EXISTS `gangs_territories` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`territory` INT(11) NOT NULL DEFAULT '0',
`winner` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
`occupants` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT = 1;
DROP TABLE IF EXISTS `gangs_dealers`;
CREATE TABLE `gangs_dealers` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'latin1_swedish_ci',
`territory` INT(11) NULL DEFAULT NULL,
`coords` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`time` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`createdby` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'latin1_swedish_ci',
PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'latin1_swedish_ci' ENGINE = InnoDB AUTO_INCREMENT = 1;
DROP TABLE IF EXISTS `gangs_meta`;
CREATE TABLE IF NOT EXISTS `gangs_meta` (
`identifier` VARCHAR(80) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
`dealerrep` INT(11) NULL DEFAULT '0',
PRIMARY KEY (`identifier`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB;
Command replacement
Only do this step if you are a QBCore user, if you are using ESX ignore the step.
If you're using the QBCore framework, it’s essential not to skip this step. To ensure compatibility with qs-gangs, you must remove the gang-related commands from the qb-core/server/commands.lua file. These commands conflict with the proper functioning of qs-gangs, causing errors during use.
Locate the gang commands in the file, such as /gang and /setgang, and delete or comment them out entirely. Removing these commands ensures the asset runs smoothly without interference from existing QBCore functionality.
QBCore.Commands.Add('gang', Lang:t('command.gang.help'), {}, false, function(source)
local PlayerGang = QBCore.Functions.GetPlayer(source).PlayerData.gang
TriggerClientEvent('QBCore:Notify', source, Lang:t('info.gang_info', { value = PlayerGang.label, value2 = PlayerGang.grade.name }))
end, 'user')
QBCore.Commands.Add('setgang', Lang:t('command.setgang.help'), { { name = Lang:t('command.setgang.params.id.name'), help = Lang:t('command.setgang.params.id.help') }, { name = Lang:t('command.setgang.params.gang.name'), help = Lang:t('command.setgang.params.gang.help') }, { name = Lang:t('command.setgang.params.grade.name'), help = Lang:t('command.setgang.params.grade.help') } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
Player.Functions.SetGang(tostring(args[2]), tonumber(args[3]))
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
end, 'admin')
Key bind manipulation
All Quasar Store assets use the same process for modifying Key Binds to ensure consistency and optimized performance across all resources.
Below is a clear and detailed guide on how to adjust them to your preferences.