[solved] xPlayer.addMoney giving no money?

I have trew_hud_ui, there’s 3 different money types (cash/wallet, bank and dirty money). I’ve noticed in es_extended’s config.lua that there’s only 2 accounts for money Config.Accounts = { 'bank', 'black_money' }. Almost every job, the code for getting paid is xPlayer.addMoney(amount) which I’m assuming is wallet, not bank.

Basically it doesn’t work, I get no money but when i switch to xPlayer.addAccountMoney('bank', amount) it works. How can i create a 3rd account that handles my wallet/cash money that when i get paid for a job, it goes to my wallet (and that works with banking scripts)

(SOLUTION: If anyone has this same issue, look in fxmanifest.lua and if yours is 1.1.0, try updating to 1.2.0)

Try to add ‘money’ to Config.Accounts

Config.Accounts = { ‘bank’, ‘black_money’ , ‘money’}

nah that dont work i tried it but i cant find where the different accounts are at to add a new one for money

In your database you will have a table called “addon_account”.
These are your accounts.

But you shouldn’t need to change anything.
“bank” and “black_money” should be accounts, but “cash”, “wallet” or “money” shouldn’t be.

Please share some code as an example of where a job is paying you (xPlayer.addMoney(amount)) but you are finding you aren’t getting the money.
I suspect that you may be getting paid, but the HUD isn’t updating with your cash, because it’s looking for an account with xPlayer.getAccountMoney or whatever it’s called, instead of xPlayer.getMoney() or whatever.

So yeah, I will look at the code for trew_hud_ui, but could you please share some code for where addMoney is being called and seemingly not working?

I figured it out a few hours ago, xPlayer.addMoney didn’t work because my es_extended version was outdated so i just updated to 1.2.0

(i cant delete the post so ill set my comment as the solution, for anyone having the same issue just look in your fxmanifest.lua file and check the version, if it says 1.1.0 or below then try updating)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.