timer.Pause

From GMod Wiki

Revision as of 15:56, 28 June 2010 by Frugle (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax timer.Pause( String Name )
Where is this used?
Description:
Pause a running timer. The function returns true if it was running before this function was called, false otherwise.
Returns: Boolean
Part of Library: Timer
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Timer.Pause]Timer.Pause [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates a timer, pause and unpause it again.
Used onNewerShared.png
Code
 
timer.Create("MyTimer", 1, 1, Msg, "Hello World")
 
timer.Pause("MyTimer") //returns true and timer now paused.
timer.Pause("MyTimer") //returns false because the timer is already paused.
 
timer.UnPause("Mytimer") //returns true and timer now running again.
timer.UnPause("MyTimer") //returns false because the timer was already running.
 
timer.Pause("NonExistantTimer") //returns false because timer does not exist.
 
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox