Garry's Mod Wiki

Revision Difference

GM:StartChat#552871

<function name="StartChat" parent="GM" type="hook"> <ishook>yes</ishook>⤶ <description> Runs when the user tries to open the chat box. <bug issue="855">Returning true won't stop the chatbox from taking VGUI focus.</bug> </description> <realm>Client</realm> <predicted>No</predicted>⤶ <args> <arg name="isTeamChat" type="boolean">Whether the message was sent through team chat.</arg> </args> <rets> <ret name="" type="boolean">Return true to hide the default chat box.</ret> </rets> </function> <example> <code> 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 ) </code> </example>