Scripting/Server/Functions/NewTimer
See "Timers" in chapter 2.
Syntax
NewTimer("func", intervalMs, repeat [, arg1 ... arg8])Arguments
- any "func"
- int intervalMs
- any repeat
- any arg1 ... arg8 (optional)
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!" );
}Related pages
Section: Constructors for helper objects
Categories: Server functions | Constructors for helper objects