OutputChatBox: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 38: | Line 38: | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Chat Functions]] | [[Category:Chat Functions]] | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
Latest revision as of 09:54, 15 August 2026
outputChatBox
Sends a chat message to all players, one player, or a table of player identifiers.
Syntax
bool outputChatBox(string message [, mixed visibleTo = root [, int red = 231 [, int green = 217 [, int blue = 176 [, bool colorCoded = false]]]]])
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
message |
string |
yes | The message to send. |
visibleTo |
int|table | no | Broadcast target: root/nil, one player id, or a table of player ids. |
red |
int |
no | Red color channel from 0 to 255. |
green |
int |
no | Green color channel from 0 to 255. |
blue |
int |
no | Blue color channel from 0 to 255. |
colorCoded |
bool |
no | Whether inline color codes should be interpreted. |
Returns
Returns true when the message is accepted for delivery; otherwise returns false.
Examples
Send a green message to nearby players:
local recipients = getPlayersInRange(playerId, 25, true)
outputChatBox("[Local] " .. message, recipients, 160, 220, 160, false)
Notes
- Available only in server-side resource scripts.