The Lab
TASK native

_FIND_NEAREST_PED_AROUND_ANIMAL

returns Ped4 paramsbuild 1207

Returns the ped nearest to animalPed, filtered by the alive/dead flags and optionally preferring dead predators.

Signature

C
Ped _FIND_NEAREST_PED_AROUND_ANIMAL(Ped animalPed, BOOL aliveOnly, BOOL deadOnly, BOOL preferDeadPredators); // 0x244430C13BA5258E b1207

Parameters

#NameType
1animalPedPed
2aliveOnlyBOOL
3deadOnlyBOOL
4preferDeadPredatorsBOOL

Facts

Facts about _FIND_NEAREST_PED_AROUND_ANIMAL
Name
_FIND_NEAREST_PED_AROUND_ANIMAL
Hash
0x244430C13BA5258E
Namespace
Returns
Ped
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local ped = Citizen.InvokeNative(0x244430C13BA5258E, -- _FIND_NEAREST_PED_AROUND_ANIMAL
  PlayerPedId(), -- Ped animalPed
  false, -- BOOL aliveOnly
  false, -- BOOL deadOnly
  false, -- BOOL preferDeadPredators
  Citizen.ResultAsInteger()
)
print(ped)
JavaScript
const ped = Citizen.invokeNative("0x244430C13BA5258E", // _FIND_NEAREST_PED_AROUND_ANIMAL
  PlayerPedId(), // Ped animalPed
  false, // BOOL aliveOnly
  false, // BOOL deadOnly
  false, // BOOL preferDeadPredators
  Citizen.resultAsInteger()
);
console.log(ped)
C#
int ped = Function.Call<int>((Hash)0x244430C13BA5258E, // _FIND_NEAREST_PED_AROUND_ANIMAL
  API.PlayerPedId(), // Ped animalPed
  false, // BOOL aliveOnly
  false, // BOOL deadOnly
  false // BOOL preferDeadPredators
);
All TASK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.