getTimers | Multi Theft Auto: Wiki Skip to content

getTimers

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 returns a table of all active timers that the resource that calls it has created. Alternatively, only the timers with a remaining time less than or equal to a certain value can be retrieved.

Syntax

getTimers ( )

Code Examples

server

This example kills timers with a remaining time of less than 1 minute.

-- Find and kill all the timers with less than 1 minute to go
timers = getTimers ( 60000 )
-- Loop through the timer list
for timerKey, timerValue in ipairs(timers) do
-- kill the timer
killTimer ( timerValue )
end