help me with my esx_bulletproofvest

Hello everyone,

I could use some help with a script I’m currently developing. My script involves adding a bulletproof vest to the player along with applying armor, and I’m using the ‘ox_inventory’ framework to manage the inventory. However, I’m encountering some difficulties.

The main issue I’m facing is related to removing the item from the player’s inventory when they equip the vest. I would also like that when the armor reaches zero, the player’s outfit reverts to a state without the vest (bproof_1 = 0, bproof_2 = 0).

I’ve double-checked my code multiple times and I can’t seem to figure out what’s not working properly. I’ve tried different approaches, taking into consideration that I’m using ‘ox_inventory’, but nothing seems to work as intended.

If anyone has experience with this kind of script, especially involving ‘ox_inventory’, or has ideas to help me tackle these issues, I would be really grateful. Any help, suggestions, or advice would be greatly appreciated.

Thank you in advance for your assistance!

esx_bulletproofvest.rar (2.6 KB)