RedM Natives

IS_ENTITY_IN_ANGLED_AREA

Creates a spherical cone at origin that extends to surface with the angle specified.

Hash0xD3151E53134595E5
Runtime nameIsEntityInAngledArea
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x51210CED3DA1C78A

Signature

BOOL IS_ENTITY_IN_ANGLED_AREA(Entity entity, float originX, float originY, float originZ, float edgeX, float edgeY, float edgeZ, float angle, BOOL p8, BOOL p9, Any p10);

Parameters

NameTypeDescription
entityEntity—
originXfloat—
originYfloat—
originZfloat—
edgeXfloat—
edgeYfloat—
edgeZfloat—
anglefloat—
p8BOOL—
p9BOOL—
p10Any—

Returns BOOL

Description

Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone

Angle is measured in degrees.

Usage

Lua
local retval = IsEntityInAngledArea(entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10)

-- always works, by hash
local retval = Citizen.InvokeNative(0xD3151E53134595E5, entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsEntityInAngledArea(entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10);

// by hash
const retval = Citizen.invokeNative('0xD3151E53134595E5', entity, originX + 0.0000001, originY + 0.0000001, originZ + 0.0000001, edgeX + 0.0000001, edgeY + 0.0000001, edgeZ + 0.0000001, angle + 0.0000001, p8, p9, p10, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xD3151E53134595E5, entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.