Garry's Mod Wiki

GM:StartChat

  boolean GM:StartChat( boolean isTeamChat )

Description

Runs when the user tries to open the chat box.

Returning true won't stop the chatbox from taking VGUI focus.

Issue Tracker: 855

Arguments

1 boolean isTeamChat
Whether the message was sent through team chat.

Returns

1 boolean
Return true to hide the default chat box.

Example

hook.Add( "StartChat", "HasStartedTyping", function( isTeamChat ) if ( isTeamChat ) then print( "Player started typing a message in teamchat." ) else print( "Player started typing a message." ) end end )