View Single Post
03-19-22, 10:40 PM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,362
Originally Posted by muleyo View Post
Hi,

I'd like to hide names from nameplates except from my current target. Unfortunately, I only found code to hide all player names.

Code:
hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
	if strsub(frame.unit, 1, 9) == "nameplate" then
		frame.name:Hide()
	end
end)
Code:
hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
  if strsub(frame.unit, 1, 9) == "nameplate" then
    if not UnitIsUnit(frame.unit, "target") then
      frame.name:Hide()
    end
  end
end)
Untested
  Reply With Quote