Graphics::notify: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Replaced HTML with template)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This function sends notification message for player.
__NOTOC__
This function sends a notification message to the player.


[[Fonts_and_Colors|Fonts and colors]]
You can also use the colour codes seen here: [[Fonts_and_Colors|Fonts and colors]]
 
In actual build (24.12.2017) param message need to be at least 16 characters long [https://bt.rage.mp/mp/suggestions/issues/62 #62] (thanks to Meta).


== Syntax ==
== Syntax ==
<syntaxhighlight lang="javascript">
<pre>
mp.game.graphics.notify(String message)
mp.game.graphics.notify(message)
</syntaxhighlight>
</pre>


==Example #1==  
=== Parameters ===
This example will output notification with specified message.
*'''message:''' {{RageType|String}}


<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
== Example ==  
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
This example will send a notification 'Hello World' to the player with the word 'Hello' in green.
<syntaxhighlight lang="javascript" highlight="3-7">
mp.game.graphics.notify('~w~Hello World~w~');
</syntaxhighlight>
</div>


==Formatting==
{{ClientsideCode|
{{:Fonts_and_Colors}}
<pre>
mp.game.graphics.notify('~g~Hello ~w~World');
</pre>
}}


==See Also==
== See More ==
{{Player_block}}
{{Graphics_functions_c}}

Latest revision as of 13:34, 26 October 2018

This function sends a notification message to the player.

You can also use the colour codes seen here: Fonts and colors

Syntax

mp.game.graphics.notify(message)

Parameters

  • message: String

Example

This example will send a notification 'Hello World' to the player with the word 'Hello' in green.

Client-Side
mp.game.graphics.notify('~g~Hello ~w~World');

See More