GET_PED_NEARBY_PEDS
Fills the array sizeAndPeds with peds near ped, skipping peds of ignoredPedType, and returns how many were found. The first array element must hold the array size.
Signature
int GET_PED_NEARBY_PEDS(Ped ped, Any* sizeAndPeds, int ignoredPedType, int p3); // 0x23F8F5FC7E8C4A6B b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | sizeAndPeds | Any* (out pointer) |
| 3 | ignoredPedType | int |
| 4 | p3 | int |
Facts
| Name | GET_PED_NEARBY_PEDS |
|---|---|
| Hash | 0x23F8F5FC7E8C4A6B |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, sizeAndPeds = Citizen.InvokeNative(0x23F8F5FC7E8C4A6B, -- GET_PED_NEARBY_PEDS
PlayerPedId(), -- Ped ped
Citizen.PointerValueInt(), -- Any* sizeAndPeds
0, -- int ignoredPedType
0, -- int p3
Citizen.ResultAsInteger()
)
print(result, sizeAndPeds)const [result, sizeAndPeds] = Citizen.invokeNative("0x23F8F5FC7E8C4A6B", // GET_PED_NEARBY_PEDS
PlayerPedId(), // Ped ped
Citizen.pointerValueInt(), // Any* sizeAndPeds
0, // int ignoredPedType
0, // int p3
Citizen.resultAsInteger()
);
console.log(result, sizeAndPeds)var sizeAndPedsArg = new OutputArgument();
int result = Function.Call<int>((Hash)0x23F8F5FC7E8C4A6B, // GET_PED_NEARBY_PEDS
API.PlayerPedId(), // Ped ped
sizeAndPedsArg, // Any* sizeAndPeds
0, // int ignoredPedType
0 // int p3
);
int sizeAndPeds = sizeAndPedsArg.GetResult<int>();Related PED natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.