Player::outputChatBox

From RAGE Multiplayer Wiki
Revision as of 10:04, 26 September 2017 by Xylum (talk | contribs) (Added colour example to chat)

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 + '!');
  // Example of colours in chat:
  player.outputChatBox(`!{#dddddd}This is Grey! !{#ffffff}This is White!`);
});

See Also