Renewed-Scripts/qb-phone

Crypto "QBIT" not displaying under Crypto app.

mfjosh opened this issue · 7 comments

It appears after switching from qb-phone to qb-phone from renewed scripts, the instructions for getting crypto to work does not include Qbit which is the one crypto used by qb-crypto.

If this is not an issue, can anyone help me understand how to change qb-crypto to make the crypto's in the phone relevant?

looking for the answer to this as well. I can add Qbit under config but cannot get it to work with the crypto sticks that you use to hack at lesters house. it says its giving you qbit but no way to sell buy or trade them.

Under the config file do this
image
then under qb-core/server/player.lua under player.metadata where you put the stuff for the crypto do this
image

Not sure the above works unless I missed something. On the phone the qbits show as "undefined"? I didnt replace "lme" with "Qbit" I addeded qbit instead.

I did find replacing
" exports['qb-phone']:AddCrypto(src, type, amount)" in qb-crypto/server/main.lua
with
" local src = source
exports['qb-phone']:AddCrypto(src, "gne", 5)"
This will allow the crypto sticks to work with hacking and gives you 5 "gne" at a time.

could you by chance put a pic of your qb-crypto/server/main.lua where you placed what you said above so i can see it?

Line 216-236 of qb-crypto/server/main.lua

RegisterServerEvent('qb-crypto:server:ExchangeSuccess', function(LuckChance)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
local ItemData = Player.Functions.GetItemByName("cryptostick")

if ItemData ~= nil then
    local LuckyNumber = math.random(1, 10)
    local DeelNumber = 1000000
    local Amount = (math.random(611111, 1599999) / DeelNumber)
    if LuckChance == LuckyNumber then
        Amount = (math.random(1599999, 2599999) / DeelNumber)
    end

    Player.Functions.RemoveItem("cryptostick", 1)
    local src = source
    exports['qb-phone']:AddCrypto(src, "gne", 5)
    TriggerClientEvent('QBCore:Notify', src, Lang:t('success.you_have_exchanged_your_cryptostick_for',{amount = Amount}), "success", 3500)
    TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items["cryptostick"], "remove")
    TriggerClientEvent('qb-phone:client:AddTransaction', src, Player, {},  Lang:t('credit.there_are_amount_credited',{amount = Amount}), "Credit")
end

end)

Please re-read and follow the readme again as it shows how to use the crypto