ZH-CN/AclGroupListACL: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server function}}<!-- Change this to "Client function" or "Server function" appropriately--> <!-- Describe in plain english what this function does. Don't go into...")
 
No edit summary
 
Line 38: Line 38:
<!-- 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}}
[[zh-cn:AclGroupListACL]]
[[en:AclGroupListACL]]

Latest revision as of 06:42, 6 February 2021

此函数返回给定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