GetAllPeds
Docslocal retval = GetAllPeds()Description
Returns all peds handles known to the server.
The data returned adheres to the following layout:
[127, 42, 13, 37]
Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
objectExamples
Official
-- This example prints information of every ped that has an owner.
for i, ped in ipairs(GetAllPeds()) do
local pedOwner = NetworkGetEntityOwner(ped)
if pedOwner > 0 then
local playerName = GetPlayerName(pedOwner)
local pedModel = GetEntityModel(ped)
local pedArmour = GetPedArmour(ped)
print("Ped : "..ped.." | Owner name : "..playerName.." | Model : "..pedModel.." | Armour : "..pedArmour)
end
end