Show a Notification. info and duration is optional. Look at Flipz-Alert for better understanding.
MSK.Notification(title, message, info, duration)
Example
MSK.Notification('Title', 'This is a Notification', 'general', 5000)
MSK.HelpNotification
Show a Help Notification
MSK.HelpNotification(text)
Example
MSK.HelpNotification('Press ~g~E~s~ to open')
MSK.AdvancedNotification
Show a Picture Notification
-- flash and iconType are optionalMSK.AdvancedNotification(text, title, subtitle, icon, flash, icontype)
Example
MSK.AdvancedNotification('This is a Notification', 'Title', 'Subtitle', 'CHAR_HUMANDEFAULT', true, 1)
MSK.Draw3DText
Draw a 3D Text (size and font is optional)
MSK.Draw3DText(location, text, size, font)
Example
local location =GetEntityCoords(PlayerPedId())MSK.Draw3DText(location, 'This is the Label Text', 1, 0)MSK.Draw3DText(location, 'This is the Label Text')
MSK.HasItem
Checks if you have the item in your inventory (only for ESX or QBCore)
MSK.HasItem(itemName)
Example
local hasItem = MSK.HasItem('bread') -- returns: name, label, count
MSK.Input
Opens an Input Window. You can use MSK.Input or exports.msk_core:openInput
More Information can be found here: https://github.com/MSK-Scripts/msk_input
-- Small Input WindowMSK.Input('This is a Header', 'This is a Placeholder', function(input)ifnot input thenreturnendprint(input)end)-- Big Input WindowMSK.Input('This is a Header', 'This is a Placeholder', true, function(input)ifnot input thenreturnendprint(input)end)
MSK.GetPedMugshot
Get the PedMugshot from a specific Ped.
local mugshot, mugshotStr = MSK.GetPedMugshot(ped, transparent --[[boolean]])UnregisterPedheadshot(mugshot) -- You have to call this to delete the unregister the mugshot after use
Example
local mugshot, mugshotStr = MSK.GetPedMugshot(PlayerPedId(), true) -- transparent = whether transparent background or not
MSK.AdvancedNotification('Message', 'Title', 'Subtitle', mugshotStr)UnregisterPedheadshot(mugshot)
MSK.ProgressStart
Shows a progressbar. color is optional and can be set in config.lua.
MSK.ProgressStart(time, text, color)
Example
MSK.ProgressStart(5000, 'Progressing...') -- default color set in config.luaMSK.ProgressStart(5000, 'Progressing...', "#5eb131") -- custom color