ZH-CN/aclRemoveRight

From Multi Theft Auto: Wiki
Revision as of 07:10, 6 February 2021 by Qwe7769611 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

此函数用于从给定ACL中删除给定的权限(字符串).

语法

bool aclRemoveRight ( acl theAcl, string rightName ) 

OOP 语法 什么是OOP?

方法: acl:removeRight(...)

必填参数

  • theAcl: 要从中移除右侧的ACL
  • rightName: 要从右侧删除的ACL名称

返回值

如果给定的权限已成功从给定的ACL中删除,则返回“true”;如果由于某种原因无法删除,即ACL中不存在该权限,则返回“false”或“nil”.

示例

此示例在资源启动时删除acl权限.

addEventHandler("onResourceStart",resourceRoot,function()
   aclRemoveRight(aclGet("Admin"),"function.setServerPassword")
end)

See Also