damien111 Posted August 13, 2012 Posted August 13, 2012 (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 August 13, 2012 by Guest
TAPL Posted August 13, 2012 Posted August 13, 2012 not understand anything at all the subject say other thing and the topic itself say another thing please explain better.
damien111 Posted August 13, 2012 Author Posted August 13, 2012 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
TAPL Posted August 13, 2012 Posted August 13, 2012 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.
damien111 Posted August 13, 2012 Author Posted August 13, 2012 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.
robhol Posted August 13, 2012 Posted August 13, 2012 Um, unless you use getAttachedElements, that's gonna kill every blip on the entire server, which is probably not a good thing.
damien111 Posted August 13, 2012 Author Posted August 13, 2012 yeah. i really want to just delete the one persons blip. Is that hard?
Castillo Posted August 13, 2012 Posted August 13, 2012 addCommandHandler ( "blip", function ( thePlayer ) for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do if ( getElementType ( element ) == "blip" ) then destroyElement ( element ) end end end )
damien111 Posted August 14, 2012 Author Posted August 14, 2012 thanks and is there a way to restore it. like createElement or something?
Castillo Posted August 14, 2012 Posted August 14, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now