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
- any "func"
- int intervalMs
- any repeat
- any arg1 .. arg4 (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
- Vector
- Colour
- VectorScreen
- GetDistance
- GetTok
- IsIn
- InPoly
- GetTime
- date
- GetVehicleModel
- GetVehicleName
- HashTable
Section: Utility
Categories: Client functions | Utility