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.
This DLC requires adding a new account in case of esx, you must create the crypto account in your es_extended/config.lua.
Features
Trade crypto currencies.
Sell cryptocurrency.
Buy cryptocurrencies.
A new account on your server.
These currencies are fictitious, there is nothing to do with real crypto.
Dependencies
This package is compatible with es_extended 1.2 and all Legacy.
DROPTABLEIFEXISTS`phone_crypto`;CREATETABLE `phone_crypto` (`crypto`varchar(50) NOT NULLDEFAULT'btc',`worth`int(11) NOT NULLDEFAULT0,`history`textNULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTERTABLE`phone_crypto`ADDPRIMARY KEY (`crypto`);COMMIT;DROPTABLEIFEXISTS`crypto_transactions`;CREATETABLE `crypto_transactions` (`id`int(11) NOT NULL,`identifier`varchar(46) DEFAULTNULL,`title`varchar(50) DEFAULTNULL,`message`varchar(50) DEFAULTNULL,`date`timestampNULLDEFAULTcurrent_timestamp()) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;ALTERTABLE`crypto_transactions`ADDPRIMARY KEY (`id`),ADDKEY`identifier` (`identifier`);ALTERTABLE`crypto_transactions`MODIFY`id`int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=753;COMMIT;
2. Prepare your Config.lua
Go to config.lua and set it your way for ESX
Config = {}Locales = Locales or {}Config.Framework ='qb' -- 'esx' or 'qb'Config.Language ='en'Crypto = { Lower =500, Upper =5000, Debug =true, History = { ["btc"] = {} }, Worth = { ["btc"] =1000 }, Labels = { ["btc"] ="BTC" }, Exchange = { coords = vector3(1276.21, -1709.88, 54.57), RebootInfo = { state =false, percentage =0 }, }, Coin ='btc', -- For auto updating the value of btc RefreshTimer =5, -- In minutes, so every 5 minutes. ChanceOfCrashOrLuck =2, -- This is in % (1-100) Crash = {20,80}, -- Min / Max Luck = {20,45}, -- Min / Max ChanceOfDown =30, -- If out of 100 hits less or equal to ChanceOfUp =60, -- If out of 100 is greater or equal to CasualDown = {1,10}, -- Min / Max (If it goes down) CasualUp = {1,10}, -- Min / Max (If it goes up)}Ticker = { Enabled =false, -- Decide whether the real life price ticker should be enabled or not :) coin = 'BTC', -- The coin, please make sure you find the actual name, for example: Bitcoin vs BTC, BTC would be correct
currency = 'USD', -- For example USD, NOK, SEK, EUR, CAD and more here https://www.countries-ofthe-world.com/world-currencies.html
tick_time = 2, -- Minutes (Minimum is 2 minutes) 20,160 Requests a month, Its recommended to get the free API key so the crypto script doesnt switch on and off if ratelimit is encountered
Api_key = 'put_api_key_here', -- If you decide to get an api key for the API (https://min-api.cryptocompare.com/pricing) The free plan should be more than enough for 1 Fivem server
Error_handle = { -- Error handle stuff, for more user friendly and readable errors, Don't touch. ['fsym is a required param.'] ='Config error: Invalid / Missing coin name', ['tsyms is a required param.'] ='Config error: Invalid / Missing currency', ['cccagg_or_exchange'] = 'Config error: Invalid currency / coin combination', -- For some reason api throws this error if either coin or currency is invalid
},}
3. Enable crypto application
Remove crypto application comments in qs-smartphone/config/apps.lua