Player::enableVoiceTo: Difference between revisions
(Created page with "{{ServerSide}} This function is used to enable voice listening to a certain player. == Syntax == <syntaxhighlight lang="javascript"> player.enableVoiceTo(Player player) </s...") |
No edit summary |
||
| Line 5: | Line 5: | ||
== Syntax == | == Syntax == | ||
< | <pre> | ||
player.enableVoiceTo(Player player) | player.enableVoiceTo(Player player) | ||
</ | </pre> | ||
== Examples == | == Examples == | ||
| Line 13: | Line 13: | ||
This example below shows how all players can hear the player with ID "0". | This example below shows how all players can hear the player with ID "0". | ||
< | <pre> | ||
let player = mp.players.at(0); | let player = mp.players.at(0); | ||
| Line 21: | Line 21: | ||
player.enableVoiceTo(_player); | player.enableVoiceTo(_player); | ||
}); | }); | ||
</ | </pre> | ||
== See Also == | == See Also == | ||
Revision as of 13:36, 28 October 2018
Server-Side
This function is used to enable voice listening to a certain player.
Syntax
player.enableVoiceTo(Player player)
Examples
This example below shows how all players can hear the player with ID "0".
let player = mp.players.at(0);
mp.players.forEach((_player) => {
if(player == _player) return false;
player.enableVoiceTo(_player);
});