MiscClient

isBulletInAngledArea

IS_BULLET_IN_ANGLED_AREA0x1A8B5F3C01E2B477

The GTA V native IS_BULLET_IN_ANGLED_AREA of the MISC namespace, as LS:MP client scripts call it: the global function isBulletInAngledArea, in JavaScript and in Lua.

SignatureJavaScript
isBulletInAngledArea(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  width: number,
  ownedByPlayer: boolean
): boolean
SignatureLua
isBulletInAngledArea(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  width: number,
  ownedByPlayer: boolean
): boolean

Usage

JavaScript
const result = isBulletInAngledArea(x1, y1, z1, x2, y2, z2, width, ownedByPlayer);
Lua
local result = isBulletInAngledArea(x1, y1, z1, x2, y2, z2, width, ownedByPlayer)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const result = isBulletInAngledArea(pos1, pos2, width, ownedByPlayer);
Lua · with vectors
local result = isBulletInAngledArea(pos1, pos2, width, ownedByPlayer)

Parameters

ParameterTypeJavaScriptLua
x1floatnumbernumber
y1floatnumbernumber
z1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber
z2floatnumbernumber
widthfloatnumbernumber
ownedByPlayerBOOLbooleanboolean

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.

For projectiles, see: isProjectileTypeInAngledArea
See isPointInAngledArea for the definition of an angled area.

Reference

Namespace
Misc MISC
In the game
BOOL IS_BULLET_IN_ANGLED_AREA(float x1, float y1, float z1, float x2, float y2, float z2, float width, BOOL ownedByPlayer)
Hash
0x1A8B5F3C01E2B477

Open in the interactive natives reference