Skip to content

GetServerTick

The number of the simulation tick being processed.

Counts up from the server’s start, one per tick (30 a second). Handy as a cheap clock for “every n ticks” logic; for time in milliseconds use GetServerTime.

GetServerTick()

number - the tick

function OnTick(dt)
if GetServerTick() % 300 == 0 then Log(GetPlayerCount() .. " players online") end -- every 10 s
end

GetServerTime · OnTick · the Server and timers group of the index