Skip to content

Conversation

@sleepyexe
Copy link

Description

This pull request will change the way of sending player data to client side, instead of sending bulk of player data that doesn't needed, this changes sending key and value that changed to client side.

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

P.S: sorry for my bad english

Add event handlers for qbx_core:client:onPlayerDataChanged and QBCore:Client:SetPlayerData to ensure player data is only updated from server-side and properly synchronized across events.
…nges

Modify UpdatePlayerData function to accept key-value pairs for targeted updates instead of full player data refreshes. This improves efficiency by only sending changed data to clients rather than the entire player state. All calls to UpdatePlayerData have been updated to pass the relevant key and value.

Add new client event 'qbx_core:client:onPlayerDataChanged' for granular updates while maintaining backward compatibility with existing events.
Prevent unauthorized resources from modifying player data by verifying the invoking resource is qbx_core
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.

1 participant