Jump to content

Removing A Players Blip [HELP]


damien111

Recommended Posts

Posted (edited)

I need help creating a script that hides a players blip. so far the only thing i can do is remove the nametag. thanks in advance! Also can someone check my TaxiScript Post! Thanks

Edited by Guest
Posted

not understand anything at all

the subject say other thing and the topic itself say another thing

please explain better.

Posted

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.

Posted

I mean. I want to delete the blip of the player who's does the command , and it applys to everyone. So basicàlly I wanna hide the blip that marks the player.

Posted

Um, unless you use getAttachedElements, that's gonna kill every blip on the entire server, which is probably not a good thing.

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

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

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