aclGroupListACL | Multi Theft Auto: Wiki Skip to content

aclGroupListACL

Client-side
Server-side
Shared

This function returns a table over all the ACL's that exist in a given ACL group.

OOP Syntax Help! I don't understand this!

  • Method:aclgroup:listACL(...)
  • Variable: .aclList

Syntax

table|false aclGroupListACL ( ​aclgroup theGroup )
Required arguments

Returns

Returns a table of the ACL elements in the given ACL group. This table might be empty. Returns false or nil if theGroup is invalid or it fails for some other reason.

  • table|false: acl's list

Code Examples

server

This example outputs the list of ACL's if the aclGroup name is given.

addCommandHandler("aclList", function(player, command, aclGroup)
if (not aclGroup) then -- Was the group name provided?
outputChatBox("You must provide the group name", player, 255, 255, 255)
return
end
local group = aclGetGroup(aclGroup)
if (group) then -- Does a group with that name exist?
local acls = aclGroupListACL(group)
outputChatBox("List of ACL entries for group " .. aclGroup, player, 255, 255, 255)
for k, v in ipairs(acls) do
outputChatBox("- " .. aclGetName(v), player)
end
else
outputChatBox("Group with the name " .. aclGroup .. " does not exist.", player, 255, 255, 255)
end
end)