citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.41k stars 2.01k forks source link

DoesPlayerExist return true if player has exited during loading #2560

Closed CeebDev closed 1 month ago

CeebDev commented 1 month ago

What happened?

If a player try to connect to the server, wait the loading resources phase (before loading screen) and exit

Then DoesPlayerExist return 1

Tried to relaunch FiveM, wait +30min etc

Expected result

if user exit the loading phase, DoesPlayerExist need to return false

Reproduction steps

Server side

local tempId = REPLACE WITH THE TEMP ID OF USER TRYING TO CONNECT
CreateThread(function()
    while true do
        print(DoesPlayerExist(tempId))
        Wait(1000)
    end
end)

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer

Specific version(s)

FiveM b3095 (canary), Server b7930 Windows 11

Additional information

No response