Exports

All exports are for client

SetRadioChannel

Set radio channel

exports["tgiann-radio-v2"]:SetRadioChannel(channel, showAllUsers)

Parameters :

Name
Type
Description

channel

string

Channel name or frequency

showAllUsers?

boolean

When connected to the channel, show all people in HUD. When false, only speakers are visible.

Example

exports["tgiann-radio-v2"]:SetRadioChannel("PD1")
exports["tgiann-radio-v2"]:SetRadioChannel(2)
exports["tgiann-radio-v2"]:SetRadioChannel("3", false)
exports["tgiann-radio-v2"]:SetRadioChannel() -- leave all channel
exports["tgiann-radio-v2"]:SetRadioChannel(0) -- leave all channel
exports["tgiann-radio-v2"]:SetRadioChannel("0") -- leave all channel

LeaveAllChannels

Disconnect from all channels to which it is connected

exports["tgiann-radio-v2"]:LeaveAllChannels()

LeaveRadioChannel

Leave a specific channel

exports["tgiann-radio-v2"]:LeaveRadioChannel(channel)

Parameters :

Name
Type
Description

channel

string

Channel

Example

exports["tgiann-radio-v2"]:LeaveRadioChannel("1.00")

ToggleRadioAnim

exports["tgiann-radio-v2"]:ToggleRadioAnim("1.00")

SetDisableRadioAnim

Leave a specific channel

exports["tgiann-radio-v2"]:SetDisableRadioAnim(bool)

Parameters :

Name
Type
Description

bool

Boolen

true or false

Example

exports["tgiann-radio-v2"]:SetDisableRadioAnim(true)
exports["tgiann-radio-v2"]:SetDisableRadioAnim(false)

GetRadioAnimState

returns the state of the radio anim verse

exports["tgiann-radio-v2"]:GetRadioAnimState()

Example

local animIsActive = exports["tgiann-radio-v2"]:GetRadioAnimState()

GetConnectChannels

Returns a list of connected channels

exports["tgiann-radio-v2"]:GetConnectChannels()

Return :

Name
Type
Description

Channel Array

table

Channel frequency

Example

local channelLists = exports["tgiann-radio-v2"]:GetConnectChannels()

IsConnectToChannel

Does the player connect to the frequency?

exports["tgiann-radio-v2"]:IsConnectToChannel(channel)

Return :

Name
Type
Description

isConnected

bool

Returns true if connect to frequency

Parameters :

Name
Type
Description

channel

string

Channel Frequency

Example

local isConnected = exports["tgiann-radio-v2"]:IsConnectToChannel("1.00")

ChannelIsMuted

Returns true if the microphone at the player's frequency is off

exports["tgiann-radio-v2"]:ChannelIsMuted(channel)

Return :

Name
Type
Description

isMuted

bool

Returns true if the microphone at the player's frequency is off

Parameters :

Name
Type
Description

channel

string

Channel Frequency

Example

local isMuted = exports["tgiann-radio-v2"]:ChannelIsMuted("1.00")

SetFrequencyVolume

change the frequency's volume.

exports["tgiann-radio-v2"]:SetFrequencyVolume(channel, volume)

Parameters :

Name
Type
Description

channel

string

Channel Frequency

volume

number

Between 1 and 100

Example

exports["tgiann-radio-v2"]:SetFrequencyVolume("1.00", 60)
exports["tgiann-radio-v2"]:SetFrequencyVolume("1.00", 100)

SetMutedChannel

Turns off and on the player's microphone on Frequency

exports["tgiann-radio-v2"]:SetMutedChannel(channel, isMuted)

Parameters :

Name
Type
Description

channel

string

Channel Frequency

isMuted

boolen

true or false

Example

exports["tgiann-radio-v2"]:SetMutedChannel("1.00", true)
exports["tgiann-radio-v2"]:SetMutedChannel("1.00", false)

ChannelGetPlayerName

Returns the player's name in frequency

exports["tgiann-radio-v2"]:ChannelGetPlayerName(channel)

Return :

Name
Type
Description

name

bool

Returns the player's name in frequency

Parameters :

Name
Type
Description

channel

string

Channel Frequency

Example

local name = exports["tgiann-radio-v2"]:ChannelGetPlayerName("1.00")

ChannelSetPlayerName

Changes the name of the player on the frequency

exports["tgiann-radio-v2"]:ChannelSetPlayerName(channel, name)

Parameters :

Name
Type
Description

channel

string

Channel Frequency

name

string

New player name

Example

exports["tgiann-radio-v2"]:ChannelSetPlayerName("1.00", "TGIANN")
exports["tgiann-radio-v2"]:ChannelSetPlayerName("1.00", "LUMISAPHY")

SetShowAllUsers

Open or close the player list on the frequency. If set to false, only speaking persons will be visible.

exports["tgiann-radio-v2"]:SetShowAllUsers(channel, showAllUser)

Parameters :

Name
Type
Description

channel

string

Channel Frequency

showAllUser

boolean

Show all user

Example

exports["tgiann-radio-v2"]:SetShowAllUsers("1.00", true)
exports["tgiann-radio-v2"]:SetShowAllUsers("1.00", false)

SetShowAllUsers

Open or close the player list on the frequency. If set to false, only speaking persons will be visible.

exports["tgiann-radio-v2"]:SetShowAllUsers(channel, showAllUser)

Parameters :

Name
Type
Description

channel

string

Channel Frequency

showAllUser

boolean

Show all user

Example

exports["tgiann-radio-v2"]:SetShowAllUsers("1.00", true)
exports["tgiann-radio-v2"]:SetShowAllUsers("1.00", false)

Last updated