Delay
From Onset Developer Wiki
Description
Create a delayed function just like a timer but only once. (DelayFor)
Syntax
Delay(Milliseconds, LuaFunction [, UserArgs])
Parameters
- Milliseconds
The interval in milliseconds. - LuaFunction
The Lua function to delay. - UserArgs (optional) (optional)
The user arguments.
Return Value
- Returns the id of this delay, same as for timers.
Example
AddEvent("OnPlayerSpawn", function(player)
SetPlayerOutline(player, true)
Delay(10000, function(player)
SetPlayerOutline(player, false)
end, player)
end)