{"hash":"0x6E31E993","ns":"CFX","name":"GET_PLAYER_PED","slug":"GET_PLAYER_PED","official":true,"named":true,"luaName":"GetPlayerPed","game":"cfx","apiset":"server","returnType":"Entity","params":[{"name":"playerSrc","type":"char*","description":"The player source, passed as a string."}],"returnsDescription":"Returns a valid Ped Entity ID if the passed `playerSrc` is valid, `0` if not.","summary":"Used to get the player's Ped Entity ID when a valid playerSrc is passed.","descriptions":[{"source":"cfx","format":"md","body":"Used to get the player's Ped Entity ID when a valid `playerSrc` is passed."}],"examples":[{"lang":"lua","code":"-- Let's assume source is a valid ID\nlocal pedId = GetPlayerPed(source);\n\n-- If pedId is valid (not equal to 0)\nif pedId ~= 0 then\n    -- Do something with this ped!\nend","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_PED","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_PED.md","snippets":{"lua":"local retval = GetPlayerPed(playerSrc)","luaInvoke":"local retval = Citizen.InvokeNative(0x6e31e993, playerSrc, Citizen.ResultAsInteger())","js":"const retval = GetPlayerPed(playerSrc);","jsInvoke":"const retval = Citizen.invokeNative('0x6e31e993', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x6e31e993, playerSrc);","notes":[]}}