IS_PED_HEADING_TOWARDS_POSITION
Hash
0xFCF37A457CB96DC0Runtime name
IsPedHeadingTowardsPositionNamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xFCF37A457CB96DC0Signature
BOOL IS_PED_HEADING_TOWARDS_POSITION(Ped ped, float x, float y, float z, float p4);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
x | float | — |
y | float | — |
z | float | — |
p4 | float | — |
Returns BOOL
Usage
local retval = IsPedHeadingTowardsPosition(ped, x, y, z, p4)
-- always works, by hash
local retval = Citizen.InvokeNative(0xFCF37A457CB96DC0, ped, x, y, z, p4, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = IsPedHeadingTowardsPosition(ped, x, y, z, p4);
// by hash
const retval = Citizen.invokeNative('0xFCF37A457CB96DC0', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, p4 + 0.0000001, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0xFCF37A457CB96DC0, ped, x, y, z, p4);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.