KillTimer
From Multi Theft Auto: Wiki
This function allows you to kill/halt existing timers.
Syntax
bool killTimer ( timer theTimer )
OOP Syntax Help! I don't understand this!
- Method: timer:destroy(...)
Required Arguments
- theTimer: The timer you wish to halt.
Returns
Returns true if the timer was successfully killed, false if no such timer existed.
Example
This example kills all 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
This example checks if the time then kill the timer.
-- set timer output text in chat box local Timer = setTimer ( function ( ) outputChatBox ( 'Hello World !' ) end, 60000, 0 ) -- Check the timer then kill the timer if isTimer ( Timer ) then killTimer ( Timer ) end
See Also
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace
- debugSleep
- decodeString
- encodeString
- fromJSON
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getServerConfigSetting
- getTickCount
- getTimerDetails
- getTimers
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setServerConfigSetting
- setTimer
- sha256
- split
- teaDecode
- teaEncode