MSK Scripts
TebexGithubDiscordMusiker15
  • MSK Scripts
    • Welcome
  • Common Issues
    • Keymaster
  • Miscellaneous
    • Change Notifications
  • Scripts
    • MSK Core
      • Installation
      • Functions
        • Client
          • Ace Permission
          • Commands
          • Coords
          • Player
          • Points
          • Request
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
          • Vehicle
        • Shared
          • String
          • Math
          • Table
          • Timeout
          • Vector
        • Server
          • Ace Permission
          • Ban System
          • Commands
          • Player
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
    • MSK Banking
      • Installation
        • Paycheck Transaction
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Server Callbacks
    • MSK EngineToggle
      • Guides
      • Exports
        • Client
      • Event Handler
        • Client
        • Server
    • MSK Fuel
      • Config
      • Exports
        • Client
    • MSK Garage
      • Config
      • Exports
        • Client
    • MSK Handcuffs
      • Guides
        • General Edits for Jobs
        • Jaksam Job Creator
        • Multichar
        • ox_inventory
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Event Handlers
    • MSK Radio
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Server
    • MSK Simcard
      • Installation
        • Config.Database
      • Config
    • MSK VehicleKeys
      • Guides
        • Installation
        • Integrations
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
    • MSK Whitelist
      • Config
      • Exports
        • Client
        • Server
    • MSK Weaponammo
Powered by GitBook
On this page
  • getDatabase
  • getChannelMembers
  • hasChannelPassword
  • checkChannelPassword
  1. Scripts
  2. MSK Radio
  3. Exports

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)
end

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')

Last updated 7 months ago