setImmediate: Difference between revisions

no edit summary
No edit summary
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
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 ... = (no arguments)] 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
|notes = GTA Connected guarantees that the function will run in the next frame where possible, remember that frame rates will affect how soon that is.
|returnInfo = a handle to the timer
|returnFail1 = null n/a
}}
}}
6,833

edits