Scripting/Client/Functions/NewTimer

As on the server (0 = forever). The timer handle has Start(), Stop(), Delete(). If the function no longer exists the timer is deleted silently.

Syntax

NewTimer("func", intervalMs, repeat [, arg1 .. arg4])

Arguments

Returns

Timer

Example

function onScriptLoad()
{
	// call announce() every 60 seconds, forever (repeat 0)
	NewTimer( "announce", 60000, 0 );
}

function announce()
{
	Message( "Visit our website for more information!" );
}

Section: Utility

Categories: Client functions | Utility