outputChatBox
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This outputs the specified text string to the chatbox. It can be specified as a message to certain player(s) or all players.
Note
Avoid outputting text to the chatbox that isn't actually chat, as this can be annoying for players. Output information and status messages to the HUD.
OOP Syntax Help! I don't understand this!
- Method: player:outputChat(...)
Syntax
bool outputChatBox ( string text, [ int r = 231, int g = 217, int b = 176, bool colorCoded = false ] )Required Arguments
- text: MISSING_PARAM_DESC
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- r (default: 231): MISSING_PARAM_DESC
- g (default: 217): MISSING_PARAM_DESC
- b (default: 176): MISSING_PARAM_DESC
- colorCoded (default: false): MISSING_PARAM_DESC
Returns
- bool: value
Returns true if the message was displayed successfully. Returns false if invalid arguments are specified.
Code Examples
server
Example 1:This example displays a chat message to all users.
x = 5y = 10-- Displays the messageoutputChatBox ( "I have " .. x .. " apples and " .. y .. " oranges." )