timer.Stop

From GMod Wiki

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


Examples

DescriptionCreates a timer, stops then restarts it again.
Used onNewerShared.png
Code
 
timer.Create("MyTimer", 1, 1, Msg, "Hello World")
 
timer.Stop("MyTimer") //returns true and timer is now stopped
timer.Stop("MyTimer") //returns false because timer is already stopped
 
timer.Start("MyTimer") //returns true and timer is restarted.
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox