FireClient

addExplosionWithUserVfx

ADD_EXPLOSION_WITH_USER_VFX0x36DD3FE58B5E5212

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

SignatureJavaScript
addExplosionWithUserVfx(
  x: number,
  y: number,
  z: number,
  explosionType: number,
  explosionFx: Hash,
  damageScale: number,
  isAudible: boolean,
  isInvisible: boolean,
  cameraShake: number
): void
SignatureLua
addExplosionWithUserVfx(
  x: number,
  y: number,
  z: number,
  explosionType: integer,
  explosionFx: Hash,
  damageScale: number,
  isAudible: boolean,
  isInvisible: boolean,
  cameraShake: number
)

Usage

JavaScript
addExplosionWithUserVfx(
  x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake
);
Lua
addExplosionWithUserVfx(
    x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake
)

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
addExplosionWithUserVfx(
  pos, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake
);
Lua · with vectors
addExplosionWithUserVfx(
    pos, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake
)

Parameters

ParameterTypeJavaScriptLuaDescription
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
explosionTypeintnumberintegerSee addExplosion.
explosionFxHashnumberinteger
damageScalefloatnumbernumber
isAudibleBOOLbooleanbooleanIf explosion makes a sound.
isInvisibleBOOLbooleanbooleanIf the explosion is invisible or not.
cameraShakefloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Fire FIRE
In the game
void ADD_EXPLOSION_WITH_USER_VFX(float x, float y, float z, int explosionType, Hash explosionFx, float damageScale, BOOL isAudible, BOOL isInvisible, float cameraShake)
Hash
0x36DD3FE58B5E5212
Formerly
_ADD_SPECFX_EXPLOSION

Open in the interactive natives reference