function hTops()
local names = {}
local numbers = {}
for char_name,number_of_kills in pairs(BangKills) do
if BangHateds[char_name] then
if not names[number_of_kills] then
numbers[#numbers+1] = number_of_kills
names[number_of_kills] = {char_name}
else
names[number_of_kills][#names[number_of_kills]+1] = char_name
end
end
end
table.sort(numbers, function(a,b)
return b < a
end)
for i=1,1, -1 do
for j=1,1 do
--foreach(numbers, print)
Gui.func1frame.htopkills1 = CreateFrame("MessageFrame", nil, Gui.func1frame)
Gui.func1frame.htopkills1:SetSize(50,100)
Gui.func1frame.htopkills1:SetPoint("TOP", -110, 40)
Gui.func1frame.htopkills1:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
Gui.func1frame.htopkills1:SetFading(false)
Gui.func1frame.htopkills1:SetSpacing(0)
Gui.func1frame.htopkills1:SetJustifyH("CENTER")
Gui.func1frame.htopkills1:AddMessage("TOP ", 1, .8, 0, 1)
Gui.func1frame.htopkills1:AddMessage("#1", 1, .7, .05, 1)
Gui.func1frame.htopkills1:AddMessage("#2", .65, .65, .65, 1)
Gui.func1frame.htopkills1:AddMessage("#3", .6, .35, 0, 1)
--
Gui.func1frame.htopkills2 = CreateFrame("MessageFrame", nil, Gui.func1frame)
Gui.func1frame.htopkills2:SetSize(50,100)
Gui.func1frame.htopkills2:SetPoint("TOP", -60, 40)
Gui.func1frame.htopkills2:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
Gui.func1frame.htopkills2:SetFading(false)
Gui.func1frame.htopkills2:SetSpacing(0)
Gui.func1frame.htopkills2:SetJustifyH("CENTER")
Gui.func1frame.htopkills2:AddMessage("BANGS", 1, .8, 0, 1)
if numbers[1] then
Gui.func1frame.htopkills2:AddMessage(numbers[1], 0, .8, 0, 1)
else
Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
end
if numbers[2] then
Gui.func1frame.htopkills2:AddMessage(numbers[2], 0, .8, 0, 1)
else
Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
end
if numbers[3] then
Gui.func1frame.htopkills2:AddMessage(numbers[3], 0, .8, 0, 1)
else
Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
end
--
Gui.func1frame.htopkills3 = CreateFrame("MessageFrame", nil, Gui.func1frame)
Gui.func1frame.htopkills3:SetSize(50,100)
Gui.func1frame.htopkills3:SetPoint("TOP", 0, 40)
Gui.func1frame.htopkills3:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
Gui.func1frame.htopkills3:SetFading(false)
Gui.func1frame.htopkills3:SetSpacing(0)
Gui.func1frame.htopkills3:SetJustifyH("CENTER")
Gui.func1frame.htopkills3:AddMessage("DEATHS", 1, .8, 0, 1)
if BangDeaths[names[numbers[1]][j]] then
Gui.func1frame.htopkills3:AddMessage(BangDeaths[names[numbers[1]][j]], .8, 0, 0, 1)
else
Gui.func1frame.htopkills3:AddMessage("0", .8, 0, 0, 1)
end
if BangDeaths[names[numbers[2]][j]] then
Gui.func1frame.htopkills3:AddMessage(BangDeaths[names[numbers[2]][j]], .8, 0, 0, 1)
else
Gui.func1frame.htopkills3:AddMessage("0", .8, 0, 0, 1)
end
if BangDeaths[names[numbers[3]][j]] then
Gui.func1frame.htopkills3:AddMessage(BangDeaths[names[numbers[3]][j]], .8, 0, 0, 1)
else
Gui.func1frame.htopkills3:AddMessage("0", .8, 0, 0, 1)
end
--
Gui.func1frame.htopkills4 = CreateFrame("MessageFrame", nil, Gui.func1frame)
Gui.func1frame.htopkills4:SetSize(250,100)
Gui.func1frame.htopkills4:SetPoint("TOP", 165, 40)
Gui.func1frame.htopkills4:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
Gui.func1frame.htopkills4:SetFading(false)
Gui.func1frame.htopkills4:SetSpacing(0)
Gui.func1frame.htopkills4:SetJustifyH("LEFT")
Gui.func1frame.htopkills4:AddMessage("WANTED NAME", 1, .8, 0, 1)
if names[numbers[1]][j] then
Gui.func1frame.htopkills4:AddMessage(names[numbers[1]][j], .9, .9, .9, 1)
else
Gui.func1frame.htopkills4:AddMessage("0", .9, .9, .9, 1)
end
if names[numbers[2]][j] then
Gui.func1frame.htopkills4:AddMessage(names[numbers[2]][j], .7, .7, .7, 1)
else
Gui.func1frame.htopkills4:AddMessage("0", .7, .7, .7, 1)
end
if names[numbers[3]][j] then
Gui.func1frame.htopkills4:AddMessage(names[numbers[3]][j], .6, .6, .6, 1)
else
Gui.func1frame.htopkills4:AddMessage("0", .6, .6, .6, 1)
end
end
end
end