Player::outputChatBox: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 2: Line 2:
== Syntax ==
== Syntax ==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
player.outputChatBox(String reason);
player.outputChatBox(reason);
</syntaxhighlight>
</syntaxhighlight>
== Arguments ==
<div>
*reason - string
</div>
== Example ==
== Example ==
This example welcomes player on connect.
This example welcomes player on connect.

Revision as of 23:21, 3 May 2017

This functions writes a chat message to player.

Syntax

player.outputChatBox(reason);

Arguments

  • reason - string

Example

This example welcomes player on connect.

mp.events.add('playerJoin', player => {
  player.outputChatBox('Welcome to the server, ' + player.name + '!');
});

See Also