MiscClient

isProjectileTypeInArea

IS_PROJECTILE_TYPE_IN_AREA0x2E0DC353342C4A6D

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

SignatureJavaScript
isProjectileTypeInArea(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  type: number,
  ownedByPlayer: boolean
): boolean
SignatureLua
isProjectileTypeInArea(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  type: integer,
  ownedByPlayer: boolean
): boolean

Usage

JavaScript
const result = isProjectileTypeInArea(x1, y1, z1, x2, y2, z2, type, ownedByPlayer);
Lua
local result = isProjectileTypeInArea(x1, y1, z1, x2, y2, z2, type, 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 = isProjectileTypeInArea(pos1, pos2, type, ownedByPlayer);
Lua · with vectors
local result = isProjectileTypeInArea(pos1, pos2, type, ownedByPlayer)

Parameters

ParameterTypeJavaScriptLua
x1floatnumbernumber
y1floatnumbernumber
z1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber
z2floatnumbernumber
typeintnumberinteger
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.

Determines whether there is a projectile of a specific type within the specified coordinates. The coordinates form a axis-aligned bounding box.

Reference

Namespace
Misc MISC
In the game
BOOL IS_PROJECTILE_TYPE_IN_AREA(float x1, float y1, float z1, float x2, float y2, float z2, int type, BOOL ownedByPlayer)
Hash
0x2E0DC353342C4A6D

Open in the interactive natives reference