isPedFacingPed
IS_PED_FACING_PED0xD71649DB0A545AA3The GTA V native IS_PED_FACING_PED of the PED namespace, as LS:MP client scripts call it: the global function isPedFacingPed, in JavaScript and in Lua.
isPedFacingPed(ped: Ped, otherPed: Ped, angle: number): booleanisPedFacingPed(ped: Ped, otherPed: Ped, angle: number): booleanUsage
JavaScript
const result = isPedFacingPed(ped, otherPed, angle);Lua
local result = isPedFacingPed(ped, otherPed, angle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
otherPed | Ped | number | integer |
angle | float | number | number |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
angle is ped's view cone
Reference
- Namespace
- Ped PED
- In the game
BOOL IS_PED_FACING_PED(Ped ped, Ped otherPed, float angle)- Hash
0xD71649DB0A545AA3