[BUG] Ammo not resetting upon Removing Weapon / Setting Weapon Ammo to 0.

Started by Inferno, Oct 11, 2021, 11:33 AM

Previous topic - Next topic

Inferno

Description:-
Whenever you set a weapon's ammo to 0 using player.SetWeapon(wep,0); or player.RemoveWeapon(), the weapon gets removed but the ammo are still there at the slot.
This bug is related to the bug reported by Xmair previously, and was supposedly fixed by Adtec here.
https://forum.vc-mp.org/?topic=8223.0
So its either the ammos are not getting reset or GetAmmoAtSlot still returning false values when weps are removed.
Note: GetAmmoAtSlot returns correct values when you have died/killed.
So, i think the issue persists with player.SetWeapon / player.RemoveWeapon functions.


Reproducible-:
Always.

What you were doing when the bug happened
I was testing the weapon drop system which would drop your weapons as pickups using a cmd. I found out that each time i dropped a weapon, after picking it up, it was giving me double of the ammos i had dropped. Also to note that i am not using Pickup.Quantity to store ammos but a class tor ammo. So its not a pickup related bug. This bug showed up with both SetWeapon(wep,0) as well as RemoveWeapon. The values only reset when you die/get killed.

What you think caused the bug
Its either related to second last update or it has been an unnoticed bug from previous versions.
Viva la VU
VFS Developer
VCCNR Administrator

NicusorN5