reskate.chat.send, which needs chat.send), show a line only this player sees (reskate.chat.notice, which needs chat.local), and hear every chat line (the chat event, which needs chat.read). See permissions.
Chat is the multiplayer session’s: outside a session there is none.
reskate.chat.send(text)
Sends a chat line to everyone in the session, as the local player, as if they had typed it.
string
required
1 to 200 characters. It cannot start with
/: a plugin cannot run chat commands.boolean
true when it was sent.string
Why not, when
ok is false: “one line every 3 s”, “not in a session”, or the session’s own answer when it refused the line.Needs
chat.send. One line every 3 seconds; sooner, it returns false and why. Raises an error for empty text, text over 200 characters, and text that starts with /.reskate.chat.notice(text, colour)
Adds a line to this player’s chat only, under your plugin’s folder name with a “Plugin” tag. Nobody else sees it, and no plugin hears it as a chat event, yours included.
string
required
1 to 200 characters, on one line: no line breaks or other control characters.
number
default:"the usual chat colour"
The text’s colour, a number
0xRRGGBBAA. 0 is the usual colour.boolean
true when it was shown.string
Why not, when
ok is false: “more than 5 lines in a second”, or “not in a session”.Needs
chat.local. At most 5 lines a second; past them it returns false and why. Raises an error for empty text, text over 200 characters or on more than one line, and a colour that is not a whole number from 0 to 0xFFFFFFFF.The chat event
chat.read.
table
sender(string): the sender’s id (SteamID64), as a string."0"for a notice from ReSkate itself.name(string): the name the line is shown under.text(string): what was said.local(boolean):truewhen the local player sent it.server(boolean):truewhen a dedicated server said it itself: its console, its welcome, its answers.
local is a Luau keyword: read it as line["local"].
The lines are the ones this player sees, so a player they filter out is not heard. Lines said before the first plugin with chat.read started listening are not delivered, and at most 20 lines are delivered in one tick (the newest, when more came at once). Lines plugins add with notice (the ones tagged “Plugin”) are never delivered, to your plugin or any other, so a plugin that answers chat with a notice cannot set off a loop.
Needs
chat.read.