Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Players = {}
- local Group = "razetheworld"
- local num = 1
- local function Success( str, len, head, http )
- str = string.Replace(str, "</steamID64>", "")
- local tbl = string.Explode("<steamID64>", str)
- table.remove(tbl, 1)
- tbl[#tbl] = string.Replace(tbl[#tbl], "</members>", "")
- tbl[#tbl] = string.Replace(tbl[#tbl], "</memberList>", "")
- for k, v in pairs(tbl) do
- table.insert(Players, v)
- end
- end
- local function Success2( str, len, head, http )
- local tbl = string.Explode("<memberCount>", str)
- table.remove(tbl, 1)
- tbl = string.Explode("</memberCount>", tbl[2])
- num = string.Replace(tbl[1], "</memberCount>", "")
- num = math.Clamp(math.Round(tonumber(num) / 1000), 1, 1000)
- compile()
- end
- http.Fetch("http://steamcommunity.com/groups/" .. Group .. "/memberslistxml/?xml=1", Success2, nil)
- function compile()
- for i=1,num do
- http.Fetch("http://steamcommunity.com/groups/" .. Group .. "/memberslistxml/?xml=1&p=" .. i, Success, nil)
- end
- end
- function Wall()
- startTime = CurTime()
- local w, h = ScrW(), ScrH()
- local x, y = 0, 0
- local size = 64
- local DFrame1 = vgui.Create("DFrame")
- DFrame1:SetPos(0, 0)
- DFrame1:SetSize(w, h)
- DFrame1:SetTitle(#Players .. " users in " .. Group .. " steam group")
- DFrame1:SetDraggable(false)
- DFrame1:ShowCloseButton(true)
- DFrame1:MakePopup()
- DFrame1.Paint = function()
- draw.RoundedBox(2, 0, 0, DFrame1:GetWide(), DFrame1:GetTall(), Color(35, 35, 35))
- draw.RoundedBox(2, 0, 0, DFrame1:GetWide(), 25, Color(255, 104, 104))
- end
- DFrame1.lblTitle:SetFont("Trebuchet24")
- local DScrollPanel1 = vgui.Create("DScrollPanel", DFrame1)
- DScrollPanel1:SetPos(0, 25)
- DScrollPanel1:SetSize(w, h - 25)
- DScrollPanel1:GetVBar():SetSize(DScrollPanel1:GetVBar():GetWide() / 2, DScrollPanel1:GetVBar():GetTall())
- DScrollPanel1:GetVBar().Paint = function()
- draw.RoundedBox(2, 0, 0, DScrollPanel1:GetVBar():GetWide(), DScrollPanel1:GetVBar():GetTall(), Color(35, 35, 35))
- end
- DScrollPanel1:GetVBar().btnUp:SetSize(DScrollPanel1:GetVBar().btnUp:GetWide() / 2, DScrollPanel1:GetVBar().btnUp:GetTall())
- DScrollPanel1:GetVBar().btnUp.Paint = function()
- draw.RoundedBox(2, 0, 0, DScrollPanel1:GetVBar().btnUp:GetWide(), DScrollPanel1:GetVBar().btnUp:GetTall(), Color(65, 65, 65))
- end
- DScrollPanel1:GetVBar().btnDown:SetSize(DScrollPanel1:GetVBar().btnDown:GetWide() / 2, DScrollPanel1:GetVBar().btnDown:GetTall())
- DScrollPanel1:GetVBar().btnDown.Paint = function()
- draw.RoundedBox(2, 0, 0, DScrollPanel1:GetVBar().btnDown:GetWide(), DScrollPanel1:GetVBar().btnDown:GetTall(), Color(65, 65, 65))
- end
- DScrollPanel1:GetVBar().btnGrip:SetSize(DScrollPanel1:GetVBar().btnGrip:GetWide() / 2, DScrollPanel1:GetVBar().btnGrip:GetTall())
- DScrollPanel1:GetVBar().btnGrip.Paint = function()
- draw.RoundedBox(2, 0, 0, DScrollPanel1:GetVBar().btnGrip:GetWide(), DScrollPanel1:GetVBar().btnGrip:GetTall(), Color(255, 104, 104))
- end
- for k, v in pairs(Players) do
- local AvatarImage1 = vgui.Create("AvatarImage", DScrollPanel1)
- AvatarImage1:SetPos(x, y)
- AvatarImage1:SetSteamID(v, size)
- AvatarImage1:SetSize(size, size)
- local DButton1 = vgui.Create("DButton", AvatarImage1)
- DButton1:SetPos(0, 0)
- DButton1:SetSize(64, 64)
- DButton1:SetText("")
- DButton1:SetToolTip("http://www.steamcommunity.com/profiles/" .. v .. "\n" .. util.SteamIDFrom64(v))
- DButton1.Paint = function() end
- DButton1.DoClick = function()
- gui.OpenURL("http://www.steamcommunity.com/profiles/" .. v)
- end
- DButton1.DoRightClick = function()
- //("http://www.steamcommunity.com/profiles/" .. v) -- I forget what the copy text function is
- end
- if x + (size + 1) >= w then
- x, y = 0, y + (size + 1)
- else
- x = x + (size + 1)
- end
- end
- DFrame1.btnMaxim:SetVisible(false)
- DFrame1.btnMinim:SetVisible(false)
- end
Add Comment
Please, Sign In to add comment