ASSAULTRIFLE_MK2 ammunition disappearing on death // Munição da ASSAULTRIFLE_MK2 sumindo ao morrer

English:
Someone help me to solve this of the ammunition disappear when dying

Portuguese:
Alguém me ajuda a resolver isso da munição sumir ao morrer

Video:

When you die in GtaV, no matter if it’s FiveM or not, if you did so with a weapon in hand, you loose a mag of said weapon. The death script you’re using technically makes you die, but stops from respawning. Hence, you still loose the mag since the base game thinks your player died. Try this without holding the weapon and see if it continues. No way to combat this, besides ondeath + withWeaponInHand = give player X amount of ammo per weapon.

English:

I saw that there is something else that happens too, when I go out and enter the server, my ammunition is zeroed

Portuguese:

Eu vi que tem outra coisa que acontece também, quando eu saio e entro no servidor, minha munição está zerada