Vice City: Multiplayer

VC:MP Discussion => Support => Bugs and Crashes => Topic started by: Inferno on Oct 11, 2021, 11:33 AM

Title: [BUG] Ammo not resetting upon Removing Weapon / Setting Weapon Ammo to 0.
Post by: Inferno on Oct 11, 2021, 11:33 AM
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.
Title: Re: [BUG] Ammo not resetting upon Removing Weapon / Setting Weapon Ammo to 0.
Post by: NicusorN5 on Oct 13, 2021, 01:45 PM
Nah, I had this bug long since Adtec's releases.