MiscClient

hasBulletImpactedInArea

HAS_BULLET_IMPACTED_IN_AREA0x9870ACFB89A90995

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

SignatureJavaScript
hasBulletImpactedInArea(
  x: number,
  y: number,
  z: number,
  radius: number,
  bIsPlayer: boolean,
  bIsEntry: boolean
): boolean
SignatureLua
hasBulletImpactedInArea(
  x: number,
  y: number,
  z: number,
  radius: number,
  bIsPlayer: boolean,
  bIsEntry: boolean
): boolean

Usage

JavaScript
const result = hasBulletImpactedInArea(x, y, z, radius, bIsPlayer, bIsEntry);
Lua
local result = hasBulletImpactedInArea(x, y, z, radius, bIsPlayer, bIsEntry)

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 = hasBulletImpactedInArea(pos, radius, bIsPlayer, bIsEntry);
Lua · with vectors
local result = hasBulletImpactedInArea(pos, radius, bIsPlayer, bIsEntry)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
radiusfloatnumbernumber
bIsPlayerBOOLbooleanboolean
bIsEntryBOOLbooleanboolean

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.

bIsPlayer: checks if the player fired the bullet
bEntryOnly: only find entry impacts

Reference

Namespace
Misc MISC
In the game
BOOL HAS_BULLET_IMPACTED_IN_AREA(float x, float y, float z, float radius, BOOL bIsPlayer, BOOL bIsEntry)
Hash
0x9870ACFB89A90995

Open in the interactive natives reference