SixL client API / browser / GuiChatMp
Interface: GuiChatMp
The built-in chat: mp.gui.chat. The server's player.outputChatBox and mp.players.broadcast lines arrive here.
Remarks
Partial: the page is SixL's own overlay page; a line is always drawn as text, never as HTML, so safeMode = false is accepted but does not enable markup. A line the player types goes to the server: starting with / it is a command (the server's playerCommand, the client's playerCommand event first), any other line is chat (playerChat). At most 5 lines in 3 seconds are sent, longer lines are cut to 256 characters. While the input line is open the game's controls are stopped and mp.players.local.isTypingInTextChat is true.
Example
mp.gui.chat.push('Hello');
Properties
colors
colors: boolean
Whether colour codes (!{#RRGGBB}, !{name}) are drawn as colours. When false the codes show as text.
Remarks
Partial: the value is kept, but the chat page does not read it yet: colour codes are always drawn as colours.
Example
mp.gui.chat.colors = false;
safeMode
safeMode: boolean
RAGE MP's safe mode switch. Default true.
Remarks
SixL never draws a line as HTML; the value is kept and told to the chat page only.
Example
mp.gui.chat.safeMode = true;
Methods
activate()
activate(state):void
Turns the chat on or off. An off chat takes no input (an open input line is closed).
Parameters
state
boolean
true turns the chat on, false off.
Returns
void
Example
mp.gui.chat.activate(false);
push()
push(text):void
Adds a line to the chat, for this player only.
Parameters
text
string
The line, with colour codes. Markup in it is shown as text.
Returns
void
Example
mp.gui.chat.push('!{red}Error: !{white}no access');
show()
show(state):void
Shows or hides the chat.
Parameters
state
boolean
true shows the chat, false hides it.
Returns
void
Example
mp.gui.chat.show(false);