ZH-CN/AclDestroy: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
mNo edit summary |
||
Line 44: | Line 44: | ||
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | <!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | ||
{{ACL_functions}} | {{ACL_functions}} | ||
[[ar:aclDestroy]] | |||
[[en:AclDestroy]] | [[en:AclDestroy]] | ||
[[zh-cn:AclDestroy]] |
Latest revision as of 18:15, 21 February 2021
此函数将销毁传递的ACL.销毁的ACL将不再有效.
语法
bool aclDestroy ( acl theACL )
OOP Syntax Help! I don't understand this!
- Method: acl:destroy(...)
必填参数
- theACL: 要销毁的ACL
返回值
如果成功销毁,则返回“true”;如果无法删除,则返回“false”(意思就是它是一个空值).
示例
此示例显示了删除ACL的命令:
function deleteSomeACL ( thePlayer, cmdname, theACL ) if aclGet ( theACL ) then --检查指定的ACL是否存在 --If it does local deleted = aclDestroy ( theACL ) --尝试删除ACL if deleted then --如果ACL已被删除 --我们会发送给玩家一个成功删除的消息 outputChatBox ( "ACL " ..theACL.. " Succesfully removed!", thePlayer ) else --如果删除时出错 --我们向玩家发送一条错误消息 outputChatBox ( "Error while removing ACL " ..theACL.. "!", thePlayer ) end else --如果ACL不存在 outputChatBox ( "Error: Invalid ACL Name specified, or the ACL doesn't exist.", thePlayer ) end end addCommandHandler ( "deleteACL", deleteSomeACL ) --添加命令处理程序
See Also
- aclCreate
- aclCreateGroup
- aclDestroy
- aclDestroyGroup
- aclGet
- aclGetGroup
- aclGetName
- aclGetRight
- aclGroupAddACL
- aclGroupAddObject
- aclGroupGetName
- aclGroupList
- aclGroupListACL
- aclGroupListObjects
- aclGroupRemoveACL
- aclGroupRemoveObject
- aclList
- aclListRights
- aclReload
- aclRemoveRight
- aclSave
- aclSetRight
- hasObjectPermissionTo
- isObjectInACLGroup