Sends a chat packet to all online players and logs the message to the server console with formatting codes stripped. See Chat colors for the color constants and color.translate().
| Name | Type | Description |
|---|---|---|
message | string | Message text. Color codes can be used. |
Nothing.
command('shout', { op = true }, function(sender, args)
local prefix = color.translate("&c[Shout] &f")
server.broadcast(prefix .. table.concat(args, " "))
return true
end)