Skip to content

Always update player armor metadata#347

Open
sjdawson wants to merge 1 commit into
qbcore-framework:mainfrom
sjdawson:always-update-player-armor-metadata
Open

Always update player armor metadata#347
sjdawson wants to merge 1 commit into
qbcore-framework:mainfrom
sjdawson:always-update-player-armor-metadata

Conversation

@sjdawson
Copy link
Copy Markdown

@sjdawson sjdawson commented Mar 30, 2025

This goes hand-in-hand with my PR to fix the initial armor saving when item is used: qbcore-framework/qb-smallresources#497

Also fixes qb-smallresources/195

Moves the update of the player's armor outside of the multiple if checks that wouldn't trigger if only the player's armor takes a hit. Now it will always update the player's armor metadata value if their armor value has changed from the last iteration.

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality? Yes
  • Does your code fit the style guidelines? Yes
  • Does your PR fit the contribution guidelines? Yes

Copy link
Copy Markdown
Contributor

@Z3rio Z3rio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Infinity Armor

2 participants