setTimeout

From GTA Connected
Revision as of 20:01, 8 May 2020 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Server 1.0.0, Client 1.0.0

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

The setTimeout function is used to add a timer with a callback function that is invoked once after the specified duration has passed.

Parameters

1) int durationMilliseconds The duration, in milliseconds, before the scripting function is called.
2) function callback The scripting function to call when the interval has occurred.
3) vararg ... Optional, defaults to n/a. The arguments to send to the callback function.

Return

Timer A handle to the timer.

Callbacks

function callback([...])

1) ... vararg The arguments that were sent to the setTimeout 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

icon-iii.png icon-vc.png icon-sa.png icon-iv.png clearImmediate
icon-iii.png icon-vc.png icon-sa.png icon-iv.png clearInterval
icon-iii.png icon-vc.png icon-sa.png icon-iv.png clearTimeout
icon-iii.png icon-vc.png icon-sa.png icon-iv.png setImmediate
icon-iii.png icon-vc.png icon-sa.png icon-iv.png setInterval
icon-iii.png icon-vc.png icon-sa.png icon-iv.png setTimeout


Client Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png clearImmediate
icon-iii.png icon-vc.png icon-sa.png icon-iv.png clearInterval
icon-iii.png icon-vc.png icon-sa.png icon-iv.png clearTimeout
icon-iii.png icon-vc.png icon-sa.png icon-iv.png setImmediate
icon-iii.png icon-vc.png icon-sa.png icon-iv.png setInterval
icon-iii.png icon-vc.png icon-sa.png icon-iv.png setTimeout