View Single Post
03/17/23, 10:43 AM   #5
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 20
Originally Posted by Masteroshi430 View Post
Show the code if you want some help then.
NiceT = {
}
NiceT.name = "NiceT"

function NiceT.Initialize()
d("Thanks for using NiceT!")
NiceT.ZN = GetUnitZone("player") --just trying
d(NiceT.ZN)
EVENT_MANAGER:RegisterForEvent(NiceT.name, EVENT_ZONE_CHANGED, NiceT.OnPlayerZoneChanged)
EVENT_MANAGER:RegisterForEvent(NiceT.name, EVENT_ZONE_UPDATE , NiceT.OnPlayerZoneU)
end
function NiceT.OnAddOnLoaded(event, addonName)
if addonName == NiceT.name then
NiceT.Initialize()
end
end




function NiceT.OnPlayerZoneChanged( eventCode, zoneName, subZoneName, newSubzone, zoneId, subZoneId)
d("HELLO2")
end
function NiceT.OnPlayerZoneU( eventCode, unitTag, newZoneName)
d("HELLO1")
end


EVENT_MANAGER:RegisterForEvent(NiceT.name, EVENT_ADD_ON_LOADED, NiceT.OnAddOnLoaded)
  Reply With Quote