Player::voiceListeners

From RAGE Multiplayer Wiki
Revision as of 12:56, 26 October 2018 by Splak (talk | contribs) (Created page with "This function is used to return all active voice listeners, which got added by player.enableVoiceTo(target). ==Syntax== <pre> player.voiceListeners.forEach(Function callingFu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function is used to return all active voice listeners, which got added by player.enableVoiceTo(target).

Syntax

player.voiceListeners.forEach(Function callingFunction)

Required Arguments

  • callingFunction: Function, what will be called.

Example #1

This example will remove all active listeners from the player list.

Server-Side
if(!player.voiceListeners.length) return false;

player.voiceListeners.forEach((listener) => {
	player.disableVoiceTo(listener);
});

See Also