local isCountdownActive = false -- Detonarea porneste DOAR cand serverul trimite event-ul (de la item use) RegisterNetEvent('kaboom:startDetonation', function() if isCountdownActive then return end isCountdownActive = true -- Trimite mesaj catre NUI sa porneasca numaratoarea SetNuiFocus(false, false) SendNUIMessage({ action = 'startCountdown', seconds = 10 }) -- Numaratoare de la 10 la 0 for i = 10, 1, -1 do Citizen.Wait(1000) -- Camera shake la ultimele 3 secunde if i <= 3 then ShakeGameplayCam('MEDIUM_EXPLOSION_SHAKE', 0.3) end end -- Explozie la pozitia jucatorului local ped = PlayerPedId() local coords = GetEntityCoords(ped) -- Camera shake intensa ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 1.0) -- Creeaza explozie mare AddExplosion(coords.x, coords.y, coords.z, 2, 100.0, true, false, 1.0) -- Omoara jucatorul SetEntityHealth(ped, 0) Citizen.Wait(1500) isCountdownActive = false end)