[Bug] Player state bags never replicate server -> client (entity bags / GlobalState / client->server all work) #77
Closed
SlugTeamSix
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 3 comments
|
Thanks, we will look into this. |
0 replies
|
A fix for this bug has been implemented and is available in the latest patch. Please try again and let us know if the issue persists. Thanks for your help! |
0 replies
|
Tested on b94, appears to be working as expected now. Thanks! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Server-side writes to player state bags (
Player(id).state:set(key, value, true)) never arrive at the owning client —LocalPlayer.state.<key>staysnilindefinitely. This is not the first-tick timing issue from discussion #36: values written minutes after the client joined, and fresh values written seconds before the client reads them, are allnilon the client.All three other state bag channels work in the same session:
LocalPlayer.state:set(k, v, true))Issue type
Server
Repro rate
Always
Server build version
FXServer-early-access b92 win32
OS
No response
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
Windows
OS version / distribution
No response
CPU
No response
RAM
No response
Using txAdmin?
None
Hosting provider
None
Machine type
None
/perf endpoint output
No response
DDoS protection
No response
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
local src = GetPlayers()[1] Player(src).state:set('test', 'hello', true) Entity(GetPlayerPed(src)).state:set('etest', 'hello', true)print(LocalPlayer.state.test, Entity(PlayerPedId()).state.etest)nil hello— the entity bag (control) replicated, the player bag never does.Expected Behavior
A replicated player state bag value set on the server (Player(id).state:set(key, value, true)) becomes readable on the owning client via LocalPlayer.state., as on FXServer for GTAV Legacy and as entity state bags and GlobalState still do on Enhanced.
Actual Behavior
LocalPlayer.state. is nil on the client indefinitely, regardless of when the server writes it (at join or minutes later, fresh writes seconds before the read). The same value read back on the server (Player(id).state.) is correct, and AddStateBagChangeHandler on the client never fires for player bags. Practical impact: any framework coordinating per-player state via player bags breaks — e.g. qbox's isLoggedIn / medical isDead (players stuck dead on the ground), vehicle key lists, etc.
Evidence
Additional Context
No response
All reactions