Gamemode.ChatText
From GMod Wiki
Event Hook | |
Hook Name | ChatText |
Syntax | GM:ChatText( Integer playerindex, String playername, String text, String messagetype ) |
Description | Called when a message is printed to the chat box. |
Returns | Nil |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.ChatText]Gamemode.ChatText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- This hook doesn't get called when a player talks anymore, but instead you can use Gamemode.OnPlayerChat. However, this does get called on other than player messages.
- MessageType can be; "none" for notify messages, or "joinleave" for Messages when a Player Joins/Leaves.
- User Chat is now handled by Gamemode.OnPlayerChat
- Return true to suppress the default messages.