Garry's Mod Wiki

GM:OnChatTab

  string GM:OnChatTab( string text )

Description

Called when the local player presses TAB while having their chatbox opened.

This function now uses player.Iterator. This means it can't run all the time, as an error in the GM:OnEntityCreated or GM:EntityRemoved hooks is likely to interrupt it. Make sure that no addon causes an error in these hooks.

Arguments

1 string text
The currently typed into chatbox text

Returns

1 string
What should be placed into the chatbox instead of what currently is when player presses tab