timer.IsTimer

From GMod Wiki

Jump to: navigation, search
Function
Syntax timer.IsTimer( String Name )
Where is this used?
Description:
Returns true if the given argument is a timer.
Returns: Boolean
Part of Library: Timer
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Timer.IsTimer]Timer.IsTimer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a new timer, and then check to see if it and others exists.
Used onNewerShared.png
Code
timer.Create("ExistantTimer", 1, 1, Msg, "Hello World")
 
timer.IsTimer("ExistantTimer") //returns true
timer.IsTimer("NonExistantTimer") // returns false
 
timer.Destroy("ExistantTimer") //destroy the timer
 
timer.IsTimer("ExistantTimer") //now this call will return false
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox