Installation

Welcome to the Quasar Banking 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.

FiveM Asset Escrow System

Asset positioning

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.

For the correct execution of the asset, we will put the asset and its dependencies inside a folder called [banking], then we will execute it completely using ensure as in the example.

The starting order is not very important in this asset, but just in case we will leave the basics so as not to receive general errors when using it. Always respect the framework and inventory above this asset.

-- First we will start the cores, never below
ensure es_extended or qb-core

-- The inventory should be executed above
ensure [inventory]

-- Run qs-banking here along with its dependencies
ensure [banking]

Database

Do not start the asset without having completely installed the database and items.

This system includes a database that will work for qbcore and esx in the same way.

Database for esx
DROP TABLE IF EXISTS `bank_process`;
CREATE TABLE `bank_process` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `owner` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `type` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `icon` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `text` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `created` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_unicode_ci' ENGINE = InnoDB AUTO_INCREMENT = 1;

DROP TABLE IF EXISTS `bank_cards`;
CREATE TABLE `bank_cards` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `identifier` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `cardNumber` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `ownerName` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `valid` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `cardType` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `active` INT(11) NOT NULL DEFAULT '0',
    `passCode` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT = 1;

DROP TABLE IF EXISTS `bank_history`;
CREATE TABLE `bank_history` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `identifier` VARCHAR(50) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `amount` INT(11) NOT NULL DEFAULT '0',
    `type` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
    `date` TIMESTAMP NOT NULL DEFAULT current_timestamp(),
    PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB;
Database for qbcore
DROP TABLE IF EXISTS `bank_process`;
CREATE TABLE `bank_process` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `owner` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `type` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `icon` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `text` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `created` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_unicode_ci' ENGINE = InnoDB AUTO_INCREMENT = 1;

DROP TABLE IF EXISTS `bank_cards`;
CREATE TABLE `bank_cards` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `identifier` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `cardNumber` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `ownerName` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `valid` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `cardType` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    `active` INT(11) NOT NULL DEFAULT '0',
    `passCode` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
    PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB AUTO_INCREMENT = 1;

DROP TABLE IF EXISTS `bank_history`;
CREATE TABLE `bank_history` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `identifier` VARCHAR(50) NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
    `amount` INT(11) NOT NULL DEFAULT '0',
    `type` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
    `date` TIMESTAMP NOT NULL DEFAULT current_timestamp(),
    PRIMARY KEY (`id`) USING BTREE
) COLLATE = 'utf8mb4_general_ci' ENGINE = InnoDB;

DROP TABLE IF EXISTS `bank_accounts`;
CREATE TABLE IF NOT EXISTS `bank_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citizenid` varchar(11) DEFAULT NULL,
  `account_name` varchar(50) DEFAULT NULL,
  `account_balance` int(11) NOT NULL DEFAULT 0,
  `account_type` enum('shared','job','gang') NOT NULL,
  `users` longtext DEFAULT '[]',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `account_name` (`account_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

DROP TABLE IF EXISTS `bank_statements`;
CREATE TABLE IF NOT EXISTS `bank_statements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `citizenid` varchar(11) DEFAULT NULL,
  `account_name` varchar(50) DEFAULT 'checking',
  `amount` int(11) DEFAULT NULL,
  `reason` varchar(50) DEFAULT NULL,
  `statement_type` enum('deposit','withdraw') DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`) USING BTREE,
  KEY `citizenid` (`citizenid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Society configuration

If you use qbcore, you must remove qb-management, this asset will replace qb-management and provides its events and exports.

You can enable this system with Config.EnableSociety.

The societies do not have a configuration as such, since in esx, esx_society will be used, in qbcore, we will have to eliminate qb-management, since qs-banking will provide the qb-management exports automatically.


Unique credit cards

The credit card system requires the use of an inventory with metadata, if you do not have an inventory with this characteristic, you can use the system but without credit cards with metadata.

Optionally, we can use credit cards, but we require one of the usable inventories for said system. If we do not have one of them, we will not be able to use credit cards but we can use a normal bank.


Items for unique credit cards

In case of using credit cards, we will have to create the item for it to work when creating a card. Add the item using the inventory that suits you.

Items for qs-inventory
['creditcard'] = {
    ['name'] = 'creditcard',
    ['label'] = 'Credit Card',
    ['weight'] = 0,
    ['type'] = 'item',
    ['image'] = 'creditcard.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Visa card, can be used via ATM'
    client = { export = 'qs-banking.CreateCard' }
},

In case of qs-inventory, we can add the following item inside config/metadata.js:

} else if (itemData.name == "visa" || itemData.name == "creditcard") {
    $(".item-info-title").html('<p>' + label + '</p>')
        var str = "" + itemData.info.cardNumber + "";
        var res = str.slice(12);
        var cardNumber = "************" + res;
        $(".item-info-description").html('<p><strong>Card Owner: </strong><span>' + itemData.info.ownerName + '</span></p><p><strong>Card Type: </strong><span>' + itemData.info.cardType + '</span></p><p><strong>Card Number: </strong><span>' + cardNumber + '</span></p>'
);
Items for qb-inventory
['creditcard'] 			 = {['name'] = 'creditcard', 					['label'] = 'Credit Card', 				['weight'] = 10, 		['type'] = 'item', 		['image'] = 'creditcard.png', 				['unique'] = false, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Visa card, can be used via ATM'},

In case we want to see the item information, we will add the following case in qb-inventory/html/js/apps.js within the generateDescription function.

case "creditcard":
   var str = "" + itemData.info.cardNumber + "";
   var res = str.slice(12);
   var cardNumber = "************" + res;
   return `<p><strong>Card Owner: </strong><span>${itemData.info.ownerName}</span></p>
      <p><strong>Card Type: </strong><span>${itemData.info.cardType}</span></p>
      <p><strong>Card Number: </strong><span>${cardNumber}</span></p>`;
Items for ox_inventory
['creditcard'] = {
    label = 'creditcard',
    weight = 1,
    stack = false,
    close = false,
    consume = 0,
    client = { export = 'qs-banking.CreateCard' }
},
Items for core_inventory

Add the item creditcard in database. In category column, set the category uniqueItem In core_inventory/config.lua find ItemCategories and add in it:

["uniqueItem"] = {
    color = "#87ceeb",
    takeSound = 'take',
    putSound = 'put',
},

In core_inventory/config.lua find ShownMetadatatable and add in it:

['cardNumber'] = 'Card Number',
['ownerName'] = 'Owner name',
['cardtype'] = 'Card Type',

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.

Last updated

Was this helpful?