Client
Exports - Clientside
openRadio
Opens the radio UI
exports.msk_radio:openRadio()
closeRadio
Closes the radio UI
exports.msk_radio:closeRadio()
isRadioOpen
Check if the UI is open or not
Returns
isRadioOpen - boolean
- If the UI is open or not
local isRadioOpen = exports.msk_radio:isRadioOpen()
isEncryptedChannel
Check if the Channel is encrypted (Config.EncryptedChannels)
Parameters
channel - number
- The Channel ID
Returns
isEncryptedChannel - boolean
- If the channel is encrypted or not
local isEncryptedChannel = exports.msk_radio:isEncryptedChannel(channel)
-- Example
local isEncryptedChannel = exports.msk_radio:isEncryptedChannel(1)
hasChannelPassword
Check if the channel has a password
Parameters
channel - number
- The Channel ID
Returns
hasChannelPassword - boolean
- If the channel has a password or not
local hasChannelPassword = exports.msk_radio:hasChannelPassword(channel)
-- Example
local hasChannelPassword = exports.msk_radio:hasChannelPassword(5)
checkChannelPassword
Check if the given password is correct
Parameters
channel - number
- The Channel ID
password - string
- The Password
Returns
isPasswordCorrect - boolean
- If the password is correct or not
local isPasswordCorrect = exports.msk_radio:checkChannelPassword(channel, password)
-- Example
local isPasswordCorrect = exports.msk_radio:checkChannelPassword(5, '1234')
getRadioChannel
Get the current Radiochannel the player is in
Returns
channel - number
- Current Radiochannel
local channel = exports.msk_radio:getRadioChannel()
getRadioVolume
Get the current Radiovolume
Returns
volume - number
- Current Radiovolume in percent 0-100
local volume = exports.msk_radio:getRadioVolume()
setRadioChannel
Set the new Radiochannel
Parameters
channel - number
- The Channel ID
exports.msk_radio:setRadioChannel(channel)
-- Example
exports.msk_radio:setRadioChannel(1)
removeRadioChannel
Remove the player from the current radio channel
Parameters
channel - number
- The Channel ID - Optional, tokovoip need this!
exports.msk_radio:removeRadioChannel()
-- Example for tokovoip
exports.msk_radio:removeRadioChannel(5) -- Removes the Player if he is in Channel 5
setRadioVolume
Set the Radiovolume
Parameters
volume - number
- The new Radiovolume in percent 0-100
exports.msk_radio:setRadioVolume(volume)
-- Example
exports.msk_radio:setRadioVolume(50)
setRadioSpeaker
Set the Radiospeaker on or off
Parameters
toggle - boolean
- Activate/Deactivate
exports.msk_radio:setRadioSpeaker(toggle)
-- Example
exports.msk_radio:setRadioSpeaker(true) -- Activate Speaker
exports.msk_radio:setRadioSpeaker(false) -- deactivate Speaker
Last updated