View Single Post
02/20/19, 04:10 PM   #22
OlafVeschiy
Join Date: Feb 2019
Posts: 18
Code:
    HideMe = {}
    HideMe.name = "HideMe"
     
        local function Addon_Loaded(eventCode, addOnName)
            if (addOnName == "HideMe") then
				ZO_MapPin0:SetHidden(true) 
				ZO_MapPin0.SetHidden = function()
				end
				ZO_PreHook("ZO_WorldMap_PanToPlayer", function()
				return true
				end
				)
            end
            ZO_PreHook("IsMapLocationVisible", function()
                 if GetParentZoneId ~= nil then
                     local zoneId, subZoneId
                     zoneId = GetParentZoneId ()
                     if zoneId ~= nil then
                          local zoneIndex = GetUnitZoneIndex("player")
                          if zoneIndex ~= nil then
                                subZoneId = GetZoneId(zoneIndex)
                                if subZoneId ~= nil then return true end
                          end
                     end
                 end
                 return false
            end)
        end
		        
        EVENT_MANAGER:RegisterForEvent("HideMe", EVENT_ADD_ON_LOADED, Addon_Loaded)
full code of HideMe4
  Reply With Quote