Skip to main content

Server Exports

getDatabase

Returns
database - table - Content of database.json (channel = password)

local database = exports.msk_radio:getDatabase()

getChannelMembers

Parameters
channel - number - The Channel ID
playerId - number - Player ID — Only for tokovoip

Returns
channelMembers - table - All Players in this channel

local channelMembers = exports.msk_radio:getChannelMembers(1)

for k, v in pairs(channelMembers) do
print(v.playerId, v.name)
end

hasChannelPassword

Parameters
channel - number - The Channel ID

Returns
hasChannelPassword - boolean

local hasChannelPassword = exports.msk_radio:hasChannelPassword(5)

checkChannelPassword

Parameters
channel - number - The Channel ID
password - string - The Password

Returns
isPasswordCorrect - boolean

local isPasswordCorrect = exports.msk_radio:checkChannelPassword(5, '1234')