addExplosion
ADD_EXPLOSION0xE3AD2BDBAEE269ACThe GTA V native ADD_EXPLOSION of the FIRE namespace, as LS:MP client scripts call it: the global function addExplosion, in JavaScript and in Lua.
addExplosion(
x: number,
y: number,
z: number,
explosionType: number,
damageScale: number,
isAudible: boolean,
isInvisible: boolean,
cameraShake: number,
noDamage: boolean
): voidaddExplosion(
x: number,
y: number,
z: number,
explosionType: integer,
damageScale: number,
isAudible: boolean,
isInvisible: boolean,
cameraShake: number,
noDamage: boolean
)Usage
JavaScript
addExplosion(
x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage
);Lua
addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage)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
addExplosion(pos, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage);Lua · with vectors
addExplosion(pos, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
explosionType | int | number | integer |
damageScale | float | number | number |
isAudible | BOOL | boolean | boolean |
isInvisible | BOOL | boolean | boolean |
cameraShake | float | number | number |
noDamage | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
BOOL isAudible = If explosion makes a sound.
BOOL isInvisible = If the explosion is invisible or not.Reference
- Namespace
- Fire FIRE
- In the game
void ADD_EXPLOSION(float x, float y, float z, int explosionType, float damageScale, BOOL isAudible, BOOL isInvisible, float cameraShake, BOOL noDamage)- Hash
0xE3AD2BDBAEE269AC