WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Hide realmname+pvp number (https://www.wowinterface.com/forums/showthread.php?t=58147)

abipupu 08-13-20 09:17 AM

Hide realmname+pvp number
 
-----ARENA NUMBER (1 2 3 at nameplates)------

local U=UnitIsUnit hooksecurefunc("CompactUnitFrame_UpdateName",function(F)if IsActiveBattlefieldArena()and F.unit:find( "nameplate")then for i=1,5 do if U( F.unit ,"arena"..i)then F.name:SetText(i)F.name:SetTextColor(1 ,1,0)break end end end end)

----------HIDE REALMNAME (Replace -Realmname to (*) )-----------
hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
if ShouldShowName(frame) then
if frame.optionTable.colorNameBySelection then
frame.name:SetText(GetUnitName(frame.unit))
end
end
end)

this two scripts wont work together, please help fix that . i have no clue

Kanegasi 08-14-20 12:21 AM

Lua Code:
  1. hooksecurefunc("CompactUnitFrame_UpdateName",function(frame)
  2.     local arena
  3.     if IsActiveBattlefieldArena() and frame.unit:find("nameplate") then
  4.         for i=1,5 do
  5.             if UnitIsUnit(frame.unit,"arena"..i) then
  6.                 frame.name:SetText(i)
  7.                 frame.name:SetTextColor(1,1,0)
  8.                 arena=true
  9.                 break
  10.             end
  11.         end
  12.     end
  13.     if not arena and ShouldShowName(frame) then
  14.         if frame.optionTable.colorNameBySelection then
  15.             frame.name:SetText(GetUnitName(frame.unit))
  16.         end
  17.     end
  18. end)

abipupu 08-14-20 04:28 AM

Quote:

Originally Posted by Kanegasi (Post 336603)
Lua Code:
  1. hooksecurefunc("CompactUnitFrame_UpdateName",function(frame)
  2.     local arena
  3.     if IsActiveBattlefieldArena() and frame.unit:find("nameplate") then
  4.         for i=1,5 do
  5.             if UnitIsUnit(frame.unit,"arena"..i) then
  6.                 frame.name:SetText(i)
  7.                 frame.name:SetTextColor(1,1,0)
  8.                 arena=true
  9.                 break
  10.             end
  11.         end
  12.     end
  13.     if not arena and ShouldShowName(frame) then
  14.         if frame.optionTable.colorNameBySelection then
  15.             frame.name:SetText(GetUnitName(frame.unit))
  16.         end
  17.     end
  18. end)

thanks so much, its work perfect


All times are GMT -6. The time now is 06:14 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI