Thread: Taints
View Single Post
04-16-11, 06:04 AM   #7
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Sniffles View Post
No something like this:

Code:
...
...

FrameName:SetScript("OnEvent", function(self, event, ...)
	if (event == "PLAYER_REGEN_DISABLED") then
		frame:Hide()
	elseif (event == "PLAYER_REGEN_ENABLED") then
		frame:Show()
	end
end)
Hm, i use atm.
Code:
local f = CreateFrame('Frame')
f:RegisterEvent('PLAYER_LOGIN')
f:SetScript('OnEvent', function(_, event, ...)
    if (event == 'PLAYER_LOGIN') then
           frame:Hide()
    end
end)
  Reply With Quote