forked from Simnation/Main
Update fireworks.lua
This commit is contained in:
parent
8bbeaa9bd0
commit
2819ded0c7
1 changed files with 24 additions and 0 deletions
|
@ -189,3 +189,27 @@ RegisterNetEvent('fireworks:client:UseFirework', function(itemName, assetName)
|
|||
QBCore.Functions.Notify(Lang:t('firework.canceled'), 'error')
|
||||
end)
|
||||
end)
|
||||
RegisterCommand('testeffect', function()
|
||||
local playerPed = PlayerPedId()
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
|
||||
-- Einfacher, garantiert funktionierender Effekt
|
||||
RequestNamedPtfxAsset("core")
|
||||
while not HasNamedPtfxAssetLoaded("core") do
|
||||
Wait(10)
|
||||
end
|
||||
|
||||
UseParticleFxAssetNextCall("core")
|
||||
local effect = StartParticleFxLoopedAtCoord("ent_sht_flame",
|
||||
coords.x, coords.y, coords.z + 0.5,
|
||||
0.0, 0.0, 0.0,
|
||||
2.0, -- scale
|
||||
false, false, false, false)
|
||||
|
||||
print("Test-Effekt gestartet: " .. tostring(effect))
|
||||
|
||||
-- Effekt nach 5 Sekunden stoppen
|
||||
Citizen.SetTimeout(5000, function()
|
||||
StopParticleFxLooped(effect, 0)
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue