setInterval

From GTA Connected
Jump to navigation Jump to search

Function Server and Client All Games Online and Offline

Server 1.0.0, Client 1.0.0

Timer setInterval(function callback, int durationMilliseconds, [ ... ])

Description

The setInterval function is used to add a timer with a callback function that is invoked each time the specified duration has passed.

Parameters

Type Name Presence Default Value Description
int
durationMilliseconds
required n/a The interval, in milliseconds, to call the scripting function.
function
callback
required n/a The scripting function to call when each interval has occurred.
vararg
...
optional
n/a
The arguments to send to the callback function.

Returns

Success Returns

Type Description
Timer
A handle to the timer.

Failure Returns

Type Value
null
n/a

Callbacks

function callback([...])
Type Name Description
...
vararg
The arguments that were sent to the setInterval function.


Notes

There aren't any notes for this function.

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.

Related

Server Related

clearImmediate
clearInterval
clearTimeout
setImmediate
setInterval
setTimeout


Client Related

clearImmediate
clearInterval
clearTimeout
setImmediate
setInterval
setTimeout