CUserCmd.SetViewAngles

From GMod Wiki

Jump to: navigation, search
Function
Syntax CUserCmd:SetViewAngles( angle angle )
Description:
Sets the view angles in the user command to the specified angle.
Returns: nil
In Object: CUserCmd
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CUserCmd.SetViewAngles]CUserCmd.SetViewAngles [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