isProjectileTypeWithinDistance
IS_PROJECTILE_TYPE_WITHIN_DISTANCE0x34318593248C8FB2The GTA V native IS_PROJECTILE_TYPE_WITHIN_DISTANCE of the MISC namespace, as LS:MP client scripts call it: the global function isProjectileTypeWithinDistance, in JavaScript and in Lua.
isProjectileTypeWithinDistance(
x: number,
y: number,
z: number,
projectileHash: Hash,
radius: number,
ownedByPlayer: boolean
): booleanisProjectileTypeWithinDistance(
x: number,
y: number,
z: number,
projectileHash: Hash,
radius: number,
ownedByPlayer: boolean
): booleanUsage
JavaScript
const result = isProjectileTypeWithinDistance(x, y, z, projectileHash, radius, ownedByPlayer);Lua
local result = isProjectileTypeWithinDistance(x, y, z, projectileHash, radius, 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 = isProjectileTypeWithinDistance(pos, projectileHash, radius, ownedByPlayer);Lua · with vectors
local result = isProjectileTypeWithinDistance(pos, projectileHash, radius, ownedByPlayer)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
projectileHash | Hash | number | integer |
radius | float | number | number |
ownedByPlayer | BOOL | boolean | boolean |
Returns
BOOL JavaScript boolean, Lua booleanReference
- Namespace
- Misc MISC
- In the game
BOOL IS_PROJECTILE_TYPE_WITHIN_DISTANCE(float x, float y, float z, Hash projectileHash, float radius, BOOL ownedByPlayer)- Hash
0x34318593248C8FB2- Formerly
_IS_PROJECTILE_TYPE_IN_RADIUS