This functions are serverside ONLY


Register Synchron Server Callback (MSK.Trigger)

MSK.Register("Callback_Name", function(source, arg1, arg2, ...)
    return ...


MSK.Register("msk_testing:cbtest", function(source, a, b, c)
    print(source, a, b, c)
    return a, b, c


Trigger Synchron Client Callback (MSK.Register)

local data = MSK.Trigger("Callback_Name", source, arg1, arg2, ...)


local a, b, c = MSK.Trigger("msk_testing:cbtest2", source, '123', '456', '789')
print(a, b, c)


Discord Webhook

MSK.AddWebhook(webhook, botColor, botName, botAvatar, title, description, fields, footer, time)


If you don't want to use f.e. footer then set footer = false to deactivate the footer.

webhook = "",
botColor = "6205745", --
botName = "MSK Scripts",
botAvatar = "",
title = "MSK Scripts - Webhook Script",
description = "Test Beschreibung",
fields = {
    {name = "Title", value = 'Description', inline = true},
    {name = "Title", value = 'Description', inline = true},
footer = {
    text = "© MSK Scripts", 
    link = ""
time = "%d/%m/%Y %H:%M:%S" -- format: "day/month/year hour:minute:second"


Show a Notification. info and duration is optional. Look at Flipz-Alert for better understanding.

MSK.Notification(source, title, message, info, duration)


MSK.Notification(source, 'Title', 'This is a Notification', 'general', 5000)


Shows a Picture Notification

-- flash and iconType are optional
MSK.AdvancedNotification(source, text, title, subtitle, icon, flash, icontype)


MSK.AdvancedNotification(source, 'This is a Notification', 'Title', 'Subtitle', 'CHAR_HUMANDEFAULT', true, 1)


Register a Command with a few functions

MSK.RegisterCommand(name, groups, cb, console, framework, suggestion)


MSK.RegisterCommand('testCommand', 'admin', cb, console, framework, suggestion)
MSK.RegisterCommand({'command1, command2', ...}, {'group1', 'group2', ...}, cb, console, framework, suggestion)
MSK.RegisterCommand('testCommand', 'admin', function(source, args, rawCommand)
    if not args.playerId then args.playerId = source end
    MSK.Notification(args.playerId, 'Command send successfully')
end, false --[[console]], false --[[framework]], {help = 'Just a Test Command', arguments = {
    {name = 'playerId', help = 'PlayerID', action = 'playerId', val = false},

MSK.RegisterCommand('testCommand', 'admin', function(xPlayer, args, rawCommand)
    local targetPlayer = args.playerId
    MSK.Notification(targetPlayer.source, 'Command send successfully')
end, false --[[console]], true --[[framework]], {help = 'Just a Test Command', arguments = {
    {name = 'playerId', help = 'PlayerID', action = 'playerId', val = true},

Argument Action

console = true -- Command can be executed in console
console = false -- Command can not be executed in console

framework = true -- Use xPlayer
framework = false -- Use source

action = false -- string or whatever
action = 'number' -- only number is allowed
action = 'playerId' -- only a playerId as a number or 'me' is allowed

val = true -- arguments has to be used
val = false -- argument is optional but you have to set it as last argument


Checks if you have the item in your inventory (only for ESX or QBCore)

MSK.HasItem(xPlayer, item)


local xPlayer = ESX.GetPlayerFromId(source) -- ESX
local xPlayer = QBCore.Functions.GetPlayer(source) -- QBCore
local hasItem = MSK.HasItem(xPlayer, 'bread') -- returns: name, label, count
print(, hasItem.label, hasItem.count)


Get the Player from PlayerId, Identifier, CitizenId or Phone. This works for ESX and QBCore.

local xPlayer = MSK.GetPlayer({source = playerId})
local xPlayer = MSK.GetPlayer({identifier = playerIdentifier})
local xPlayer = MSK.GetPlayer({citizenid = playerCitizenId})
local xPlayer = MSK.GetPlayer({phone = 123456789})


Get all the Players on the server.

local Players = MSK.GetPlayers() -- returns all players on the server
local Players = MSK.GetPlayers('job', 'police') -- returns only players with that specified job
local Players = MSK.GetPlayers('gang', 'bloods') -- returns only players with that specified gang *(Only QBCore)*
local Players = MSK.GetPlayers('group', 'admin') -- returns only player that have the group/permission 'admin'

Last updated