Describe the bug
I've been using scully_emotemenu for a while with both QB and ESX. In ESX, I noticed that the player's current walking style persists even after a restart, which is the expected behavior. However, this wasn't the case with QB.
I suspected that the issue might be related to the way ox_lib caches the ped/player for QBCore. After setting up a brand new QB server, I decided to investigate further. I tried using the exports with the QBCore onPlayerLoaded event and added print statements to ensure the player's current walking style was being saved via KVP. Everything seemed fine, but the walking style still wouldn't persist.
Finally, I decided to remove the cache.ped and accessed the player entity directly using PlayerPedId(). This change made the walking style persist as intended in qb-core as well.
Resource version
version '1.9.9f'
To Reproduce
See the bug description above.
Expected behavior
See the bug description above.
Screenshots
Additional context
I could probably dig a little deeper to figure out why the cache.ped doesn't work with QBCore, and if I find a better resolution I'll be sure to update you with my findings.
Describe the bug I've been using scully_emotemenu for a while with both QB and ESX. In ESX, I noticed that the player's current walking style persists even after a restart, which is the expected behavior. However, this wasn't the case with QB.
I suspected that the issue might be related to the way ox_lib caches the ped/player for QBCore. After setting up a brand new QB server, I decided to investigate further. I tried using the exports with the QBCore onPlayerLoaded event and added print statements to ensure the player's current walking style was being saved via KVP. Everything seemed fine, but the walking style still wouldn't persist.
Finally, I decided to remove the cache.ped and accessed the player entity directly using PlayerPedId(). This change made the walking style persist as intended in qb-core as well.
Resource version version '1.9.9f'
To Reproduce See the bug description above.
Expected behavior See the bug description above.
Screenshots
Additional context I could probably dig a little deeper to figure out why the cache.ped doesn't work with QBCore, and if I find a better resolution I'll be sure to update you with my findings.