Garry's Mod Wiki

GM:InputMouseApply

Description

Allows you to modify the supplied User Command with mouse input. This could be used to make moving the mouse do funky things to view angles.

Arguments

1 CUserCmd cmd
User command
2 number x
The amount of mouse movement across the X axis this frame
3 number y
The amount of mouse movement across the Y axis this frame
4 Angle ang
The current view angle

Returns

1 boolean
Return true if we modified something

Example

Prevents all players from turning with the mouse.

hook.Add("InputMouseApply", "FreezeTurning", function( cmd ) cmd:SetMouseX(0) cmd:SetMouseY(0) return true end)

Page Links


Special Pages


Wikis

?

Render Time: 41ms

Session 0
DB GetPage 3
Generate Html 16
SaveChanges 8
Render Body 0
Render Sidebar 11