Graphics::notify: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Replaced HTML with template)
 
(14 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] (thanks to Meta).
== Syntax ==
<pre>
mp.game.graphics.notify(message)
</pre>


== Syntax ==
=== Parameters ===
<syntaxhighlight lang="javascript">
*'''message:''' {{RageType|String}}
mp.game.graphics.notify(String message)
</syntaxhighlight>


==Example #1==  
== Example ==  
This example will output notification with specified message.
This example will send a notification 'Hello World' to the player with the word 'Hello' in green.


<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript" highlight="3-7">
mp.game.graphics.notify('~g~Hello ~w~World');
mp.game.graphics.notify('~w~Hello World~w~');
</pre>
</syntaxhighlight>
}}
</div>


==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