isTimerPaused | Multi Theft Auto: Wiki Skip to content

isTimerPaused

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function allows you to check whether a timer is paused.

Syntax

isTimerPaused ( )

Code Examples

server

This example pauses all currently running timers and resumes all currently paused timers from this resource.

-- Get a table of all current timers from this resource
local timers = getTimers ( )
-- Loop through the table of timers
for timerIndex, timerValue in ipairs( timers ) do
-- check if each timer is currently paused
local isPaused = isTimerPaused( timerValue )
-- pause or resume each timer based on its current state
setTimerPaused ( timerValue, not isPaused )
end