forked from Simnation/Main
fix
This commit is contained in:
parent
2926121d43
commit
f863e8437b
2 changed files with 21 additions and 4 deletions
|
@ -71,12 +71,19 @@ local function startFirework(asset, coords)
|
|||
Wait(1000)
|
||||
fireworkTime -= 1
|
||||
end
|
||||
UseParticleFxAssetNextCall('scr_indep_fireworks')
|
||||
for _ = 1, math.random(5, 10), 1 do
|
||||
|
||||
-- Debug-Nachricht hinzugefügt
|
||||
print("Countdown beendet, starte Feuerwerk mit Asset: " .. asset)
|
||||
|
||||
for i = 1, math.random(5, 10), 1 do
|
||||
local firework = fireworkList[asset][math.random(1, #fireworkList[asset])]
|
||||
|
||||
-- Debug-Nachricht hinzugefügt
|
||||
print("Starte Feuerwerk-Effekt: " .. firework)
|
||||
|
||||
UseParticleFxAssetNextCall(asset)
|
||||
StartNetworkedParticleFxNonLoopedAtCoord(firework, fireworkLoc.x, fireworkLoc.y, fireworkLoc.z + 42.5, 0.0, 0.0, 0.0, math.random() * 0.3 + 0.5, false, false, false)
|
||||
Wait(math.random() * 500)
|
||||
Wait(math.random(100, 500)) -- Feste Werte für bessere Konsistenz
|
||||
end
|
||||
fireworkLoc = nil
|
||||
end)
|
||||
|
@ -99,9 +106,15 @@ CreateThread(function()
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Debug-Nachricht hinzugefügt
|
||||
print("Alle Feuerwerk-Assets geladen")
|
||||
end)
|
||||
|
||||
RegisterNetEvent('fireworks:client:UseFirework', function(itemName, assetName)
|
||||
-- Debug-Nachricht hinzugefügt
|
||||
print("Feuerwerk-Event ausgelöst mit Item: " .. itemName .. " und Asset: " .. assetName)
|
||||
|
||||
QBCore.Functions.Progressbar('spawn_object', Lang:t('firework.place_progress'), 3000, false, true, {
|
||||
disableMovement = true,
|
||||
disableCarMovement = true,
|
||||
|
@ -116,6 +129,10 @@ RegisterNetEvent('fireworks:client:UseFirework', function(itemName, assetName)
|
|||
TriggerServerEvent('consumables:server:UseFirework', itemName)
|
||||
TriggerEvent('qb-inventory:client:ItemBox', QBCore.Shared.Items[itemName], 'remove')
|
||||
local pos = GetEntityCoords(PlayerPedId())
|
||||
|
||||
-- Debug-Nachricht hinzugefügt
|
||||
print("Starte Feuerwerk an Position: " .. pos.x .. ", " .. pos.y .. ", " .. pos.z)
|
||||
|
||||
startFirework(assetName, pos)
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), 'anim@narcotics@trash', 'drop_front', 1.0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue