Inventoryhud - Shops

https://gyazo.com/4cd58893d2dc222f18e65b56d16d1690 can anyone help me

Updated the resource, no issues but issues that you create yourself by customizing should occur.

Hi @sukurabu , When adding pictures to the IMG file after adding extra things to the shops they dont seem to work?

Also, I’m getting this error when trying to buy the things you had in the shop: SCRIPT ERROR: @esx_inventoryhud/server/main.lua:312: attempt to index a nil value (local ‘targetItem’)

Some work, but majority dont?

Most likely that you didn’t add them to your database, either that or you used the incorrect name.

As for the IMGs, did you also add them into the __resource.lua?

Nice man, I didn’t realise I had to do that too, my bad!

To get the coke drink to work do I need to add it somewhere else? as in to top up energy etc

You will have to register it as a usable item in a resources server main.lua. then add the functionality in there and hey presto. if you take a look at bread or water, you can figure it out most likely.

Couldnt resource esx_inventoryhud. Please help :frowning:

We’re going to need more information.

shop hud not work :frowning: help

Can you send me your backup file?

you are running a different resource, ofc it wont work.

I dont understand. Give me tutorial install :frowning: . Example : start esx_inventoryhud

Hi @sukurabu I tried to DM you. Found an error in your code.

You forgot to pass your parameters is all. Should be:
if targetItem.limit == -1 or xPlayer.canCarryItem(item, count) then

That will fix the bug with allowing the shop to give the player items past their weight limit.

Thanks for your contribution to all of us that use ESX! - Bear

1 Like

You do not have enough space in inventory …

How do I add a weight limit to the player inventory like how the trunk and glovebox has

thank you for pointing out this error, I’ll get it fixed

1 Like

Happy to help! I would have just made a pull request but it was such a simple thing… lol

Github is now updated, added the fix and changed something in the js that will make shop items say “FREE” instead of “$0”

1 Like

So its been 3 days since im trying how to figure it out…
How can i add “xPlayer.getWeight()” and maxWeight into the UI (below the DROP div)
If i can find out, how to pass a variable to the html file, that would be enough

ave this probleme now…

cfx> SCRIPT ERROR: @esx_inventoryhud/server/main.lua:312: attempt to call a nil value (field ‘canCarryItem’)