About
Offers performance-based functions and makes the one or other things much more pleasant.
Documentation
Export
- You have to add this at the top of your clientside and serverside file
MSK = exports.msk_core:getCoreObject()
Resmon
-
Idle: 0.00 ms
Usage: little higher
Clientside Features
- Trigger Synchron Server Callback
MSK.TriggerCallback
'...' is as many values as you want to send to the server
local data, data2 = MSK.TriggerCallback("Callback_Name", value1, value2, ...)`
Example
local value2 = 'Test2'
local test1, test2 = MSK.TriggerCallback("Callback_Name", value1, value2)
print(test1, test2) -- Output: Test, Test2`
- Add and Delete a timeout
MSK.AddTimeout
Add a timeout
timeout = MSK.AddTimeout(miliseconds, function()
waits miliseconds time // asyncron
end)
- MSK.DelTimeout
MSK.DelTimeout
Delete the timeout
MSK.DelTimeout(timeout)
- Draw a 3D Text (size and font is optional)
MSK.Draw3DText
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')
Serverside Features
- Register Synchron Server Callback
MSK.RegisterCallback
MSK.RegisterCallback("Callback_Name", function(source, cb, value1, value2, ...)
cb(value1, value2)
end)
- Register a Command with a few functions
MSK.RegisterCommand
MSK.RegisterCommand(name, groups, cb, console, suggestion)
Example
MSK.RegisterCommand('testCommand', 'admin', cb, console, suggestion)
MSK.RegisterCommand({'command1, command2', ...}, {'group1', 'group2', ...}, cb, console, suggestion)
Standalone
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, true, {help = 'Just a Test Command', arguments = {
{name = 'playerId', help = 'PlayerID', action = 'playerId', val = true},
}})
ESX or QBCore
MSK.RegisterCommand('testCommand', 'admin', function(xPlayer, args, rawCommand)
if not args.playerId then args.playerId = xPlayer end
MSK.Notification(args.playerId.source, 'Command send successfully')
end, false, {help = 'Just a Test Command', arguments = {
{name = 'playerId', help = 'PlayerID', action = 'playerId', val = false},
}})
Argument Action
action = false -- string or whatever
action = 'number' -- only number is allowed
action = 'playerId' -- only a playerId as a number is allowed
val = true -- arguments has to be used
val = false -- argument is optional but you have to set it as last argument
Common
- Check if a value contains in a table
MSK.Table_Contains
table = {'value_1', 'value_2'}
-- Check if one of the values contains in the table
local contains = MSK.Table_Contains(table, {'value_1', 'value_5'})
-- Check if the value contains in the table
local contains = MSK.Table_Contains(table, 'value_1')
if contains then
-- true
else
-- false
end
MSK.logging
MSK.logging(script, code, ...)
Example:
MSK.logging('[msk_testing]', 'debug', 'value1', 'value2', ...)
MSK.logging('[msk_testing]', 'error', 'value1', 'value2', ...)
MSK.GetRandomLetter
MSK.GetRandomLetter(length)
Example:
MSK.GetRandomLetter(3) -- abc
string.upper(MSK.GetRandomLetter(3)) -- ABC
Code is accessible | Yes |
Subscription-based | No |
Lines (approximately) | 500 |
Requirements | oxmysql |
Support | Yes |
Our other Scripts
Paid
- [ESX] MSK Armor - Multiple Armor Vests
- [ESX] MSK Bankingsystem with NativeUI [V2]
- [ESX] MSK Crafting - with NativeUI
- [ESX] MSK Garage and Impound with NativeUI
- [ESX] MSK Handcuffs - Realistic Handcuffs
- [ESX] MSK Shopsystem - NativeUI & Database Feature
- [ESX/QBCore] MSK Simcard - Change your phonenumber
- [ESX] MSK WeaponAmmo | Clips, Components & Tints
Free
- [ESX] Backpack Plugin | Chezza Inventory
- [ESX] MSK Deathcounter - integrated in myMultichar
- [Re-Release] EngineToggle
- GitHub - Musiker15/msk_givevehicle: Give Vehicles with Command or Item and Delete Vehicles with Command
- GitHub - MSK-Scripts/msk_rgbHeadlights: Changeable Vehicle Headlights with an Item
- [ESX] MSK SaveCoordMenu
- [ESX/QBCore] MSK SecretBlips - Show and delete Blips with an item
- GitHub - MSK-Scripts/msk_webhook: Send Discord Webhooks
- GitHub - MSK-Scripts/msk_weaponammoitems: Weapon Ammunition as Items