Player::outputChatBox

From RAGE Multiplayer Wiki
Revision as of 14:37, 26 September 2017 by SalwadoR (talk | contribs) (Changed syntax; Added RGB example;)

This functions writes a chat message to player.

Syntax

void player.outputChatBox(string text);

Required Arguments

  • text: Text what should be output in player chat.

Example

This example welcomes player on connect.

mp.events.add(`playerJoin`, 
	player => {
		const red = `#ff0000`;
		player.outputChatBox(`Welcome to the server, ${player.name}!`);
		player.outputChatBox(`!{#dddddd}This is Grey! !{#ffffff}This is White! !{${red}}This is Red! !{255,0,0}This is too Red!`);
	}
);

See Also