PHP код:
do
local f = CreateFrame("frame","ArenaTeamsInfo",UIParent)
f:SetSize(80,40)
f:SetPoint("CENTER")
f:SetMovable(true); f:SetClampedToScreen(true); f:EnableMouse(true)
f:SetScript("OnMouseDown",function(self,button) self:StartMoving() end)
f:SetScript("OnMouseUp",function(self,button) self:StopMovingOrSizing() end)
f:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 0, edgeSize = 1, insets = { left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor(.2,.2,.2,.5)
f:SetBackdropBorderColor(0,0,0,1)
f.t = f:CreateFontString(nil,"ARTWORK","GameFontWhiteSmall")
f.t:SetAllPoints()
local function u()
local _,_,_,_,_,_,_,_,_,rank2c,rating2c = GetArenaTeam(1)
local _,_,_,_,_,_,_,_,_,rank3c,rating3c = GetArenaTeam(2)
local _,_,_,_,_,_,_,_,_,rank5c,rating5c = GetArenaTeam(3)
f.t:SetText(("2v2: %d (#%d)\n3v3: %d (#%d)\nSoloq: %d (#%d)"):format(rating2c or 0,rank2c or 0,rating3c or 0,rank3c or 0,rating5c or 0,rank5c or 0))
end
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent",u)
hooksecurefunc(PVPTeamDetailsRating,'SetText',u)
end