_IS_PED_LOOKING_AT_COORD
Returns true if ped is looking toward (x, y, z) within radius.
Signature
BOOL _IS_PED_LOOKING_AT_COORD(Ped ped, float x, float y, float z, float radius); // 0x508F5053E3F6F0C4 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | radius | float |
Facts
| Name | _IS_PED_LOOKING_AT_COORD |
|---|---|
| Hash | 0x508F5053E3F6F0C4 |
| 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(0x508F5053E3F6F0C4, -- _IS_PED_LOOKING_AT_COORD
PlayerPedId(), -- Ped ped
0.0, -- float x
0.0, -- float y
0.0, -- float z
0.0 -- float radius
)
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("0x508F5053E3F6F0C4", // _IS_PED_LOOKING_AT_COORD
PlayerPedId(), // Ped ped
0.0, // float x
0.0, // float y
0.0, // float z
0.0, // float radius
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x508F5053E3F6F0C4, // _IS_PED_LOOKING_AT_COORD
API.PlayerPedId(), // Ped ped
0.0f, // float x
0.0f, // float y
0.0f, // float z
0.0f // float radius
);Related TASK natives
- _IS_PED_ARRESTING_ANY_PED
- _IS_PED_LEADING_HORSE
- _IS_PED_BEING_LED
- _IS_PED_DUELLING
- IS_PED_SCENARIO_REACT_LOOKING
- TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD
- TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD_USING_COMBAT_STYLE
- TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD
- TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD_USING_COMBAT_STYLE
- _GET_PED_IS_IGNORING_DEAD_BODIES
- _GET_SCENARIO_POINT_PED_IS_USING
- _GET_SCENARIO_POINT_TYPE_PED_IS_USING
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.