Jump to content

Removing A Players Blip [HELP]


damien111

Recommended Posts

You want delete the blip or hide it?

You want the blip deleted/hidden for only who wrote the command or for all players?

This for delete

addCommandHandler("xxx", 
function() 
     for i,blip in ipairs(getElementsByType("blip")) do 
          destroyElement(blip) 
     end 
end) 

if you want it for only who wrote the command, put it client side.

if you want it for all players, put it server side.

Link to comment
addCommandHandler ( "blip", 
    function ( thePlayer ) 
        for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do 
            if ( getElementType ( element ) == "blip" ) then 
                destroyElement ( element ) 
            end 
        end 
    end 
) 

Link to comment
addCommandHandler ( "blip", 
    function ( thePlayer ) 
        for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do 
            if ( getElementType ( element ) == "blip" ) then 
                setElementVisibleTo ( element, root, ( not isElementVisibleTo ( element ) ) ) 
            end 
        end 
    end 
) 

Not sure if that'll work though.

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...