Garry's Mod Wiki

Player:PrintMessage

  Player:PrintMessage( number type, string message )

Description

Displays a message either in their chat, console, or center of the screen. See also PrintMessage.

When called serverside, this uses the archaic user message system (the umsg) and hence is limited to ≈250 characters.

HUD_PRINTCENTER will not work when this is called clientside.

Arguments

1 number type
Which type of message should be sent to the player (HUD enum).
2 string message
Message to be sent to the player.

Example

Prints into the first players chat: I'm new here..

Entity( 1 ):PrintMessage( HUD_PRINTTALK, "I'm new here." )
Output: I'm new here.