Player::notify

From RAGE Multiplayer Wiki
Revision as of 12:38, 29 September 2018 by MrPancakers (talk | contribs) (Cleaned up page, added example.)

This function sends a notification to the player.

Codes:

  • ~n~ New line
  • ~r~ Red
  • ~g~ Green
  • ~b~ Blue
  • ~w~ or ~s~ White
  • ~y~ Yellow
  • ~p~ Purple
  • ~l~ Black (lower case L)

Syntax

player.notify(message)

Parameters

  • message - String

Example

Creates a command to let the player enter a message which will then come up as a notification.

Server-Side
mp.events.addCommand('notify', (player, message) => {
	if(!message) return player.outputChatBox("You need to enter a message.");
	player.notify(message);
});

See Also