Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectServer APIGenerated

Voice

const Voice: object

Defined in: server/api.d.ts:7137

Server-side proximity voice rules: how far voice carries, and who may talk to or hear whom.

getPlayerRange(player): number

Reads how far a player’s voice carries, with the server-wide default already resolved.

ServerEntity

Player to query.

number

Radius in world units.

getPlayerTier(player): number

Reads the voice tier a player is on. A player switching tier raises the playerVoiceTierChange event with the player and the new tier.

ServerEntity

Player to query.

number

0 whisper, 1 normal, 2 shout.

getRange(): number

Reads the server-wide proximity range.

number

Radius in world units.

getTierRange(tier): number

Reads how far a voice tier carries, with the server-wide range already resolved.

number

Voice tier: 0 whisper, 1 normal, 2 shout.

number

Radius in world units.

isLocallyMuted(listener, target): boolean

Checks a one-way mute.

ServerEntity

Player doing the muting.

ServerEntity

Player being muted.

boolean

True when the listener does not receive the target.

isPlayerDeaf(player): boolean

Checks the server-wide deafen flag.

ServerEntity

Player to query.

boolean

True when the player receives nobody’s voice.

isPlayerMuted(player): boolean

Checks the server-wide mute flag.

ServerEntity

Player to query.

boolean

True when the player’s voice reaches nobody.

isPlayerTalking(player): boolean

Checks whether a player is speaking right now. Tracks speech rather than the push-to-talk key: silence is dropped before it reaches the server, and the state clears shortly after the last frame. The same signal raises the playerVoiceStart and playerVoiceStop events.

ServerEntity

Player to query.

boolean

True while the player’s voice is reaching the server.

isPlayerVoiceEnabled(player): boolean

Checks whether a player left voice chat enabled in their own client settings. A preference, not a permission: use setPlayerMuted or setPlayerDeaf to enforce anything.

ServerEntity

Player to query.

boolean

True unless the player turned voice chat off.

setLocalMute(listener, target, muted): void

One-way mute between two players, enforced by the server rather than the client.

ServerEntity

Player who stops hearing the target.

ServerEntity

Player the listener stops hearing.

boolean

True to mute, false to restore.

void

setPlayerDeaf(player, deaf): void

Server-wide deafen: a deaf player receives nobody.

ServerEntity

Player to deafen or undeafen.

boolean

True to stop them receiving anyone’s voice.

void

setPlayerMuted(player, muted): void

Server-wide mute: a muted player’s voice reaches nobody.

ServerEntity

Player to mute or unmute.

boolean

True to stop their voice reaching anyone.

void

setPlayerRange(player, range): void

Overrides how far one player’s voice carries, whichever voice tier they chose.

ServerEntity

Player whose voice carries the given distance.

number

Audibility radius in world units; values <= 0 return them to the radius of their voice tier.

void

setPlayerTier(player, tier): void

Puts a player on a voice tier, as if they had switched to it. Their own indicator follows, and the playerVoiceTierChange event is not raised.

ServerEntity

Player to move.

number

Voice tier: 0 whisper, 1 normal, 2 shout.

void

setRange(range): void

Sets how far voice carries for talkers with no override of their own. Connected clients are told, so their playback fades out at the same distance.

number

Audibility radius in world units; values <= 0 restore the default of 25.

void

setTierRange(tier, range): void

Sets how far a voice tier carries. Players switch tier themselves; whisper starts at 3, shout at 25, and normal carries the server-wide range. Set a tier to 0 to make it carry the server-wide range, which takes it away. Connected clients are told.

number

Voice tier: 0 whisper, 1 normal, 2 shout.

number

Audibility radius in world units; values <= 0 make the tier carry the server-wide range.

void