#/givemoney

1 messages · Page 1 of 1 (latest)

glass prawn
#

i have removed all addon scripts/maps everything and done a fresh install of ox_inventry and qbx_core and done a check on my database and everything comes back OK and no faults show when i use the command any help is much appreciated

obsidian lark
#

Can you try stopping your hud or whatever you use for displaying money in the top right corner

#

And try again?

#

Your money is not being synced with inventory for some reason

glass prawn
#

yeah tried by stopping everything and still no work

obsidian lark
#

Inventory handles that so you should be good:

unction server.syncInventory(inv)
    local accounts = Inventory.GetAccountItemCounts(inv)

    if not accounts then return end

    local player = QBX:GetPlayer(inv.id)
    player.Functions.SetPlayerData('items', inv.items)

    for account, amount in pairs(accounts) do
        account = account == 'money' and 'cash' or account
        if player.Functions.GetMoney(account) ~= amount then
            player.Functions.SetMoney(account, amount, ('Sync %s with inventory'):format(account))
        end
    end
end
#

Are you by any chance on a qb-core?

glass prawn
#

qbx-core

obsidian lark
#

Send us your ox.cfg

#

Located inside your root folder, where server.cfg is

#

@glass prawn

glass prawn
#

sorry was finding it lol

obsidian lark
#

Hmmm looks good, I have no clue what the issue could be

glass prawn
#

i know i have no idea ether everything looks good

obsidian lark
#

That hud is definitely sus though

#

I'd remove it completely, rejoin server and try

#

Also restart server

#

Start it without a hud

glass prawn
#

i know but i tried without the hud and still same problem

#

i removed all addon stuff done a restart and still nothing

obsidian lark
#

Did you change name of money item?

#

Try giving yourself money as item /giveitem me money 500

#

See if it works

glass prawn
#

doing it as an item works no problem but this fault is causing shops and banks to not give out money

obsidian lark
#

Idk bro, sorry.. I'm out of ideas

glass prawn
#

no problem i appreciate the help thank you

obsidian lark
#

Hopefully someone else can help you or you'll figure it out on your own

glass prawn
#

hopefully 😂 🤦‍♂️

obsidian lark
#

If you do, let me know what the issue was

glass prawn
#

i sure will 😎

glass prawn
#

@obsidian lark after days of testing i finally found the problem. in qbx-core/server/players. for i = 1, #accounts do it must be i = 1 mine was i = 2 changed it and fixed the problem thank you for your help

obsidian lark
#

There's no way we'd figure this out lol

#

Also didn't you say you tried fresh install of qbx_core cringe

#

Jeez my dude

glass prawn
#

i was changing the number of character a player can have and must of changed that by mistake and not realy a fresh install of core as would be a bit impossible 😂 basically i downloaded a qbx-core and compared them both with the new one to min to see if there was a deferens as i am a new server owner since the start of the year 🤣

#

forgive my Stupidity 😂