GetAccountsRanks: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
===Required Arguments===
===Required Arguments===
* '''accountName''': A string containing account name of a player you want to know his groups.
* '''accountName''': A string containing account name of a player you want to know his groups.
==Code==
<syntaxhighlight lang="lua">
function getAccountRanks( accName ) -- getAccountRanks Function By MouNiR.Dz
    local groups = aclGroupList() -- Acl group list
    for i,v in ipairs(groups) do -- table
        if isObjectInACLGroup("user."..accName,v) then -- if he have groups
            outputChatBox( " there are "..aclGroupGetName(v).." group for the account ("..accName..") ",thePlayer) -- telling the player about his groups
        end -- end for if
    end -- end for
end -- end function
</syntaxhighlight>

Revision as of 12:43, 29 August 2020

Syntax

player getAccountsRanks ( string accountName )

Required Arguments

  • accountName: A string containing account name of a player you want to know his groups.

Code

function getAccountRanks( accName ) -- getAccountRanks Function By MouNiR.Dz
    local groups = aclGroupList() -- Acl group list
    for i,v in ipairs(groups) do -- table
        if isObjectInACLGroup("user."..accName,v) then -- if he have groups
            outputChatBox( " there are "..aclGroupGetName(v).." group for the account ("..accName..") ",thePlayer) -- telling the player about his groups
        end -- end for if
    end -- end for 
end -- end function