We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When enter Hydra or Tank client event "WeaponChange" returns newweapon as 0 leading to crash when use Alt.GetWeaponDataByWeaponHash(newweapon)
The text was updated successfully, but these errors were encountered:
please provide full repo code
Sorry, something went wrong.
Sorry.
Clientside: Alt.OnPlayerWeaponChange += (oldweapon, newweapon) => { AltV.Net.Client.Elements.Data.WeaponData? wData = Alt.GetWeaponDataByWeaponHash(newweapon); };
Alt.OnPlayerWeaponChange += (oldweapon, newweapon) => { AltV.Net.Client.Elements.Data.WeaponData? wData = Alt.GetWeaponDataByWeaponHash(newweapon); };
When entering hydra for example after one of the latest release updates ir started to return 0. I added check if (newweapon == 0) return;
if (newweapon == 0) return;
It's not a big problem but reporting, because it crash if you use GetWeaponDataByWeaponHash(0)
No branches or pull requests
When enter Hydra or Tank client event "WeaponChange" returns newweapon as 0 leading to crash when use Alt.GetWeaponDataByWeaponHash(newweapon)
The text was updated successfully, but these errors were encountered: