_FIND_NEAREST_PED_AROUND_ANIMAL
Animals only. Returns the nearest ped around `animalPed` matching the life-state filters (e.g., use (false,true,0) to find a nearby corpse for TASK_EAT).
0x244430C13BA5258EFindNearestPedAroundAnimalSignature
Ped _FIND_NEAREST_PED_AROUND_ANIMAL(Ped animalPed, BOOL aliveOnly, BOOL deadOnly, BOOL preferDeadPredators);Parameters
| Name | Type | Description |
|---|---|---|
animalPed | Ped | — |
aliveOnly | BOOL | — |
deadOnly | BOOL | — |
preferDeadPredators | BOOL | — |
Returns Ped
Description
Animals only. Returns the nearest ped around animalPed matching the life-state filters (e.g., use (false,true,0) to find a nearby corpse for TASK_EAT).
Last flag appears to bias predators/fish toward dead targets (uncertain).
Finds the nearest ped around the specified originPed, with optional filters for life state and predator/fish behavior
(all false) returns the nearest ped regardless of alive/dead state
Usage
local retval = FindNearestPedAroundAnimal(animalPed, aliveOnly, deadOnly, preferDeadPredators)
-- always works, by hash
local retval = Citizen.InvokeNative(0x244430C13BA5258E, animalPed, aliveOnly, deadOnly, preferDeadPredators, Citizen.ResultAsInteger())JavaScript and C#
const retval = FindNearestPedAroundAnimal(animalPed, aliveOnly, deadOnly, preferDeadPredators);
// by hash
const retval = Citizen.invokeNative('0x244430C13BA5258E', animalPed, aliveOnly, deadOnly, preferDeadPredators, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x244430C13BA5258E, animalPed, aliveOnly, deadOnly, preferDeadPredators);- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.