Garry's Mod Wiki

Garry's Mod Wiki


Called when the player say a message.

This is called after GM:PlayerSay so you could just use that hook serverside.


number priority
Event priority number used by HLTV.
number userid
The UserID of the Player. For Console the UserID is 0.
string text
The text that was said.
number teamonly
1 If it's only for the team, else 0.



This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "player_say" ) hook.Add( "player_say", "player_say_example", function( data ) local priority = SERVER and data.Priority or 1 // Priority ?? local id = data.userid // Same as Player:UserID() for the speaker local text = data.text // The written text. // Called when a player writes text ( Called by the SERVER on the client AFTER the PlayerSay hook ) end )

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...