damien111

Removing A Players Blip [HELP]

Recommended Posts

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

Share this post


Link to post

not understand anything at all

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

please explain better.

Share this post


Link to post

Sorry I was on a tablet and was very tired. Check the edit. Basically I need to make a script that deletes a players blip on command

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


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

Share this post


Link to post
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.

Share this post


Link to post

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.