<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JustBoy</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JustBoy"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/JustBoy"/>
	<updated>2026-04-16T07:58:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AclGroupAddObject&amp;diff=44824</id>
		<title>AclGroupAddObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AclGroupAddObject&amp;diff=44824"/>
		<updated>2015-03-31T15:41:19Z</updated>

		<summary type="html">&lt;p&gt;JustBoy: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function adds an object to the given ACL group. An object can be a player's account, specified as:&lt;br /&gt;
  ''user.&amp;lt;accountname&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
Or a resource, specified as:&lt;br /&gt;
  ''resource.&amp;lt;resourcename&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
Objects are specified as strings. The ACL groups work for the user accounts and the resources that are specified in them.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool aclGroupAddObject ( aclgroup theGroup, string theObjectName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[aclgroup]]:addObject||}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''theGroup:''' The group to add the object name string too.&lt;br /&gt;
*'''theObjectName:''' The object string to add to the given ACL.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the object was successfully added to the ACL, ''false'' if it already existed in the list.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example makes every player able to use a command named &amp;quot;giveAccountAdminRights&amp;quot; that will add a specific accountname as an ACL object to the &amp;quot;Admin&amp;quot; group.&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function giveAdminRights (playerSource, commandName, accountName) --add the function giveAdminRights and specify its arguments&lt;br /&gt;
	if accountName then --if there was an accountName entered then&lt;br /&gt;
		aclGroupAddObject (aclGetGroup(&amp;quot;Admin&amp;quot;), &amp;quot;user.&amp;quot;..accountName) --add an ACL object using the form &amp;quot;user.[accountName]&amp;quot; to the ACL group &amp;quot;Admin&amp;quot;&lt;br /&gt;
		outputChatBox (&amp;quot;Account '&amp;quot;..accountName..&amp;quot;' succesfully added to the admin group&amp;quot;, playerSource) --output a notification to the player who entered the command that the acocunt was successfully added&lt;br /&gt;
	else --else output an error message and the correct syntax of the command to the player who entered it&lt;br /&gt;
		outputChatBox (&amp;quot;No account name specified.&amp;quot;, playerSource)&lt;br /&gt;
		outputChatBox (&amp;quot;Correct syntax: /giveAccountAdminRights [accountName]&amp;quot;, playerSource)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler (&amp;quot;giveAccountAdminRights&amp;quot;, giveAdminRights) --add a command &amp;quot;giveAccountAdminRights&amp;quot; and attch the function &amp;quot;giveAdminRights&amp;quot; to it &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{ACL_functions}}&lt;/div&gt;</summary>
		<author><name>JustBoy</name></author>
	</entry>
</feed>