[DKR]silverfang Posted July 8, 2008 Share Posted July 8, 2008 Is it possible to hide a player's blip and name from the map - or make it invisible to other players? If so could someone please tell me how, I've looked through the wiki but can't work out a way to do it. cheers in advance. Link to comment
Gamesnert Posted July 8, 2008 Share Posted July 8, 2008 If you haven't enabled "playerblips" resource and you don't have them in your code, they're not in the game... And name? Make a for loop for players and use "setNametagText" or something like that. Link to comment
[DKR]silverfang Posted July 8, 2008 Author Share Posted July 8, 2008 If you haven't enabled "playerblips" resource and you don't have them in your code, they're not in the game...And name? Make a for loop for players and use "setNametagText" or something like that. as regards to the playerblips its only for certain players that i want the blips to disapear, so if u set namtag invisible then it wont show on the map? Link to comment
Gamesnert Posted July 9, 2008 Share Posted July 9, 2008 Nametag visible on the MAP? How you did that... Anyway, you can do setElementData on the player in when the blip is created, then when you want to make it disappear. You retrieve it, do destroyElement, and off the blip goes! (I think...) EDIT: Oh lol, forgot about a better method: function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end And add a command handler or anything to make it easy to aim for certain players. Link to comment
[DKR]silverfang Posted July 9, 2008 Author Share Posted July 9, 2008 Thanks i think that's just what I need. As for the players name visible on the map, i'm talking about the freeroam map. Link to comment
Gamesnert Posted July 9, 2008 Share Posted July 9, 2008 Aaaah! The map of the freeroam resource! I think you'll need to tweak the resource for that... Link to comment
acp___(PL) Posted September 27, 2009 Share Posted September 27, 2009 Blips are created but doesn't removed ... col_blip = createColSphere ( -84.0570, -2765.6428, 69.9104, 400) function create_blip (pla) createBlip ( -307.2204, -2752.5786, 70.8629, 47, 1, pla ) createBlip ( -310.3098, -2857.3950, 41.0316, 47, 1, pla ) createBlip ( -76.7017, -2877.6662, 38.5667, 47, 1, pla ) createBlip ( 54.8855, -2651.9997, 39.4814, 47, 1, pla ) createBlip ( -50.3280, -2481.7639, 35.7425, 47, 1, pla ) createBlip ( -64.4422, -2580.7946, 70.466, 47, 1, pla ) createBlip ( -62.2048, -2740.3339, 73.025, 47, 1, pla ) end addEventHandler ( "onColShapeHit", col_blip, create_blip ) function destroy_blip (pla) local attached = getAttachedElements ( pla ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end addEventHandler ( "onColShapeLeave", col_blip, destroy_blip ) Link to comment
Gamesnert Posted September 27, 2009 Share Posted September 27, 2009 Basically because they aren't even attached and you're trying to remove attached blips. What exactly do you want to do with those blips? Link to comment
acp___(PL) Posted September 27, 2009 Share Posted September 27, 2009 the first function: as I enter into a certain area there are Blips the second function: I wont to remove this blips Blips are visible only to the person in the zone! Link to comment
50p Posted September 27, 2009 Share Posted September 27, 2009 the first function: as I enter into a certain area there are Blipsthe second function: I wont to remove this blips Blips are visible only to the person in the zone! Use https://wiki.multitheftauto.com/index.ph ... AttachedTo instead. Link to comment
acp___(PL) Posted September 27, 2009 Share Posted September 27, 2009 May not be using the proposed feature ... This should probably act, but I do not know why it does not want to ... function destroy_blip (pla) local blipsZ = getElementsByType( "blip" ) for i,elemetZ in ipairs(blipsZ) do if getElementID(elemetZ) == 47 then destroyElement(elemetZ) end end end addEventHandler ( "onColShapeLeave", col_blip, destroy_blip ) Link to comment
Gamesnert Posted September 27, 2009 Share Posted September 27, 2009 if getElementID(elemetZ) == 47 then Should be if getBlipIcon(elemetZ) == 47 then Link to comment
acp___(PL) Posted September 28, 2009 Share Posted September 28, 2009 thank you very much for your help now everything works as I wanted but the console reports a warning I attach this part of the script if someone will need use this col_blip = createColSphere ( -84.0570, -2765.6428, 69.9104, 500) function create_blip (pla) createBlip ( -307.2204, -2752.5786, 70.8629, 47, 1, pla ) createBlip ( -310.3098, -2857.3950, 41.0316, 47, 1, pla ) createBlip ( -76.7017, -2877.6662, 38.5667, 47, 1, pla ) createBlip ( 54.8855, -2651.9997, 39.4814, 47, 1, pla ) createBlip ( -50.3280, -2481.7639, 35.7425, 47, 1, pla ) createBlip ( -64.4422, -2580.7946, 70.466, 47, 1, pla ) createBlip ( -62.2048, -2740.3339, 73.025, 47, 1, pla ) end addEventHandler ( "onColShapeHit", col_blip, create_blip ) function destroy_blip (pla) local blipsZ = getElementsByType( "blip" ) for i,elemetZ in ipairs(blipsZ) do if getBlipIcon(elemetZ) == 47 then destroyElement(elemetZ) end end end addEventHandler ( "onColShapeLeave", col_blip, destroy_blip ) 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