overextended/ox_inventory

Add Add & Remove functions to server side item config

Manason opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
I want to take actions when a certain item is added or removed from the player's inventory. Currently, I can do so on the client only, but would like to do so on the server.

Describe the solution you'd like
Add/Remove functions being added to the server side of the item config to be invoked when the inventory state is updated and an item is added/removed. I assume this should be possible as the server is state aware of player's inventories.

Describe alternatives you've considered
Using hooks like CreateItem/SwapItem, but I don't think this would cover things like clearing the player inventory.