kev|GER Posted August 1, 2011 Share Posted August 1, 2011 Hello, I've got a couple of questions, I'd like to know how to delete a blip attached to a player, and a way of getting it back, matching the team color and stuff. I've tried destroyBlipAttachedTo, as mentioned in some topics over this forum, but that function doesn't even exists. I've seen examples of removing the blip when the player connects, but what about when a command is activated? Like a script that would make the player lose its blip, and then , with a toggle, attach the blip back? The attachment of the blip is easy, as it would only be createBlipAttachedTo, but I'd like to know how how get the blip that is a attached to the source, and use destroyElement to destroy it. Thanks in advance, -kev Link to comment
JR10 Posted August 2, 2011 Share Posted August 2, 2011 There is no destroyBlipAttachedTo, if you have seen it then it's a custom function: function destroyBlipAttachedTo(player) local attachedElements = getAttachedElements(player) if attachedElements then for i, attachedElement in ipairs(attachedElements) do if getElementType(attachedElement) == "blip" then destroyElement(attachedElement) end end end end And just use createBlipAttachedTo to create the blip again. Link to comment
kev|GER Posted August 2, 2011 Author Share Posted August 2, 2011 Thanks for such the quick answers. Link to comment
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