SnoopCat Posted October 5, 2011 Posted October 5, 2011 hello there i have a script that add a admins list or lvl lists when u thype some comands it appears on chatbox, its only a Serverside lua, when i add new lvls it doesnt works and seems to be all ok can someone help me? function createAdminList() adminList = { } adminList["admin"] = {} adminList["super_mod"] = {} adminList["mod"] = {} adminList["junior"] = {} adminList["DueñoClan"] = {} 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) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(v)), aclGetGroup("DueñoClan")) then table.insert(adminList["DueñoClan"], v) end 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 if #adminList["DueñoClan"] == 0 then outputConsole("No hay Dueños de clanes", sourcePlayer,false ) else for k, v in ipairs(adminList["DueñoClan"]) do outputChatBox("DueNos Clanes: " .. getPlayerName(v), getRootElement (), 0, 0, 255, 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) VISIT TSW RACING SERVER http://tswracing.net/
Ignition Posted October 5, 2011 Posted October 5, 2011 Maybe try changing the Command handlers, Or Making sure your Server ACL Corresponds with the script, Those are probably the main 2 reasons there script isn't working. First check your Server ACL. LOL At This. Lmfao.
SnoopCat Posted October 5, 2011 Author Posted October 5, 2011 solved! VISIT TSW RACING SERVER http://tswracing.net/
Ignition Posted October 5, 2011 Posted October 5, 2011 May i asked how you solved, so I can know what mistake i made or something? LOL At This. Lmfao.
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