ZH-CN/AclCreateGroup: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 12: | Line 12: | ||
===返回值=== | ===返回值=== | ||
如果成功,则返回指向已创建aclgroup的指针函数。如果失败,则返回false. | |||
==示例== | ==示例== | ||
Line 40: | Line 40: | ||
==See Also== | ==See Also== | ||
{{ACL_functions}} | {{ACL_functions}} | ||
[[en:AclCreateGroup]] | |||
[[ar:aclCreateGroup]] | |||
[[en:aclCreateGroup]] | |||
[[zh-cn:AclCreateGroup]] |
Latest revision as of 18:09, 21 February 2021
此函数用于在ACL中创建组。ACL组可以包含玩家和资源等对象.它们指定谁有权访问此组中的ACL
语法
aclgroup aclCreateGroup ( string groupName )
OOP 语法 什么是OOP?
- 方法: ACLGroup(...)
必填参数
- groupName: 要创建的组的名称
返回值
如果成功,则返回指向已创建aclgroup的指针函数。如果失败,则返回false.
示例
此示例添加了一个命令addobjecttogroup,使用该命令可以轻松地将新对象添加到指定的访问控制列表组中.
function addACLGroupObject ( thePlayer, commandName, groupName, objectName ) local ourGroup = aclGetGroup ( groupName ) -- 如果以前没有使用此名称的组,则需要创建一个 if not ourGroup then ourGroup = aclCreateGroup ( groupName ) end -- 如果没有给出对象名 if not objectName then -- 将消息发送到聊天室 return outputChatBox ( "You need to specify the object!", thePlayer ) end -- 最后,让我们将对象添加到它的组中 aclGroupAddObject ( ourGroup, objectName ) -- 不要忘记在修改ACL后保存它 aclSave () end addCommandHandler ( "addobjecttogroup", addACLGroupObject )
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