RedM Natives

ADD_EXPLOSION_WITH_USER_VFX

Changes explosionFx (Visual Effect) for specified explosionType

Hash0x53BA259F3A67A99E
Runtime nameAddExplosionWithUserVfx
NamespaceFIRE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x36DD3FE58B5E5212

Signature

void ADD_EXPLOSION_WITH_USER_VFX(float x, float y, float z, int explosionType, Hash explosionFx, float damageScale, BOOL isAudible, BOOL isInvisible, float cameraShake);

Parameters

NameTypeDescription
xfloat—
yfloat—
zfloat—
explosionTypeint—
explosionFxHash—
damageScalefloat—
isAudibleBOOL—
isInvisibleBOOL—
cameraShakefloat—

Returns void

Description

alloc8or RDR3 NativeDB

Changes explosionFx (Visual Effect) for specified explosionType
explosionType: see ADD_EXPLOSION
explosionFx: https://github.com/femga/rdr3_discoveries/blob/master/graphics/explosions/explosion_vfxTags.lua

VORPCORE RDR3natives

explosionType: see ADD_EXPLOSION
Change explosionFx (Visual Effect) for specified explosionType

Usage

Lua
AddExplosionWithUserVfx(x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake)

-- always works, by hash
Citizen.InvokeNative(0x53BA259F3A67A99E, x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake)
JavaScript and C#
JavaScript
AddExplosionWithUserVfx(x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake);

// by hash
Citizen.invokeNative('0x53BA259F3A67A99E', x + 0.0000001, y + 0.0000001, z + 0.0000001, explosionType, explosionFx, damageScale + 0.0000001, isAudible, isInvisible, cameraShake + 0.0000001);
C#
Function.Call((Hash)0x53BA259F3A67A99E, x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Enums and flags

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.