hasBulletImpactedInArea
HAS_BULLET_IMPACTED_IN_AREA0x9870ACFB89A90995The 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.
hasBulletImpactedInArea(
x: number,
y: number,
z: number,
radius: number,
bIsPlayer: boolean,
bIsEntry: boolean
): booleanhasBulletImpactedInArea(
x: number,
y: number,
z: number,
radius: number,
bIsPlayer: boolean,
bIsEntry: boolean
): booleanUsage
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
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
radius | float | number | number |
bIsPlayer | BOOL | boolean | boolean |
bIsEntry | BOOL | boolean | boolean |
Returns
BOOL JavaScript boolean, Lua booleanNotes
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