ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. killTimer

Function

killTimer

Server and clientTimersIdentical to MTA:SA

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)