{"hash":"0xB8584FEF","ns":"CFX","name":"GET_ALL_PEDS","slug":"GET_ALL_PEDS","official":true,"named":true,"luaName":"GetAllPeds","game":"cfx","apiset":"server","returnType":"object","params":[],"returnsDescription":"An object containing a list of peds handles.","summary":"Returns all peds handles known to the server.","descriptions":[{"source":"cfx","format":"md","body":"Returns all peds handles known to the server.\nThe data returned adheres to the following layout:\n\n```\n[127, 42, 13, 37]\n```"}],"examples":[{"lang":"lua","code":"-- This example prints information of every ped that has an owner.\n\nfor i, ped in ipairs(GetAllPeds()) do\n    local pedOwner = NetworkGetEntityOwner(ped)\n    if pedOwner > 0 then\n       local playerName = GetPlayerName(pedOwner)\n       local pedModel = GetEntityModel(ped)\n       local pedArmour = GetPedArmour(ped)\n       print(\"Ped : \"..ped..\" | Owner name : \"..playerName..\" | Model : \"..pedModel..\" | Armour : \"..pedArmour)\n    end\nend","source":"cfx"}],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/GET_ALL_PEDS","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/GET_ALL_PEDS.md","snippets":{"lua":"local retval = GetAllPeds()","luaInvoke":"local retval = Citizen.InvokeNative(0xb8584fef, Citizen.ResultAsObject2(msgpack.unpack))","js":"const retval = GetAllPeds();","jsInvoke":"const retval = Citizen.invokeNative('0xb8584fef', Citizen.returnResultAnyway(), Citizen.resultAsObject2());","csharp":"Function.Call((Hash)0xb8584fef);","notes":[]}}