Garry's Mod Wiki
Description
Called when a player dispatched a chat message. For the clientside equivalent, see GM:OnPlayerChat.
It may be more reliable to use gameevent/player_say to read messages serverside because addons commonly return values in this hook to change chat messages.
Arguments
3 boolean teamChat
Return false when the message is for everyone, true when the message is for the sender's team.
Returns
Example
Adds a coin flip command to the chat. Player should type /flip
(case-insensitive).
Output: Player1 flipped the coin and got heads
Example
Adds a symbol counter command to the chat. Player should type /len *text*
(case-insensitive).
Output: Your message has 5 symbol(s). [When someone typed: "/len Hello"]
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated twice a day. Edits and history are not available.
Last Parsed: Loading...