Expected Result: On artifact 4162 and before, when a player had disconnected or left server, getting the value of GetPlayerEndpoint
or similar natives would return nil
.
Actual Result: On artifact 4394 and 4445 (the two I tested), even after disconnection GetPlayerEndpoint
and GetPlayerGuid
would return valid values instead of nil
for temporary IDs only. This is contrary to actual server IDs that will return nil
after player disconnection.
More Info: This only happens to temporary IDs after a player has completely connected to the server. If the player is dropped by deferrals in playerConnecting
then this does not occur and it returns nil
as expected.
Reproduction
local sources = {}
AddEventHandler('playerConnecting', function(name, setKickReason, deferrals)
table.insert(sources, source)
local player = source
Citizen.Wait(5000)
DropPlayer(player, 'aloha')
end)
AddEventHandler('playerDropped', function(reason)
print('playerDropped', source, reason)
local player = source
-- show a delayed version for the actual server id (not temporary)
Citizen.Wait(1000)
print(player, GetPlayerEndpoint(player), GetPlayerGuid(player))
end)
Citizen.CreateThread(function()
while true do
for _, s in ipairs(sources) do
print(s, GetPlayerEndpoint(s), GetPlayerGuid(s))
end
Citizen.Wait(1000)
end
end)
Additional Information
Confirmed included fxserver artifacts: 4394,4445
Confirmed excluded fxserver artifacts: 4162 (and before)
Client version: canary @ 4445
Computer: Win 10 Pro