Gamemode.CallScreenClickHook

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NameCallScreenClickHook
SyntaxGM:CallScreenClickHook( Boolean Click, Integer mousecode, Vector AimVector )
DescriptionCalled when the player clicks on the screen with the mouse
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.CallScreenClickHook]Gamemode.CallScreenClickHook [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints a message to console when clicked on the screen
Used onNewerClient.png
Code
function clickedOnScreen( click, mousecode, vec )
 
	print( "Mouse click down is: " .. click )
	print( mousecode ) -- default 107
	print( vec )
end
hook.Add( "CallScreenClickHook", "ClickedOnTheScreen", clickedOnScreen )
 
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox