it will work ? 
 
addEventHandler("onPlayerChat", root, 
function (msg, msgType) 
if msgType == 0 then 
if msg == "!admins" then 
  
function createAdminList() 
    adminlist = { } 
    supermodlist = { } 
    modlist = { } 
        for k, v in ipairs(getElementsByType("player")) do 
        if not isGuestAccount(getPlayerAccount(v)) then 
            if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Admin")) then 
                table.insert(adminlist, v) 
            elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("SuperModerator")) then 
                table.insert(supermodlist, v) 
            elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Moderator")) then 
                table.insert(modlist, v) 
            end 
        end 
    end 
    return adminlist, supermodlist, modlist 
end 
  
function AdminList(sourcePlayer, command) 
    local admins, supmods, mods = createAdminList() 
    if #admins == 0 then 
        outputConsole("#ff6600[iNFO]#00ff00 Online Admin yok!", sourcePlayer,false ) 
    else 
        for k, v in ipairs(admins) do 
            outputChatBox("Admin : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) 
        end 
    end 
  
    if #supmods == 0 then 
        outputConsole("#ff6600[iNFO]#00ff00 Online SuperModerator yok!", sourcePlayer,false ) 
    else 
        for k, v in ipairs(supmods) do 
            outputChatBox("SuperModerator : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) 
        end 
    end 
  
    if #mods == 0 then 
        outputConsole("#ff6600[iNFO]#00ff00 Online Moderator yok!", sourcePlayer,false ) 
    else 
        for k, v in ipairs(mods) do 
            outputChatBox("Moderator : " .. getPlayerName(v), getRootElement (), 16, 160, 17, false) 
        end 
    end 
end 
  
end 
end 
end 
)