Jump to content

onLine Admins


abu5lf

Recommended Posts

Posted
admins = "" 
SuperModerator = "" 
  
  
  
function processAdminList() 
   players = getElementsByType ( "player" ) 
   admins = "" 
   SuperModerator = "" 
   for k,v in ipairs">ipairs(players) do 
      local accountname = "" 
      if (isGuestAccount(getPlayerAccount(v)) == false) then 
         accountname = getAccountName (getPlayerAccount(v)) 
                if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 
                  
                if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "SuperModerator" ) )  
                 then 
            if (admins == "") then 
               admins = getPlayerName(v,o) 
               admins = admins .. " | " .. getPlayerName(v,o) 
             elseif (SuperModerator == "")  
            then   SuperModerator = getPlayerName(v,i)  
               SuperModerator = SuperModerator .. " | " .. getPlayerName(v,i) 
end 
            end 
         end 
       
  
   outputChatBox( "* Admins  :  #307D7E".. tostring">tostring( admins ), getRootElement(), 255, 255, 0 ,true) 
     outputChatBox( "* SuperModerator  :    #307D7E".. tostring">tostring( SuperModerator ), getRootElement(), 255, 255, 0 ,true) 
  
end 
end 
end 

Do not show me the right way

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted (edited)

Try this.

I had to remove the lua-tags since they're bugged.

local admins = "" 
local SuperModerator = "" 
  
function processAdminList() 
    players = getElementsByType("player") 
    for k,v in ipairs(players) do 
        local accountname = "" 
        if not isGuestAccount(getPlayerAccount(v)) then 
            local accountname = getAccountName(getPlayerAccount(v)) 
            if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then 
                if admins == "" then 
                    admins = admins .. " | " .. getPlayerName(v) 
                end 
            end 
             
            if isObjectInACLGroup("user." .. accountname, aclGetGroup("SuperModerator")) then 
                if SuperModerator == "" then 
                    SuperModerator = SuperModerator .. " | " .. getPlayerName(v) 
                end 
            end 
        end 
    end 
    outputChatBox("* Admins: #307D7E" .. tostring(admins), root, 255, 255, 0, true) 
    outputChatBox("* SuperModerator: #307D7E" .. tostring(SuperModerator), root, 255, 255, 0, true) 
end 

Edited by Guest

If I helped you, please click the like button on the right ;) Thanks!

Posted

He repeated my name twice

* Admins: CX.83, | CX.83,

* SuperModerator:

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted
local admins = {} 
local superModerators = {} 
  
function processAdminList() 
    admins = {} 
    superModerators = {} 
    for index, player in ipairs">ipairs( getElementsByType ( "player" ) ) do 
        if not isGuestAccount ( getPlayerAccount ( player ) ) then 
            local accountName = getAccountName ( getPlayerAccount ( player ) ) 
            if isObjectInACLGroup ("user.".. accountName, aclGetGroup ( "Admin" ) ) then 
                table.insert( admins, getPlayerName ( player ) ) 
            elseif isObjectInACLGroup ("user.".. accountName, aclGetGroup ( "SuperModerator" ) ) then 
                table.insert( superModerators, getPlayerName ( player ) ) 
            end 
        end 
    end 
    outputChatBox("* Admins: #307D7E".. table.concat ( admins, "," ), root, 255, 255, 0, true) 
    outputChatBox("* SuperModerator: #307D7E" .. table.concat ( superModerators, "," ), root, 255, 255, 0, true) 
end 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Solidsnake, I know you like to help, but I am preferring to let the first answerer solve the situation - this is not a competition, even though you and Kenix make it look like one.

If I helped you, please click the like button on the right ;) Thanks!

Posted

I never said it was, but two options are better than one, right? I know that Kenix make's it look like a competition, but I don't.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Solidsnake, I know you like to help, but I am preferring to let the first answerer solve the situation - this is not a competition, even though you and Kenix make it look like one.

if you got a version of the code wich is bettter(shorter faster etc) then its no rule saying your not allowed to post it

n-560x95_E60303_FFFFFF_030303_FF0303.png
Posted

Thanks for help

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...