Our website is currently under construction and will be completed within the next few days.

Exports

A list of client- and server-side exports you can use to interact with or extend SaltyChat functionality in your own scripts.

Client

GetVoiceRange

Returns the current voice range as float.

GetRadioChannel

Get the current radio channel.

Parameter
Type
Description

primary

bool

Whether to get the primary or secondary channel

GetRadioVolume

Returns the current radio volume as float (0.0f - 1.6f).

GetRadioSpeaker

Returns the current state of the radio speaker as bool (true speaker on, false speaker off).

GetMicClick

Returns the current state of radio mic clicks as bool (true enabled, false disabled).

SetRadioChannel

Set the current radio channel.

Parameter
Type
Description

radioChannelName

string

Name of the radio channel

primary

bool

Whether to set the primary or secondary channel

SetRadioVolume

Adjust the radio's volume

Parameter
Type
Description

volumeLevel

float

Overrides the volume in percent (0f - 1.6f / 0 - 160%)

SetRadioSpeaker

Turn the radio speaker on (true) or off (false).

Parameter
Type
Description

isRadioSpeakEnabled

bool

true to enable speaker, false to disable speaker

SetMicClick

Turn radio mic clicks on (true) or off (false).

Parameter
Type
Description

isMicClickEnabled

bool

true to enable mic clicks, false to disable mic clicks


Server

GetPlayerAlive

Returns player IsAlive flag as bool.

Parameter
Type
Description

netId

int

Server ID of the player

SetPlayerAlive

Sets player IsAlive flag.

Parameter
Type
Description

netId

int

Server ID of the player

isAlive

bool

true if player is alive, otherwise false

GetPlayerVoiceRange

Returns player voice range as float.

Parameter
Type
Description

netId

int

Server ID of the player

SetPlayerVoiceRange

Sets player voice range.

Parameter
Type
Description

netId

int

Server ID of the player

voiceRange

float

Voice range that should be set

AddPlayerToCall

Adds a player to a call, creates call if it doesn't exist.

Parameter
Type
Description

callIdentifier

string

Identifier of the call

playerHandle

int

Server ID of the player

AddPlayersToCall

Adds an array of players to a call, creates call if it doesn't exist.

Parameter
Type
Description

callIdentifier

string

Identifier of the call

playerHandles

int[]

Server IDs of the players

RemovePlayerFromCall

Removes a player from a call.

Parameter
Type
Description

callIdentifier

string

Identifier of the call

playerHandle

int

Server ID of the player

RemovePlayersFromCall

Removes an array of players from a call.

Parameter
Type
Description

callIdentifier

string

Identifier of the call

playerHandles

int[]

Server IDs of the players

SetPhoneSpeaker

Turns phone speaker of an player on/off.

Parameter
Type
Description

playerHandle

int

Server ID of the player

toggle

bool

true to turn on speaker, false to turn it off

SetPlayerRadioSpeaker

Turns radio speaker of an player on/off.

Parameter
Type
Description

netId

int

Server ID of the player

toggle

bool

true to turn on speaker, false to turn it off

GetPlayersInRadioChannel

Returns an int array with all player handles that are members of the specified radio channel.

Parameter
Type
Description

radioChannelName

string

Name of the radio channel

SetPlayerRadioChannel

Sets a player's radio channel.

Parameter
Type
Description

netId

int

Server ID of the player

radioChannelName

string

Name of the radio channel

isPrimary

bool

true to set the channel as primary, false to set it as secondary

RemovePlayerRadioChannel

Removes a player from the radio channel.

Parameter
Type
Description

netId

int

Server ID of the player

radioChannelName

string

Name of the radio channel

SetRadioTowers

Sets the radio towers.

Parameter
Type
Description

towers

float[][]

Array with radio tower positions and ranges (X, Y, Z, range)

Last updated