The Lab
PED native

IS_TARGET_PED_IN_PERCEPTION_AREA

returns BOOL6 paramsbuild 1207

Returns true if targetPed is inside the perception area of ped, using customDistance when provided.

Signature

C
BOOL IS_TARGET_PED_IN_PERCEPTION_AREA(Ped ped, Ped targetPed, float p2, float customDistance, float p4, float p5); // 0x06087579E7AA85A9 b1207

Parameters

#NameType
1pedPed
2targetPedPed
3p2float
4customDistancefloat
5p4float
6p5float

Facts

Facts about IS_TARGET_PED_IN_PERCEPTION_AREA
Name
IS_TARGET_PED_IN_PERCEPTION_AREA
Hash
0x06087579E7AA85A9
Namespace
Returns
BOOL
Game build
1207

Examples

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

Lua
local result = Citizen.InvokeNative(0x06087579E7AA85A9, -- IS_TARGET_PED_IN_PERCEPTION_AREA
  PlayerPedId(), -- Ped ped
  PlayerPedId(), -- Ped targetPed
  0.0, -- float p2
  0.0, -- float customDistance
  0.0, -- float p4
  0.0 -- float p5
)
if result then
  -- ...
end
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x06087579E7AA85A9", // IS_TARGET_PED_IN_PERCEPTION_AREA
  PlayerPedId(), // Ped ped
  PlayerPedId(), // Ped targetPed
  0.0, // float p2
  0.0, // float customDistance
  0.0, // float p4
  0.0, // float p5
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0x06087579E7AA85A9, // IS_TARGET_PED_IN_PERCEPTION_AREA
  API.PlayerPedId(), // Ped ped
  API.PlayerPedId(), // Ped targetPed
  0.0f, // float p2
  0.0f, // float customDistance
  0.0f, // float p4
  0.0f // float p5
);
All PED natives

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