abu5lf Posted March 15, 2012 Posted March 15, 2012 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 : لتواصل سكايب
myonlake Posted March 15, 2012 Posted March 15, 2012 (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 March 15, 2012 by Guest If I helped you, please click the like button on the right Thanks!
abu5lf Posted March 15, 2012 Author Posted March 15, 2012 He repeated my name twice * Admins: CX.83, | CX.83,* SuperModerator: ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
myonlake Posted March 15, 2012 Posted March 15, 2012 Copy the script again, let me know. If I helped you, please click the like button on the right Thanks!
Castillo Posted March 15, 2012 Posted March 15, 2012 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. Education is the most powerful weapon which you can use to change the world.
myonlake Posted March 15, 2012 Posted March 15, 2012 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!
Castillo Posted March 15, 2012 Posted March 15, 2012 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. Education is the most powerful weapon which you can use to change the world.
mjau Posted March 15, 2012 Posted March 15, 2012 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
abu5lf Posted March 16, 2012 Author Posted March 16, 2012 Thanks for help ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
myonlake Posted March 16, 2012 Posted March 16, 2012 No problem. If I helped you, please click the like button on the right Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now