setImmediate: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = setImmediate
|side = shared
|type = function
|type = function
|name = setImmediate
|games = iii vc sa iv
|usage = add a timer with a callback function that is invoked on the next tick
|desc = add a timer with a callback function that is invoked on the next tick
|parameters = function callback, [ ... ]
|arg1 = function callback The scripting function to call on the next tick.
|parameter1 = function callback The scripting function to call on the next tick.
|arg2 = [vararg ... = n/a] The arguments to send to the callback function.
|parameter2 = vararg ... optional n/a The arguments to send to the callback function.
|return = Timer a handle to the timer
|callback1Syntax = [...]
|freturn = null n/a
|callback1Parameter1 = ... vararg The arguments that were sent to the <code>setImmediate</code> function.
|cb1arg1 = ... vararg The arguments that were sent to the <code>setImmediate</code> function.
|returnTypes = Timer
|returnInfo = a handle to the timer
|returnFail1 = null n/a
}}
}}

Revision as of 20:37, 19 November 2022

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 setImmediate(function callback, [ vararg ... = n/a ])

The setImmediate function is used to add a timer with a callback function that is invoked on the next tick.

Parameters

1) function callback The scripting function to call on the next tick.
2) vararg ... Optional, defaults to n/a. The arguments to send to the callback function.

Return

Timer A handle to the timer.

Callbacks

function callback(... vararg)

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