Hello, i want to make a script which if car fire it will say when it will boom it's 5-6 secounds so i did that script but it's spamming *x*times i tried smth with cancelEvent() but it's doesn't works can u help me please ;x also idk which event use
addEventHandler( "onClientVehicleCollision", root,
function ()
local playerVehicle = getPedOccupiedVehicle ( localPlayer )
local health = getElementHealth( playerVehicle )/10
if health < 25 then
countdownRec(5)
cancelEvent()
end
end)
function countdownRec(count)
if (count > 0) then
setTimer(countdownRec, 1000, 1, count-1)
outputChatBox(tostring(count))
else
outputChatBox("Go Go Go!!!")
end
end