PedClient

isPedFacingPed

IS_PED_FACING_PED0xD71649DB0A545AA3

The 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.

SignatureJavaScript
isPedFacingPed(ped: Ped, otherPed: Ped, angle: number): boolean
SignatureLua
isPedFacingPed(ped: Ped, otherPed: Ped, angle: number): boolean

Usage

JavaScript
const result = isPedFacingPed(ped, otherPed, angle);
Lua
local result = isPedFacingPed(ped, otherPed, angle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
otherPedPednumberinteger
anglefloatnumbernumber

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

Open in the interactive natives reference