ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setPlayerVoiceBroadcastTo

Function

setPlayerVoiceBroadcastTo

ServerPlayersIdentical to MTA:SA

Sets who hears the player's voice: one element, a list of elements, or nil (everyone).

Syntax

bool setPlayerVoiceBroadcastTo(player thePlayer, mixed broadcastTo)

Arguments

thePlayerplayer
The player.
broadcastTomixed
An element, a table of elements, or nil.

Returns

true on success.

Example

setPlayerVoiceBroadcastTo(player, getPlayersInTeam(getPlayerTeam(player)))

Notes

Recipients. An empty table {} = nobody hears the player. A recipient in range hears them in 3D, a farther one like over a radio. nil restores the behaviour from the server settings.

See also