MSK.RegisterCommand('testCommand', 'admin', function(source,args,rawCommand)ifnot 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 consoleconsole =false-- Command can not be executed in consoleframework =true-- Use xPlayerframework =false-- Use sourceaction =false-- string or whateveraction ='number' -- only number is allowedaction ='playerId' -- only a playerId as a number or 'me' is allowedval =true-- arguments has to be usedval =false-- argument is optional but you have to set it as last argument
MSK.HasItem
Checks if you have the item in your inventory (only for ESX or QBCore)
local Players = MSK.GetPlayers() -- returns all players on the serverlocal Players = MSK.GetPlayers('job', 'police') -- returns only players with that specified joblocal 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'