For a long time players using methods in order to gather less resources. As a lot of you know, there is glitch that many server owners trying to fix, item duplication! The method that they follow in order to duplicate items, guns even black money can be done in any inventory: Property, police armoury, player inventory when you search him in order to mug him. The simply put a weapon on the Inventory and then two other guys open the Inventory and hit withdraw at the same time, so every single one of them gets a weapon!
Well, for the future reference, this problem isn’t really that hard to fix. It’s definitely not something “server owners try to fix”, because it’s just a couple lines of code
Preface
What you have to understand firstly is how server- and client-side work. Server is 1 entity (your machine), while client is basically each player connected. When your script has the logic on the client side, this means that each player can run it, without any limitations - that’s where the “bug” comes from.
How to fix
Long story short, your server should guard the access to inventories/trunks/backpacks/etc. So before you let the player open something up, you have to “ask” your server if he’s allowed to do so.
A few steps to create a guard script:
ask server if player is allowed to open (eg. ESX.TriggerServerCallback())
notify server that a player opens up inventory/trunk/etc (eg. TriggerServerEvent())
notify server that a player closes it (eg. TriggerServerEvent())
i fixed this item duplication for alot of servers. only thing you need to do is input a couple line of code in server side script that checks if Player actually has that weapon because by default it doesn’t check it. and this problem is with i think everything inventory related.
You were looking for help, on how to deal with this problem. I gave you steps and the idea how to do so. There’s nothing more than I (or anyone else) can help you, other than actually writing the script for you - which is time consuming, since the problem is easy-to-fix, but you have to spend some time on it. Also, without programming knowledge, it’s hard to do anything with FiveM scripts