chat.AddText

From GMod Wiki

Jump to: navigation, search
Function
Syntax chat.AddText( Color color OR String text OR Number OR Player player, ... )
Where is this used?
Description:
Adds text to the chat window with support for color.
Returns: nil
Part of Library: chat
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Chat.AddText]Chat.AddText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPuts a piece of colored text in chat.
Used onNewerClient.png
Code
 
chat.AddText(
    "Hello, ",
    Color(255,255,255), "this", " is ",
    Color(255,0,0), "red, ",
    Color(0,255,0), "green, ",
    Color(0,0,255), "blue")
chat.PlaySound()
 
Output"Hello, this is red, green, blue" in chat in default, white, red, green and blue colors.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox