Players::broadcast

From RAGE Multiplayer Wiki
Revision as of 09:55, 1 December 2019 by Unknown (talk | contribs) (→‎Syntax)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function writes a chat message for all players (like Player::outputChatBox).

Syntax

mp.players.broadcast(text);

Required Arguments

  • text: The text to be sent

Example

This example sends player message to all

mp.events.addCommand("say", (player, message) => {
	mp.players.broadcast(`Message from ${player.name}: ${message}`);

});

See Also