Garry's Mod Wiki

Revision Difference

Player:PrintMessage#512473

<function name="PrintMessage" parent="Player" type="classfunc">⤶ <description>⤶ Displays a message either in their chat, console, or center of the screen. See also <page>Global.PrintMessage</page>.⤶ ⤶ <note>When called serverside, this uses the archaic user message system (the <page>umsg</page>) and hence is limited to &amp;asymp;250 characters.</note>⤶ ⤶ <note>`HUD_PRINTCENTER` will not work when this is called clientside.</note>⤶ </description>⤶ <realm>Shared</realm>⤶ <args>⤶ <arg name="type" type="number">Which type of message should be sent to the player (&lt;page&gt;HUD&lt;/page&gt;)</arg>⤶ <arg name="message" type="string">Message to be sent to the player</arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>Prints into the first players chat: "I'm new here."</description>⤶ <code>Entity(1):PrintMessage(HUD_PRINTTALK, "I'm new here.")</code>⤶ <output>I'm new here.</output>⤶ ⤶ </example>