Closed Mesrine67 closed 2 months ago
ESX.PlayerLoaded already exists
yes but I ask for a statebag
yes but I ask for a statebag
Hi! It's a global client side variable, it works exactly like the statebag, you create a custom method to check the framework types and set the ESX.PlayerLoaded variable in your statebage in playerLoaded so you can use it for multiple frameworks.
I don't see the benefit of putting a global variable that is already client-side accessible in statebag.
Where are you stuck or why do you think a statebag is needed?
these so as not to have to go through the ESX variable and go through the statebag
You can still set your own state via two event handlers, one is onPlayerLoaded and the other is the playerDropped. Literally no need to add a state next to a client side function, you can register a state yourself too.
I really don't see any benefit of implementing this in esx legacy.
Add the
isLoggedIn
statebag for better management, especially for developers creating content compatible with multiple frameworks.