GET_PED_NEARBY_PEDS
Hash
0x23F8F5FC7E8C4A6BRuntime name
GetPedNearbyPedsNamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x23F8F5FC7E8C4A6BSignature
int GET_PED_NEARBY_PEDS(Ped ped, Any* sizeAndPeds, int ignoredPedType, int p3);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
sizeAndPeds | Any* | — |
ignoredPedType | int | — |
p3 | int | — |
Returns int
Usage
local retval, sizeAndPeds = GetPedNearbyPeds(ped, ignoredPedType, p3)
-- always works, by hash
local retval, sizeAndPeds = Citizen.InvokeNative(0x23F8F5FC7E8C4A6B, ped, Citizen.PointerValueInt(), ignoredPedType, p3, Citizen.ResultAsInteger())JavaScript and C#
const [retval, sizeAndPeds] = GetPedNearbyPeds(ped, ignoredPedType, p3);
// by hash
const [retval, sizeAndPeds] = Citizen.invokeNative('0x23F8F5FC7E8C4A6B', ped, Citizen.pointerValueInt(), ignoredPedType, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());var sizeAndPeds = new OutputArgument();
int retval = Function.Call<int>((Hash)0x23F8F5FC7E8C4A6B, ped, sizeAndPeds, ignoredPedType, p3);
// sizeAndPeds.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.