EXAMPLE. MAKE BULLET EXPLOSION WITH LIGHTNING EFFECT:
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if Citizen.InvokeNative(0x91AEF906BCA88877,0, 0x17BEC168) then -- pressed E
local explosionTag_id = 12 -- EXP_TAG_BULLET, check all tags here: https://github.com/femga/rdr3_discoveries/blob/master/graphics/explosions/README.md
local explosion_vfxTag_hash = 0x7DD07579 -- applies effect exp_lightning_strike
local ped = PlayerPedId()
local ped_coords = GetEntityCoords(ped)
local x,y,z = table.unpack(ped_coords)
local forward_fix = 15
local forwardX=GetEntityForwardX(ped)
local forwardY=GetEntityForwardY(ped)
local explosion_coords_x = x+(forwardX*forward_fix)
local explosion_coords_y = y+(forwardY*forward_fix)
local explosion_coords_z = z
local damageScale = 1.0
local isAudible = true
local isInvisible = false
local cameraShake = true
-- ADD_EXPLOSION_WITH_USER_VFX:
Citizen.InvokeNative(0x53BA259F3A67A99E, explosion_coords_x, explosion_coords_y, explosion_coords_z, explosionTag_id, explosion_vfxTag_hash, damageScale, isAudible, isInvisible, cameraShake)
end
end
end)
----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
explosion_vfxTags = {
explosion_vfxTag_hash, -- what effects are applied
}