FireClient

isExplosionInSphere

IS_EXPLOSION_IN_SPHERE0xAB0F816885B0E483

The GTA V native IS_EXPLOSION_IN_SPHERE of the FIRE namespace, as LS:MP client scripts call it: the global function isExplosionInSphere, in JavaScript and in Lua.

SignatureJavaScript
isExplosionInSphere(
  explosionType: number,
  x: number,
  y: number,
  z: number,
  radius: number
): boolean
SignatureLua
isExplosionInSphere(
  explosionType: integer,
  x: number,
  y: number,
  z: number,
  radius: number
): boolean

Usage

JavaScript
const result = isExplosionInSphere(explosionType, x, y, z, radius);
Lua
local result = isExplosionInSphere(explosionType, x, y, z, radius)

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

Parameters

ParameterTypeJavaScriptLuaDescription
explosionTypeintnumberintegerSee addExplosion.
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
radiusfloatnumbernumber

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Fire FIRE
In the game
BOOL IS_EXPLOSION_IN_SPHERE(int explosionType, float x, float y, float z, float radius)
Hash
0xAB0F816885B0E483

Open in the interactive natives reference