Gamemode.InputMouseApply

From GMod Wiki

Revision as of 00:32, 5 April 2010 by CowThing (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameInputMouseApply
SyntaxGM:InputMouseApply( CUserCmd cmd, number x, number y, angle angle )
DescriptionAllows you to control how moving the mouse affects the view angles.
ReturnsNil
Lua StateNewerClient.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.InputMouseApply]Gamemode.InputMouseApply [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionMakes your view spin.
Used onNewerClient.png
Code
hook.Add("InputMouseApply", "Spinny", function(cmd, x, y, angle)
 
	angle.roll = angle.roll + 1	
	cmd:SetViewAngles( angle )
	return true
 
end)
OutputYou will continue to spin.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox