{"hash":"0x244430C13BA5258E","ns":"TASK","name":"_FIND_NEAREST_PED_AROUND_ANIMAL","slug":"_FIND_NEAREST_PED_AROUND_ANIMAL","official":false,"named":true,"luaName":"FindNearestPedAroundAnimal","game":"rdr3","apiset":"client","returnType":"Ped","params":[{"name":"animalPed","type":"Ped"},{"name":"aliveOnly","type":"BOOL"},{"name":"deadOnly","type":"BOOL"},{"name":"preferDeadPredators","type":"BOOL"}],"summary":"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).","descriptions":[{"source":"alloc8or","format":"text","body":"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).\nLast flag appears to bias predators/fish toward dead targets (uncertain)."},{"source":"vorp","format":"text","body":"Finds the nearest ped around the specified originPed, with optional filters for life state and predator/fish behavior\n(all false) returns the nearest ped regardless of alive/dead state"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/TASK/_FIND_NEAREST_PED_AROUND_ANIMAL","markdownUrl":"https://natives.borderlinerp.com/natives/TASK/_FIND_NEAREST_PED_AROUND_ANIMAL.md","snippets":{"lua":"local retval = FindNearestPedAroundAnimal(animalPed, aliveOnly, deadOnly, preferDeadPredators)","luaInvoke":"local retval = Citizen.InvokeNative(0x244430C13BA5258E, animalPed, aliveOnly, deadOnly, preferDeadPredators, Citizen.ResultAsInteger())","js":"const retval = FindNearestPedAroundAnimal(animalPed, aliveOnly, deadOnly, preferDeadPredators);","jsInvoke":"const retval = Citizen.invokeNative('0x244430C13BA5258E', animalPed, aliveOnly, deadOnly, preferDeadPredators, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x244430C13BA5258E, animalPed, aliveOnly, deadOnly, preferDeadPredators);","notes":["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."]}}