<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/ES/aclCreate?action=history&amp;feed=atom</id>
	<title>ES/aclCreate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/ES/aclCreate?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/aclCreate&amp;action=history"/>
	<updated>2026-05-18T01:23:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/aclCreate&amp;diff=30609&amp;oldid=prev</id>
		<title>Kzman: Created page with &quot;__NOTOC__  {{Server function}} Esta función crea una entrada de ACL en el sistema de Lista de Control de Acceso con el nombre especificado.  ==Sintaxis==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; acl aclC...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/aclCreate&amp;diff=30609&amp;oldid=prev"/>
		<updated>2012-05-12T20:08:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Server function}} Esta función crea una entrada de ACL en el sistema de Lista de Control de Acceso con el nombre especificado.  ==Sintaxis==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; acl aclC...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
Esta función crea una entrada de ACL en el sistema de Lista de Control de Acceso con el nombre especificado.&lt;br /&gt;
&lt;br /&gt;
==Sintaxis== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
acl aclCreate ( string nombreAcl )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos=== &lt;br /&gt;
*'''nombreAcl :''' El nombre de la entrada ACL para agregar.&lt;br /&gt;
&lt;br /&gt;
===Devuelve===&lt;br /&gt;
Devuelve el objeto ACL creado si es satisfactorio. Devuelve false si el ACL con el nombre proporcionado no se pudo crear.&lt;br /&gt;
&lt;br /&gt;
==Ejemplo==&lt;br /&gt;
En este ejemplo se añade el comando ''setaclright'' con el cual fácilmente se puede agregar nuevos derechos a las listas de control de acceso especificadas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setACLRight ( thePlayer, nombreComando, nombreAcl, nombreDerecho, acceso )&lt;br /&gt;
    -- convierte la cadena boolean a minuúsculas&lt;br /&gt;
    acceso = string.lower ( acceso )&lt;br /&gt;
    -- acceso solo debe ser true o false (booleans)&lt;br /&gt;
    if not (acceso == &amp;quot;true&amp;quot; or acceso == &amp;quot;false&amp;quot;) then&lt;br /&gt;
        -- imprime un mensaje de error hacia la ventana de depuración&lt;br /&gt;
        return outputDebugString ( &amp;quot;Acceso inválido; solo se acepta true y false&amp;quot;, 1 )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- cambia el acceso a boolean&lt;br /&gt;
    if acceso == &amp;quot;true&amp;quot; then&lt;br /&gt;
        acceso = true&lt;br /&gt;
    else &lt;br /&gt;
        acceso = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local miACL = aclGet ( nombreAcl )&lt;br /&gt;
    -- si no hay un ACL anterior con este nombre, tenemos que crearlo&lt;br /&gt;
    if not miACL then&lt;br /&gt;
        miACL = aclCreate ( nombreAcl )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- y finalmente veremos el derecho&lt;br /&gt;
    aclSetRight ( miACL, nombreDerecho, acceso )&lt;br /&gt;
    -- no olvides guardar el ACL luego de haberlo modificado&lt;br /&gt;
    aclSave ()&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;setaclright&amp;quot;, setACLRight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Vea también ==&lt;br /&gt;
{{Funciones_de_ACL}}&lt;br /&gt;
&lt;br /&gt;
[[en:aclCreate]]&lt;/div&gt;</summary>
		<author><name>Kzman</name></author>
	</entry>
</feed>