How stop duplication esx_inventoryhud

Hello everyone here I use esx_inventoryhud and I would like to know how to modify it so that players stop duplication withThe trunk please

here’s the onehere’s the one thatI use

Players can only dupe weapons if i know that right, so the solution to convert your weapons to items?

everything happens in the trunk the player drops an item and when he picks it up he puts the amount and spams the key enter and duplicates it

You can try to add Citizen.Wait(1000) In the code when the player are trying to press enter


the problem these that I do not have the line of code of the key enter these possible that this code is in a file js ??

main.lua (51.8 KB)

Wait, you having problem that players opened the trunk and spamming enter can dupe items? Or when in trunk they can spam anytime the enter and dupe the items?


this is what happens

The only way to prevent this is either you edit the js.
Or put a limitrate in server.lua
Example server statement

Trunkput = {}
This should be on top of script

Below code should be in event or func

If Trunkput[source] ~= nil and Trunkput[source] < os.time() or Trunkput[source] == nil then

Trunkput[source] = os.time() + 2

Addtrunk function here

– player tried to spam add event item to trunk
– duping usually happen in miliseconds or timestamp is almost the same
– you can put os time + 1 sec or 2 sec

thanks I will try

Can you upload this inventory to mega or google drive?
I know how to fix it.
The first one