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

Function

getTimers

Server and clientTimersIdentical to MTA:SA

Returns the active timers of the calling resource. With an argument, only those whose interval does not exceed the given number of ms.

Syntax

table getTimers([int maxInterval = nil])

Arguments

maxIntervalint, optional = nil
The largest interval in ms.

Returns

A table of timers.

Example

addCommandHandler("timery", function(player)
    outputChatBox("Aktywnych timerów: " .. #getTimers(), player)
end)