Skip to content
New issue

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

fix: prevent reload if weapon switched to incorrect ammo #199

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

Qwerty1Verified
Copy link
Contributor

Describe Pull request
This PR checks the ammo type on the progressbar completion callback, without this you are able to switch weapon during the progress bar which will result in the metadata of the incorrect weapon and item being set and increasing the ammo. This is abusable by beginning to reload a pistol with pistol ammo and switching to an assault rifle as the assault rifle will then gain ammo when pulling the weapon back out.

This PR fixes the issue qbcore-framework/qb-inventory#574

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality? [yes/no] (Be honest)
  • Does your code fit the style guidelines? [yes/no]
  • Does your PR fit the contribution guidelines? [yes/no]

@GhzGarage GhzGarage merged commit f5ea878 into qbcore-framework:main Sep 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants