Delay: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
28days (talk | contribs)
No edit summary
Line 1: Line 1:
{{Info|Function|Server & Client|1.0}}
{{Info|Function|Server & Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Delay}}


{{FuncSyntax|Delay(Milliseconds, LuaFunction [, UserArgs])}}
{{FuncSyntax|Delay(Milliseconds, LuaFunction [, UserArgs])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|Milliseconds|__EDIT_ME__}}
{{FuncParam|Milliseconds|The interval in milliseconds.}}
{{FuncParam|LuaFunction|__EDIT_ME__}}
{{FuncParam|LuaFunction|The lua function name}}
{{FuncParamOptional|UserArgs|__EDIT_ME__}}
{{FuncParamOptional|UserArgs (optional)|The user arguments}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|__EDIT_ME__}}

Revision as of 15:36, 16 November 2019

Delay

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Delay

Syntax

Delay(Milliseconds, LuaFunction [, UserArgs])

Parameters

  • Milliseconds
    The interval in milliseconds.
  • LuaFunction
    The lua function name
  • UserArgs (optional) (optional)
    The user arguments

Return Value

  • __EDIT_ME__

Example

AddEvent("OnPlayerSpawn", function(player)
	SetPlayerOutline(player, true)
	Delay(10000, function(player)
		SetPlayerOutline(player, false)
	end)
end)

See also

__EDIT_ME__