GM/StartChat

From Garry's Mod
Jump to: navigation, search
 GM:StartChat( )

Contents

Description

Runs when the user tries to open the chat box.

BUG

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

Issue Tracker: #855

Arguments

boolean isTeamChat

Whether the message was sent through team chat.

Returns

boolean

Return true to hide the default chat box.

Examples

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 )


Personal tools
Navigation