AclGroupGetName: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
Line 20: Line 20:


==Example==  
==Example==  
<!-- Explain what the example is in a single sentance -->
This example outputs to the console that "Admin's are ready to watch".  
This example does...
<syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,function()
<!-- 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 -->
outputConsole(aclGetGroupName(aclGetGroup("Admin")).."' are ready to watch :)",root)
<syntaxhighlight lang="lua">
end)
--TODO
</syntaxhighlight>
</syntaxhighlight>



Revision as of 00:20, 26 April 2012

Accessories-text-editor.png Script Example Missing Function AclGroupGetName needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This function is used to get the name of the given ACL group.

Syntax

string aclGroupGetName ( aclGroup )

Required Arguments

  • aclGroup: The ACl group to get the name of

Returns

Returns the name of the given ACL group as a string if successfull, false/nil if the aclGroup is invalid or it fails for some other reason.

Example

This example outputs to the console that "Admin's are ready to watch".

addEventHandler("onResourceStart",resourceRoot,function()
	outputConsole(aclGetGroupName(aclGetGroup("Admin")).."' are ready to watch :)",root)
end)

See Also