Garry's Mod Wiki

Tool:GetMode

  string Tool:GetMode()

Description

Returns the name of the current tool mode.

Returns

1 string
The current tool mode.

Example

The Toolgun weapon has a similar function, checking weapon class is strongly recommended as GetMode() is not available on all weapons.

local wep = Entity( 1 ):GetActiveWeapon() if ( IsValid( wep ) && wep:GetClass() == "gmod_tool" ) then print( wep:GetMode() ) end
Output:
remover