# TASK::_FIND_NEAREST_PED_AROUND_ANIMAL

- **Hash:** `0x244430C13BA5258E`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `FindNearestPedAroundAnimal`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/TASK/_FIND_NEAREST_PED_AROUND_ANIMAL

## Signature

```c
Ped _FIND_NEAREST_PED_AROUND_ANIMAL(Ped animalPed, BOOL aliveOnly, BOOL deadOnly, BOOL preferDeadPredators);
```

## Parameters

- `animalPed` (`Ped`)
- `aliveOnly` (`BOOL`)
- `deadOnly` (`BOOL`)
- `preferDeadPredators` (`BOOL`)

## Returns

`Ped`

## Description

*Source: alloc8or RDR3 NativeDB*

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).

*Source: VORPCORE RDR3natives*

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

### Lua

```lua
local retval = FindNearestPedAroundAnimal(animalPed, aliveOnly, deadOnly, preferDeadPredators)

-- always available, by hash
local retval = Citizen.InvokeNative(0x244430C13BA5258E, animalPed, aliveOnly, deadOnly, preferDeadPredators, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = FindNearestPedAroundAnimal(animalPed, aliveOnly, deadOnly, preferDeadPredators);

// by hash
const retval = Citizen.invokeNative('0x244430C13BA5258E', animalPed, aliveOnly, deadOnly, preferDeadPredators, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
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 `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
