Jump to content

Blips visible in F11


UnG//Macaus

Recommended Posts

I use this script to hide blips F11, I do not know if this is the best way to do this but the problem is that wisdom works for all blips. How can I add a table for me to choose the blips that will disappear?

addEventHandler("onClientResourceStart", getRootElement(), function() 
    setTimer(function() 
        local localX, localY = getElementPosition(localPlayer) 
        for _, blip in pairs(getElementsByType("blip")) do 
            local blipX, blipY = getElementPosition(blip) 
            if(getDistanceBetweenPoints2D(localX, localY, blipX, blipY) > 500) then 
                local icon = getElementData(blip, "IconID") 
                if not icon then 
                    setElementData(blip, "IconID", getBlipIcon(blip), false) 
                end 
                setBlipIcon(blip, 0) 
                setBlipColor(blip, 255, 255, 255, 0)  
            else 
                local icon = getElementData(blip, "IconID") 
                if icon then 
                    setBlipIcon(blip, icon) 
                end 
            end 
        end 
    end, 500, 0)   
end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...