- Documentation
- Shared functions
- killTimer
Function
killTimer
Stops a timer permanently. Its function will not be called any more.
Syntax
bool killTimer(timer timer)Arguments
timertimer- The timer.
Returns
true on success, false if the timer is already gone.
Example
local countdown = 10
local t
t = setTimer(function()
countdown = countdown - 1
outputChatBox("Start za " .. countdown)
if countdown <= 0 then killTimer(t) end
end, 1000, 0)