mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
02397cfc5a
Large refactor of server/player.lua to modernize the player system and public API. Introduces a Player metatable with cleaner Player.Functions interface, offline player support, and centralized data validation/merge logic (CheckPlayerData, applyDynamicDefaults, merge/prune helpers). Adds unique ID generators, improved money logging/notifications, and safer save/delete flows (including ForceDeleteCharacter). Replaces old Login/Logout/CreatePlayer flows, exposes exports (GetPlayer, GetPlayerByCitizenId, GetOfflinePlayerByCitizenId, GetPlayerByLicense, GetOfflinePlayerByLicense, AddPlayerMethod, AddPlayerField) for runtime integration, and improves inventory and job/gang handling. Overall aims: clearer runtime API, offline lookups, and more maintainable player persistence and event synchronization.