M MY Multiplayer: Wiki
Side
Kind

killTimer

Shared

Cancels a timer before it ends.

bool killTimer(timer timer)

Parameters

NameTypeDescription
timertimerThe timer, the number setTimer returned.

Returns

true if the timer was cancelled, false if it does not exist in this resource.

Example

local reminder = setTimer(function()
    outputDebugString("still here")
end, 60000, 0)

addCommandHandler("quiet", function()
    if isTimer(reminder) then
        killTimer(reminder)
    end
end)

See also