Timic Posted October 7, 2010 Posted October 7, 2010 Hi, i edited from resource "AdminList" because gives me friend. This is the script: function createAdminList() level1 = { } level2 = { } level3 = { } level4 = { } level5 = { } level6 = { } level7 = { } level8 = { } level9 = { } level10 = { } for k, v in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(v)) then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 1")) then table.insert(level1, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 2")) then table.insert(level2, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 3")) then table.insert(level3, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 4")) then table.insert(level4, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 5")) then table.insert(level5, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 6")) then table.insert(level6, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 7")) then table.insert(level7, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 8")) then table.insert(level8, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 9")) then table.insert(level9, v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Level 10")) then table.insert(level10, v) end end end return level1, level2, level3, level4, level5, level6, level7, level8, level9, level10 end function AdminList(sourcePlayer, command) local level1, level2, level3, level4, level5, level6, level7, level8, level9, level10 = createAdminList() end for k, v in ipairs(level1) do outputChatBox("Admin Level1 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level1 > 0 or #level2 > 0 or #level3 > 0 or #level4 > 0 or #level5 > 0 or #level6 > 0 or #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level2) do outputChatBox("Admin Level2 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level2 > 0 or #level3 > 0 or #level4 > 0 or #level5 > 0 or #level6 > 0 or #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level3) do outputChatBox("Admin Level3 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level3 > 0 or #level4 > 0 or #level5 > 0 or #level6 > 0 or #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level4) do outputChatBox("Admin Level4 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level4 > 0 or #level5 > 0 or #level6 > 0 or #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level5) do outputChatBox("Admin Level5 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level5 > 0 or #level6 > 0 or #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level6) do outputChatBox("Admin Level6 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level6 > 0 or #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level7) do outputChatBox("Admin Level7 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level7 > 0 or #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level8) do outputChatBox("Admin Level8 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level8 > 0 or #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level9) do outputChatBox("Admin Level9 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level9 > 0 or #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end for k, v in ipairs(level10) do outputChatBox("Admin Level10 - " .. getPlayerName(v), sourcePlayer, 255, 0, 0, false) end if #level10 > 0 then outputChatBox("--------------------", sourcePlayer, 255, 0, 0, false) end addCommandHandler("admins", AdminList) Please help Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
Castillo Posted October 7, 2010 Posted October 7, 2010 this is not the correct way of asking for help! put what error you genting etc /debugscript 3 in game. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Timic Posted October 7, 2010 Author Posted October 7, 2010 i do but i dont know what to fix Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
Castillo Posted October 7, 2010 Posted October 7, 2010 what do you mean? i said to POST the error you genting. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted October 7, 2010 Posted October 7, 2010 Solid - getting, not "genting" Timic - i hope this one isn't solen from somewhere.. like your other 4 or so posts You need to prepare correct ACL. Maybe ask your friend (if he is friend and is the creator of this script - he will help you) how to do it? Post your ACL if you need further help. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Timic Posted October 8, 2010 Author Posted October 8, 2010 It's not stoled so i will ask friend Powered by My in-game nick is |Timic| addEventHandler ( "onPlayerJoin", getRootElement(), function() if (getPlayerName(source) == "Timic") then triggerClientEvent("onTimicJoin",getRootElement()) end end)
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