[ADDON][ESX] Inventory HUD - Vehicle trunk 2.4.0

This one https://github.com/XxFri3ndlyxX/esx_lockpick But if you want npc car to be locked you will need a script for that. It’s not included in this script because i have another script that does it so you need like something like this. https://github.com/DanFrmSpace/esx_npclock

1 Like

Same here, i press L the trunk is opening but closes instantly and nothing happens, using advanced garage as well

plz help

my vehicle ever have black money 0

It will be an error if you try to take out

Error running call reference function for resource esx_inventoryhud_trunk: citizen:/scripting/lua/scheduler.lua:405: @esx_inventoryhud_trunk/server/esx_trunk-sv.lua:201: attempt to index a nil value (local ‘blackMoney’)
stack traceback:
@esx_inventoryhud_trunk/server/esx_trunk-sv.lua:201: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:391: in function citizen:/scripting/lua/scheduler.lua:390
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:390: in function citizen:/scripting/lua/scheduler.lua:389
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:405: in function citizen:/scripting/lua/scheduler.lua:374
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
Error running system event handling function for resource esx_inventoryhud_trunk: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:628: in local ‘cb’
@esx_inventoryhud_trunk/server/trunk.lua:106: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182

i have a question is this hud/trunk script using the latest version of esx_trunk with the dup issue fixed or not sure?

Moving items from trunk to inventory moves x4 of what your moving. So moving 500 dirty money moves 2000 dirty money,

the base esx_trunk menu still pops up as well sometimes it gets stuck so you have the old esx_trunk menu showing. So far thats all i could find
Multiple people can open trunk error of dupe plate below

[ERROR] [MySQL] [esx_trunk] An error happens on MySQL for query “[object Object]”: ER_DUP_ENTRY: Duplicate entry 'XEH 328 ’ for key ‘plate’
Error: (node:29570) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
at process. (internal/process/promises.js:27:25)
at
at Query.db.query [as _callback] (mysql-async.js:4973:13)
at Query.Sequence.end (mysql-async.js:280:24)
at Query.ErrorPacket (mysql-async.js:2122:8)
at Protocol._parsePacket (mysql-async.js:5941:23)
at Parser.write (mysql-async.js:6198:12)
at Protocol.write (mysql-async.js:5701:16)
at Socket. (mysql-async.js:693:28)
at emitOne (events.js:116:13)
Error: (node:29570) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Like all errors and problems that you have are because you did not install resource properly.

i need help plz i tray to use this script but for some reason dont work for me i did everithing like in description bur when i hit Y don do anything y event try to hit Y and then hit f2 to tray to drag and dont work

@Trsak yah forgot to disable original esx_trunk. only issue is when trunk blankmoney is zero and someone moves it throws error in console but other then that awesome job

On InventoryHUD script find row 441 and change if blackMoney >= 0 then to if blackMoney > 0 then then the empty blackmoney is not there anymore.

1 Like

The vehicle is already in the database. The Error tells you that if you can read!

Edit: so no, it’s not because owned_vehicles got a plate column. It’s because you already have the vehicle in the trunk database table.

how you made it to work? my problem is that im pressing the open trunk key but it opens the trunks and then closes and does nothing? tried to reinstall everything that it requires

I can see this now, should I just reset data of both tables?

Edit I deleted both tables, asked someone to buy a car, somehow the same error appear, after that noone can open the trunk.

Mine simply freezes after opened, any help on this? Or is there any button that closes the menu, since nothing works after Ive once pressed F2 and opened the inventory.

Bug report

I have already told @Trsak about this so do not spam him about it this bug is also has a dupping with it

so to give you the run down say if I have it so I can only hold one phone I can add it to the trunk go buy another then take the one in the trunk out now I’m holding 2 then I can add 2 to the trunk then go buy another then take the 2 in the trunk out now I’m holding 3 it does not sound big but when you people running drugs and holding 420 weed going back getting another 420 then taking out 420 now you have 840 then you put that in then go get another 420 now you starting to see a big money
problem

video of the problem https://gyazo.com/8c9249f1924231a2610443cc592d9757

note this means this bug is also linked to the original code i have tested it also and yes they both do it

for people that dont see a problem think of it like this i cap my car to hold 50KG i put 420 weed in it lets say 420 weed = 50Kg so now i go get another 420 of weed i cant put it in the trunk but what i can do is take it out of the trunk now im holding 840 weed… now if i have a friend he can now put his 420 weed in the trunk and i can take that also and now im hold 1260 and it can keep going so ya

I have sent him a fix for this if he makes it work with the UI or not will be on him but do not spam or dm him or me

1 Like

Should be fixed now with latest version.

1 Like

@Trsak do you have in plan to do something similar to apartments like esx_property or something like that?

Yes, i do. But i have other things to do now, so it will take some time.

im having the same errors waiting for someone to answer on how to fix this.

black money is black_money not blackmoney

Its not working currently i have a max 50 on xtc

i have 150 in trunk when i transfer 20 @ a time after each other
i will get the message no inv space
but it transfers the amount so i can have x amount of xtc.