ZH-CN/AclGroupListACL

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

此函数返回给定ACL组中存在的所有ACL的表.

语法

table aclGroupListACL ( aclgroup theGroup )

OOP 语法 什么是OOP?

方法: aclgroup:listACL(...)
变量: .aclList

必填参数

  • theGroup: 要从中获取ACL元素的ACL组

返回值

返回给定ACL组中ACL元素的表。这张表子可能是空的。如果组无效或由于其他原因失败,则返回“false”或“nil”.

示例

如果给定了ACL组名称,本例将输出ACL的列表.(已测试!)

addCommandHandler("aclList",function(player,command,aclGroup)
	if(aclGroup~="")then
		tables = aclGroupListACL(aclGetGroup(aclGroup))
		count = 0
		for list,nam in pairs(tables) do
			outputChatBox("ACL LIST: "..aclGroup.."Line: "..tostring(count).." ACL: "..aclGetName(nam)..".",player)
			count = count + 1
		end
	else
		outputChatBox("Please add the aclGroup you want the list of.",player)
		outputChatBox("Syntax: /aclList aclGroup",player)
	end
end)

See Also