Garry's Mod Wiki

CUserCmd:GetMouseWheel

  number CUserCmd:GetMouseWheel()

Description

Returns the scroll delta as whole number.

Returns

1 number
Scroll delta

Example

hook.Add( "StartCommand", "StartCommandExample", function( ply, cmd ) if ( cmd:GetMouseWheel() != 0 ) then print( ply, " scrolled ", cmd:GetMouseWheel()) end end )