Timer.Toggle

From GMod Wiki

Jump to: navigation, search
Function
Syntax timer.Pause( String Name )
Where is this used?
Description:
Toggle a timer's pause state by Name.
Returns: Boolean
Part of Library: Timer
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Timer.Toggle]Timer.Toggle [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionCreates a timer, toggle it.
Used onNewerShared.png
Code
 
timer.Create("MyTimer", 1, 1, Msg, "Hello World")
 
timer.Toggle("MyTimer") //returns true and timer now paused.
timer.Toggle("Mytimer") //returns true and timer now running again.
 
timer.Pause("MyTimer") // returns true and timer paused.
timer.Toggle("MyTimer") //returns true and timer running again.
 
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox