Difference between revisions of "Players::broadcast"

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
(Created page with "This function writes a chat message for all players (like Player::outputChatBox). ==Syntax== <syntaxhighlight lang="typescript"> void players.broadcast(string text); </sy...")
 
Line 17: Line 17:
  
 
==See Also==
 
==See Also==
{{PlayerPool_function}}
+
{{PlayerPool_block}}

Revision as of 13:22, 17 April 2017

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

Syntax

void players.broadcast(string 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