IS_TARGET_PED_IN_PERCEPTION_AREA
Returns true if targetPed is inside the perception area of ped, using customDistance when provided.
Signature
BOOL IS_TARGET_PED_IN_PERCEPTION_AREA(Ped ped, Ped targetPed, float p2, float customDistance, float p4, float p5); // 0x06087579E7AA85A9 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | targetPed | Ped |
| 3 | p2 | float |
| 4 | customDistance | float |
| 5 | p4 | float |
| 6 | p5 | float |
Facts
| 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.
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// 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) {
// ...
}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
);Related PED natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.