-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] - es_extended v1.11.2 - Can't get ESX.PlayerData correctly #1454
Comments
Hi @DyroS3, Where did you put this code ? |
the argument xPlayer is ESX.PlayerData. |
Sorry, I don't quite understand what you mean, maybe my translator is wrong. Do you mean that in the new version you have to set some Wait in order for the event to get the ESX.PlayerData correctly? |
No. RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
ESX.PlayerData = xPlayer
end) the parameter xPlayer in the Event, is ESX.PlayerData |
Yes, I know that this parameter represents ESX.PlayerData, but isn't it true that the new ESX kernel has an empty |
No. |
local function init()
if ESX.PlayerData.job.name == "xxx" then
xxxxx()
end
end
RegisterNetEvent('esx:playerLoaded', function(xPlayer, isNew, skin)
init()
end) Because I had code that was roughly structured like this, but in the new version it gives me the error |
I will investigate |
Describe the bug
When I have the
esx:playerLoaded
event in the latest ESX version, I find that it doesn't get theESX.PlayerData
correctly.To Reproduce
Steps to reproduce the behavior:
Wait(1)
, print data correctlyWait(1)
, print{}
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
.
Debug Info (please complete the following information):
The text was updated successfully, but these errors were encountered: