Parameters
playerId - number - PlayerId of the player
command - string - check for ace permission for this command
ReturnshasAcePerm - boolean - whether the Player has Ace Permission for the given Command
local hasAcePerm = MSK.IsAceAllowed(playerId, command)-- Examplelocal hasAcePerm = MSK.IsAceAllowed(1, 'your_command')-- As an Export:local hasAcePerm = exports.msk_core:IsAceAllowed(playerId, command)
MSK.IsPrincipalAceAllowed
Parameters
principal - string - Principal
ace - string - ace perm
local isAllowed = MSK.IsPrincipalAceAllowed(principal, ace)-- Examplelocal isAllowed = MSK.IsPrincipalAceAllowed('group.admin', 'command.your_command')-- As an Export:local isAllowed = exports.msk_core:IsPrincipalAceAllowed(principal, ace)
MSK.AddAce
Parameters
principal - number/string - Principal to add for
ace - string - ace perm to add
allow - string - 'allow' or 'deny' - Optional, default: 'allow'
MSK.AddAce(principal, ace, allow)-- Example 1 -> Adds command permission for group adminMSK.AddAce('admin', 'command.your_command')-- Example 2 -> Adds command permission for playerId 1MSK.AddAce(1, 'command.your_command')-- As an Export:exports.msk_core:AddAce(principal, ace, allow)
MSK.RemoveAce
Parameters
principal - number/string - Principal to remove for
ace - string - ace perm to remove
allow - string - 'allow' or 'deny' - Optional, default: 'allow'
MSK.RemoveAce(principal, ace, allow)-- Example 1 -> Removes command permission for group adminMSK.RemoveAce('admin', 'command.your_command')-- Example 2 -> Removes command permission for playerId 1MSK.RemoveAce(1, 'command.your_command')-- As an Export:exports.msk_core:RemoveAce(principal, ace, allow)