Garry's Mod Wiki

Tool:GetClientBool

  number Tool:GetClientBool( string name, boolean default = false )

Just Added

This was just added in the latest version (2023.01.25). It might only be available on the Dev Branch right now.

Description

Attempts to grab a clientside tool ConVar value as a boolean.

Arguments

1 string name
Name of the ConVar to retrieve. The function will automatically add the mytoolfilename_ part to it.
2 boolean default = false
The default value to return in case the lookup fails.

Returns

1 number
The value of the requested ConVar. It will be true if the value if the convar is not 0, just like ConVar:GetBool