altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 16 forks source link

player.GetWeaponAmmo Doesnt Work Right #2212

Closed Alessandro18K closed 8 months ago

Alessandro18K commented 8 months ago

Description of the problem

When you have 2 Weapons in your Hand and you try to get the Ammo with the Weaponhash Hash with player.GetWeaponAmmo You get the right Value at the first weapon and on the second weapon you get the value from the first Weapon

Reproduction steps

Set 2 Weapons in your Loadout and then make an Function where you request the WeaponAmmo with the player.CurrentWeapon Hash and then you will see that the Ammo is only the right Value at the first Weapon

e.g player.GetWeaponAmmo(player.CurrentWeapon);

Expected behaviour

That you get the Right Value on all Request and all Weapons

Additional context

No response

Operating system

Ubuntu 22

Version

Release 16.0.30

Crashdump ID

No response

Confirmation of issue's presence

Alessandro18K commented 8 months ago

Edit: The Problem only comes when you have e.g 2 Pistoles in Your Loadout when you have 1 Pistol and 1 eg SMG than it works right

xxshady commented 8 months ago

Edit: The Problem only comes when you have e.g 2 Pistoles in Your Loadout when you have 1 Pistol and 1 eg SMG than it works right

it's expected behavior