Chat.push: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Replaced HTML with template)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Sends a chat message to the player.
Sends a chat message to the player.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.gui.chat.push(text);</syntaxhighlight>
<pre>mp.gui.chat.push(text);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''text:''' String text
*'''text:''' String text
===Return value===
===Return value===
Unknown
Unknown
==Example==
==Example==
<div class="header" style="background-color: #AE4040; color: #FFFFFF; border: 2px solid #AE4040;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
mp.events.add('playerDeath', (player) => {
mp.events.add('playerDeath', (player) => {
     mp.gui.chat.push("You !{Red}died!");
     mp.gui.chat.push("You !{Red}died!");
});
});
</syntaxhighlight>
</pre>
</div>
}}


==See also==
==See also==
{{Chat_s_function_c}}
{{Gui_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

Latest revision as of 13:32, 26 October 2018

Sends a chat message to the player.

Syntax

mp.gui.chat.push(text);

Required Arguments

  • text: String text

Return value

Unknown

Example

Client-Side
mp.events.add('playerDeath', (player) => {
    mp.gui.chat.push("You !{Red}died!");
});

See also