Garry's Mod Wiki

Player:ChatPrint

  Player:ChatPrint( string message )

Description

Prints a string to the chatbox of the client.

Just like the usermessage, this function is affected by the 255 byte limit!

Arguments

1 string message
String to be printed

Example

Prints "Hello World" to chat of all players

for i, ply in ipairs( player.GetAll() ) do ply:ChatPrint( "Hello World" ) end
Output: Hello World (In chatbox)