Chat.show: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "==Syntax== <syntaxhighlight lang="javascript">mp.gui.chat.show(toggle);</syntaxhighlight> === Required Arguments === *'''toggle:''' Bool toggle ===Return value=== Unknown ==Ex...")
 
m (Replaced HTML with template)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Toggles the chat visibility.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.gui.chat.show(toggle);</syntaxhighlight>
<pre>mp.gui.chat.show(toggle);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''toggle:''' Bool toggle
*'''toggle:''' Bool toggle
===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) => {
     //Hide chat when player dies
     //Hide chat when player dies
     mp.gui.chat.show(false);
     mp.gui.chat.show(false);
});
});
</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

Toggles the chat visibility.

Syntax

mp.gui.chat.show(toggle);

Required Arguments

  • toggle: Bool toggle

Return value

Unknown

Example

Client-Side
mp.events.add('playerDeath', (player) => {
    //Hide chat when player dies
    mp.gui.chat.show(false);
});

See also