Graphics::notify: Difference between revisions

From RAGE Multiplayer Wiki
(Cleaned up page)
Line 1: Line 1:
__FORCETOC__
__NOTOC__
This function sends notification message for player.
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 RageMP 0.3.2 RC-1 due to a bug, message parameter needs to be at least 16 characters long.'''


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


=== Required Arguments ===
=== Parameters ===
*'''message:''' String: message to show
*'''message:''' {{RageType|String}}
===Return value===
Unknown


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

Revision as of 12:49, 29 September 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