AclGroupList: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(OOP syntax added)
m (→‎Syntax: OOP)
Line 7: Line 7:
table aclGroupList ()
table aclGroupList ()
</syntaxhighlight>  
</syntaxhighlight>  
{{OOP||ACLGroup.list||}}
{{OOP|This function is also a static function underneath the ACL Group class.|[[aclgroup]]:list||}}
===Returns===
===Returns===
Returns a table of all the ACL groups if successful, returns an empty table if no ACL groups exist. ''false''/''nil'' can be returned if this function fails for some other reason.
Returns a table of all the ACL groups if successful, returns an empty table if no ACL groups exist. ''false''/''nil'' can be returned if this function fails for some other reason.

Revision as of 15:38, 22 August 2014

This function returns a table of all the ACL groups.

Syntax

table aclGroupList ()

OOP Syntax Help! I don't understand this!

Note: This function is also a static function underneath the ACL Group class.
Method: aclgroup:list(...)


Returns

Returns a table of all the ACL groups if successful, returns an empty table if no ACL groups exist. false/nil can be returned if this function fails for some other reason.

Example

This example shows, how to output all ACL Group Names by showAclGroups

function showGroups(player)
	local groups = {}
	groups = aclGroupList()
	for i,v in ipairs(groups) do
		local name = aclGroupGetName(v)
		outputChatBox(tostring(name),player)
	end
end
addCommandHandler("showAclGroups",showGroups)

See Also