Server
Exports - Serverside
getDatabase
Get the content of database
Returns
database - table - Content of database.json
local database = exports.msk_radio:getDatabase()
print(MSK.DumpTable(database))
--[[ OUTPUT
channel = password,
channel = password
]]getChannelMembers
Get all Players in the specific Radiochannel
Parameters
channel - number - The Channel ID
playerId - number - Player ID - Only for tokovoip
Returns
channelMembers - table - All Player in this channel
local channelMembers = exports.msk_radio:getChannelMembers(channel, playerId)
-- Example
local channelMembers = exports.msk_radio:getChannelMembers(1)
for k, v in pairs(channelMembers) do
print(v.playerId, v.name)
endhasChannelPassword
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')Last updated