Players::broadcastInDimension

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

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

Syntax

void players.broadcastInRange(number dimension, string text);

Required Arguments

  • dimension: The dimension in which the broadcast will be sent.
  • text: The text to be sent.

Example

This example sends message to all players in his dimension

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

});

See Also