input.IsMouseDown

From GMod Wiki

Jump to: navigation, search
Function
Syntax input.IsMouseDown( MouseCode mc )
Where is this used?
Description:
Returns a bool if the mouse button is down.
Returns: Boolean
Part of Library: input
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Input.IsMouseDown]Input.IsMouseDown [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionAdd a basic example
Used onNewerClient.png
Code
print("Is left mouse button pressed? " .. tostring(input.IsMouseDown(MOUSE_LEFT)))
OutputIs left mouse button pressed? false
It will return true if you will hold your left mouse button when the function executes.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox