IS_ENTITY_IN_ANGLED_AREA
Creates a spherical cone at origin that extends to surface with the angle specified.
Hash
0xD3151E53134595E5Runtime name
IsEntityInAngledAreaNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x51210CED3DA1C78ASignature
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
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
originX | float | — |
originY | float | — |
originZ | float | — |
edgeX | float | — |
edgeY | float | — |
edgeZ | float | — |
angle | float | — |
p8 | BOOL | — |
p9 | BOOL | — |
p10 | Any | — |
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
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#
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());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. 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.