Garry's Mod Wiki

Garry's Mod Wiki

  MsgC( ... )

Description

Just like Msg, except it can also print colored text, just like chat.AddText.

Arguments

1 vararg args
Values to print. If you put in a color, all text after that color will be printed in that color.

Example

Prints Hello World! in red to the console.

MsgC( Color( 255, 0, 0 ), "Hello World!" )
Output:

Example

Displays the built-in colors for the three realms (client, server and menu).

MsgC( Color( 156, 241, 255, 200 ), "Server message color\n" ) MsgC( Color( 136, 221, 255, 255 ), "Server error color\n" ) MsgC( Color( 255, 241, 122, 200 ), "Client message color\n" ) MsgC( Color( 255, 221, 102, 255 ), "Client error color\n" ) MsgC( Color( 100, 220, 100, 200 ), "Menu message color\n" ) MsgC( Color( 120, 220, 100, 255 ), "Menu error color\n" )
Output:
image.png

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