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

Function

setTimerPaused

Server and clientTimersIdentical to MTA:SA

Pauses or resumes a timer. The remaining time is kept.

Syntax

bool setTimerPaused(timer timer, bool paused)

Arguments

timertimer
The timer.
pausedbool
true pauses, false resumes.

Returns

true on success.

Example

Pausing a round countdown.

local roundTimer = setTimer(function() outputChatBox("Koniec rundy!") end, 600000, 1)
addCommandHandler("pauza", function(player)
    setTimerPaused(roundTimer, not isTimerPaused(roundTimer))
end)

See also