Welcome to the Quasar Gangs & Territories installation guide, here you can learn how to completely install our asset, following each step we will achieve a clean and fluid installation where you will not find any problems, as long as the documentation has been completed in full.
For compatibility and security reasons, we request that WinSCP be used mandatorily to manage the script files instead of FileZilla. WinSCP offers greater stability and better integration with our work environment, ensuring a more efficient handling of assets and minimizing issues related to file transfers. We appreciate your cooperation in ensuring a better experience for everyone.
If you do not have programming experience, we recommend that you read each step completely without skipping any lines, since all documentation is important and should not be ignored under any circumstances. If you have a trusted developer, you can install this quickly, easily and safely if you complete this documentation step by step.
If at the end of this documentation you still have any problems, review each step again, after having checked that everything is correct, you can obtain more information about common errors in the Common Problems section within this same documentation to seek help independently.
Asset download
To find the asset, you must have made the purchase using your own keymaster account. Otherwise, you can use the transfer system to move the asset to a different keymaster account.
If you need to make an update you must also do this step again, download the asset and you will get the complete update.
Once the purchase is made on our official website, you will receive your asset directly in your Keymaster, in your own panel you can download the asset and install it following the following documentation.
If you have more problems regarding Fivem Escrow, accounts or asset startup errors you can go here and see if any of them match your case, since Escrow requires some basic things for its operation, such as your keymaster account, your licensekey , etc.
No continue sin haber instalado oxmysql, esta dependencia es obligatoria.
This asset has some dependencies that are completely mandatory and important for the operation of the asset. If you do not have these dependencies, your asset will probably start and have some error or message in its command console.
Correctly position the assets by following this step, if something goes wrong you will probably get errors about exports not found, do not skip this step.
If you use a housing system, don't forget to start qs-advancedgarages first and then the other assets as your respective housing.
For the execution of this asset, we will respect the respective order mentioned below. We recommend starting both dependencies and the same garage asset in the same [garages] folder. Otherwise we will have to start the dependencies first and then the qs-advancedgarages.
-- First we will start the cores, never belowensure es_extended or qb-core-- Run your inventory here along with its dependenciesensure [inventory]-- We will start this system belowensure [gangs]
Database
Este asset incluye una base de datos identica para qb y para esx, no hay diferencia entre ambos framework, no continue sin haber añadido dicha base de datos primero.
DROPTABLEIFEXISTS`gangs`;CREATETABLEIFNOTEXISTS`gangs` (`id`INT(11) NOT NULL AUTO_INCREMENT,`name`VARCHAR(255) NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',`label`VARCHAR(255) NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',`grades`TEXTNULLDEFAULTNULLCOLLATE'latin1_swedish_ci',PRIMARY KEY (`id`) USING BTREE) COLLATE='latin1_swedish_ci' ENGINE = InnoDB;DROPTABLEIFEXISTS`gangs_members`;CREATETABLEIFNOTEXISTS`gangs_members` (`index`INT(11) NOT NULL AUTO_INCREMENT,`gang` LONGTEXT NOT NULLDEFAULT'0'COLLATE'utf8mb4_general_ci',`grade` LONGTEXT NOT NULLDEFAULT'0'COLLATE'utf8mb4_general_ci',`cid` LONGTEXT NOT NULLDEFAULT'0'COLLATE'utf8mb4_general_ci',`char` LONGTEXT NULLDEFAULTNULLCOLLATE'utf8mb4_general_ci',PRIMARY KEY (`index`) USING BTREE) COLLATE='utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT =9;DROPTABLEIFEXISTS`gangs_money`;CREATETABLEIFNOTEXISTS`gangs_money` (`index`INT(11) NOT NULL AUTO_INCREMENT,`gang` LONGTEXT NULLDEFAULTNULLCOLLATE'utf8mb4_general_ci',`amount` LONGTEXT NULLDEFAULTNULLCOLLATE'utf8mb4_general_ci',PRIMARY KEY (`index`) USING BTREE) COLLATE='utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT =2;DROPTABLEIFEXISTS`gangs_territories`;CREATETABLEIFNOTEXISTS`gangs_territories` (`id`INT(11) NOT NULL AUTO_INCREMENT,`territory`INT(11) NOT NULLDEFAULT'0',`winner`VARCHAR(50) NOT NULLDEFAULT''COLLATE'utf8mb4_general_ci',`occupants`TEXTNULLDEFAULTNULLCOLLATE'utf8mb4_general_ci',PRIMARY KEY (`id`) USING BTREE) COLLATE='utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT =1;DROPTABLEIFEXISTS`gangs_dealers`;CREATETABLE `gangs_dealers` (`id`INT(11) NOT NULL AUTO_INCREMENT,`name`VARCHAR(50) NOT NULLDEFAULT'0'COLLATE'latin1_swedish_ci',`territory`INT(11) NULLDEFAULTNULL,`coords` LONGTEXT NULLDEFAULTNULLCOLLATE'utf8mb4_bin',`time` LONGTEXT NULLDEFAULTNULLCOLLATE'utf8mb4_bin',`createdby`VARCHAR(50) NOT NULLDEFAULT'0'COLLATE'latin1_swedish_ci',PRIMARY KEY (`id`) USING BTREE) COLLATE='latin1_swedish_ci' ENGINE = InnoDB AUTO_INCREMENT =1;DROPTABLEIFEXISTS`gangs_meta`;CREATETABLEIFNOTEXISTS`gangs_meta` (`identifier`VARCHAR(80) NOT NULLDEFAULT''COLLATE'utf8mb4_general_ci',`dealerrep`INT(11) NULLDEFAULT'0',PRIMARY KEY (`identifier`) USING BTREE) COLLATE='utf8mb4_general_ci' ENGINE = InnoDB;
Command replacement (qbcore)
Please, if you are a qbcore user, do not skip this step.
In case we use qbcore framework, we will have to eliminate the gang commands that we will find in qb-core/server/commands.lua, we can comment or delete them. Since if these exist, they will produce errors in the general use of qs-gangs.
To remove them, we will search for the following commands and remove them completely.
-- GangQBCore.Commands.Add('gang', Lang:t('command.gang.help'), {}, false, function(source)local PlayerGang = QBCore.Functions.GetPlayer(source).PlayerData.gangTriggerClientEvent('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]))elseTriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')endend, 'admin')
Basic asset configuration
We do not recommend editing frameworks unnecessarily, since almost all assets depend exclusively on your framework and exports on the name of your framework. Otherwise and if you edited your framework, read these steps carefully.
If you still require more open codes for the configuration, you can check within client/custom and server/custom to adapt the asset to your personal taste.
Please expand each part to see information about the configuration of the asset, this way you will understand the general operation of the asset on the framework and editable files side.
Basic framework configuration
The asset will work automatically if your framework is called es_extended or qb-core, it will automatically detect if any of them are started. In case your framework has been renamed, you can modify it in config.lua to edit the name of your framework.
Advanced framework configuration
If your framework is completely modified, both in events and name, you should access client/custom/framework or server/custom/framework to adapt the native events of your framework to the codes you have created. If this step doesn't work, we ask that you ask your framework modifier or trusted developer for help.
More general settings
This asset contains multiple configurations within the config folder. But you can also access more open source and configurations within client/custom or server/custom. We do not recommend using these configurations if you do not have the basics of programming.