Garry's Mod Wiki

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

Page Links


Special Pages


Wikis

?

Render Time: 26ms

Session 0
DB GetPage 4
Generate Html 2
SaveChanges 10
Render Body 0
Render Sidebar 7