Players::broadcastInDimension
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
- Functions
- Players::broadcast
- Players::broadcastInDimension
- Players::broadcastInRange
- Players::call
- Players::callInDimension
- Players::callInRange
- Players::callUnreliable
- Players::callUnreliableInDimension
- Players::callUnreliableInRange
- Pool::apply
- Pool::at
- Pool::exists
- Pool::forEach
- Pool::forEachInDimension
- Pool::forEachInRange
- Pool::toArray
- Properties