UNPKG

@fivem-ts/server

Version:

FiveM Typescript wrapper server Part

43 lines (42 loc) 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Ace = void 0; var Ace; (function (Ace) { function addAce(principal, ace, allow) { if (typeof principal === 'number') principal = `player.${principal}`; ExecuteCommand(`add_ace ${principal} ${ace} ${allow}`); } Ace.addAce = addAce; function removeAce(principal, ace, allow) { if (typeof principal === 'number') principal = `player.${principal}`; ExecuteCommand(`remove_ace ${principal} ${ace} ${allow}`); } Ace.removeAce = removeAce; function addPrincipal(child, parent) { if (typeof child === 'number') child = `player.${child}`; ExecuteCommand(`add_principal ${child} ${parent}`); } Ace.addPrincipal = addPrincipal; function removePrincipal(child, parent) { if (typeof child === 'number') child = `player.${child}`; ExecuteCommand(`remove_principal ${child} ${parent}`); } Ace.removePrincipal = removePrincipal; function isPlayerAceAllowed(playerSrc, object) { return IsPlayerAceAllowed(playerSrc, object); } Ace.isPlayerAceAllowed = isPlayerAceAllowed; function isPrincipalAceAllowed(principal, object) { return IsPrincipalAceAllowed(principal, object); } Ace.isPrincipalAceAllowed = isPrincipalAceAllowed; function isAceAllowed(object) { return IsAceAllowed(object); } Ace.isAceAllowed = isAceAllowed; })(Ace || (exports.Ace = Ace = {}));