SnoopCat Posted June 15, 2011 Posted June 15, 2011 hi i have this script downloaded by comunity and i edited a little but they dont works now idk why can someone help me ? function createAdminList() adminlist = { } supermodlist = { } modlist = { } juniorslist = { } 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) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("juniors")) then table.insert(juniorslist, v) end end end return adminlist, supermodlist, modlist, juniorslist, end function AdminList(sourcePlayer, command) local admins, supmods, mods, juniors = createAdminList() if #admins == 0 then outputConsole("No hay usuario De nivel 4", sourcePlayer,false ) else for k, v in ipairs(admins) do outputChatBox("Nivel 4: " .. getPlayerName(v), getRootElement (), 255, 0, 0, false) end end if #supmods == 0 then outputConsole("No hay usuario De Nivel 3", sourcePlayer,false ) else for k, v in ipairs(supmods) do outputChatBox("Nivel 3: " .. getPlayerName(v), getRootElement (), 0, 255, 0, false) end end if #mods == 0 then outputConsole("No hay usuarios De nivel 2", sourcePlayer,false ) else for k, v in ipairs(mods) do outputChatBox("Nivel 2: " .. getPlayerName(v), getRootElement (), 255, 0, 255, false) end end if #juniors == 0 then outputConsole("No hay Juniors", sourcePlayer,false ) else for k, v in ipairs(juniors) do outputChatBox("Nivel Junior: " .. getPlayerName(v), getRootElement (), 255, 255, 0, false) end end outputChatBox("--------------------", sourcePlayer, 0, 255, 0, false) outputConsole("nothing", sourcePlayer) end addCommandHandler("admins", AdminList) addCommandHandler("lvl", AdminList) addCommandHandler("lvls", AdminList) addCommandHandler("LVL", AdminList) addCommandHandler("LVLS", AdminList) VISIT TSW RACING SERVER http://tswracing.net/
Castillo Posted June 15, 2011 Posted June 15, 2011 function createAdminList() adminList = { } adminList["admin"] = {} adminList["super_mod"] = {} adminList["mod"] = {} adminList["junior"] = {} 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["admin"], v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("SuperModerator")) then table.insert(adminList["super_mod"], v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("Moderator")) then table.insert(adminList["mod"], v) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("juniors")) then table.insert(adminList["junior"], v) end end end return adminList end function AdminList(sourcePlayer, command) local adminList = createAdminList() if #adminList["admin"] == 0 then outputConsole("No hay usuario De nivel 4", sourcePlayer,false ) else for k, v in ipairs(adminList["admin"]) do outputChatBox("Nivel 4: " .. getPlayerName(v), getRootElement (), 255, 0, 0, false) end end if #adminList["super_mod"] == 0 then outputConsole("No hay usuario De Nivel 3", sourcePlayer,false ) else for k, v in ipairs(adminList["super_mod"]) do outputChatBox("Nivel 3: " .. getPlayerName(v), getRootElement (), 0, 255, 0, false) end end if #adminList["mod"] == 0 then outputConsole("No hay usuarios De nivel 2", sourcePlayer,false ) else for k, v in ipairs(adminList["mod"]) do outputChatBox("Nivel 2: " .. getPlayerName(v), getRootElement (), 255, 0, 255, false) end end if #adminList["junior"] == 0 then outputConsole("No hay Juniors", sourcePlayer,false ) else for k, v in ipairs(adminList["junior"]) do outputChatBox("Nivel Junior: " .. getPlayerName(v), getRootElement (), 255, 255, 0, false) end end outputChatBox("--------------------", sourcePlayer, 0, 255, 0, false) end addCommandHandler("admins", AdminList) addCommandHandler("lvl", AdminList) addCommandHandler("lvls", AdminList) addCommandHandler("LVL", AdminList) addCommandHandler("LVLS", AdminList) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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