Crypto

Remember that the DLC & Addons are obtained in the post of the same asset, there are the direct links, you must also be the buyer, otherwise you will not be able to obtain them.

Welcome to the documentation on DLC & Addons, in this section we will make a general explanation about Crypto, its installation or basic guide.


Introduction

Quasar Crypto is an exclusive DLC for Quasar Smartphone, this DLC will add a new application of virtual Cryptocurrencies (they are not real) which allows players to invest in their favorite crypto, buy or sell.


Asset positioning

The DLC & Addons for Quasar Smartphone always start below the Smartphone folder, for this we will use the following example.

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

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

-- DLC & Addons always below smartphone
ensure [addons]

Database

This DLC depends on a database which we will run using this sql.

DROP TABLE IF EXISTS `phone_crypto`;
CREATE TABLE `phone_crypto` (
  `crypto` varchar(50) NOT NULL DEFAULT 'btc',
  `worth` int(11) NOT NULL DEFAULT 0,
  `history` text NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `phone_crypto`
  ADD PRIMARY KEY (`crypto`);
COMMIT;

DROP TABLE IF EXISTS `crypto_transactions`;
CREATE TABLE `crypto_transactions` (
  `id` int(11) NOT NULL,
  `identifier` varchar(46) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `message` varchar(50) DEFAULT NULL,
  `date` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `crypto_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `identifier` (`identifier`);

ALTER TABLE `crypto_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=753;
COMMIT;

Installation & modifications

This DLC requires adding a new account in case of esx, you must create the crypto account in your es_extended/config.lua, In the case of qbcore, it does not require adding anything.

In the only case that we must apply framework modification is in esx, for this we will go to the config.lua of es_extended and we will create an account called crypto as in the example.

Config.Accounts = {
	bank = {
		label = TranslateCap('account_bank'),
		round = true
	},
	black_money = {
		label = TranslateCap('account_black_money'),
		round = true
	},
	money = {
		label = TranslateCap('account_money'),
		round = true
	},
	crypto = {
		label = 'Bitcoin',
		round = true
	},
}

Enable the application

To enable the application, we must go to apps.lua in Quasar Smartphone and uncheck the crypto application that will be commented in said file. Once this step is completed, we will use the /deleteallapps command and the application will begin to appear in our App Store.

Last updated