{"hash":"0x12038599","ns":"CFX","name":"DOES_PLAYER_EXIST","slug":"DOES_PLAYER_EXIST","official":true,"named":true,"luaName":"DoesPlayerExist","game":"cfx","apiset":"server","returnType":"BOOL","params":[{"name":"playerSrc","type":"char*"}],"returnsDescription":"True if the player exists, false otherwise","summary":"Returns whether or not the player exists","descriptions":[{"source":"cfx","format":"md","body":"Returns whether or not the player exists"}],"examples":[{"lang":"lua","code":"local deferralMessages = { \"Isn't this just magical!\", \"We can defer all day!\", \"You'll get in eventually\", \"You're totally not going to sit here forever\", \"The Fruit Tree is a lie\" }\nAddEventHandler(\"playerConnecting\", function(name, setKickReason, deferrals)\n    local source = source\n    deferrals.defer()\n\n    Wait(0)\n\n\n    local messageIndex = 0\n\n    repeat\n        Wait(2000)\n        if messageIndex >= #deferralMessages then\n            deferrals.done()\n        else\n            messageIndex = messageIndex + 1\n        end\n        deferrals.update(deferralMessages[messageIndex])\n    until not DoesPlayerExist(source)\nend)","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/DOES_PLAYER_EXIST","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/DOES_PLAYER_EXIST.md","snippets":{"lua":"local retval = DoesPlayerExist(playerSrc)","luaInvoke":"local retval = Citizen.InvokeNative(0x12038599, playerSrc, Citizen.ReturnResultAnyway())","js":"const retval = DoesPlayerExist(playerSrc);","jsInvoke":"const retval = Citizen.invokeNative('0x12038599', playerSrc, Citizen.returnResultAnyway());","csharp":"bool retval = Function.Call<bool>((Hash)0x12038599, playerSrc);","notes":[]}}