Jump to content

delete player blip and nametag


5150

Recommended Posts

sorry ive put about 15 trillion posts on this forum, but ehh you guys are awesome. could someone help me with a script deleting a players blip on the minimap (and f11 if possible), and deleting a players nametag when they hit a marker? i want them to be completely off the radar and stealthy :) also is there a way to make it so when they die, their tag and blip reappear so i dont have to restart the resource? if anyone could help me that would be awesome.

thanks

Link to comment
A program will work just the way you programmed it so the answer is no. You need to recreate the blip and attach it to players using
createBlipAttachedTo 

Exactly! when player die, recreate it, just

addEventHandler("onPlayerWasted", root, 
    function () 
    --blip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] ) 
    createBlipAttachedTo(source,0,1) 
    end 
) 

Link to comment

Blips are provided by a default resource named "playerblips", to get into some kind of stealth mode you could use a modified version of that resource, like this one which hides your blip as soon the element data "anon" is set to true, making it easy to maintain. Although it's not exactly what your looking for it's fairly close to it.

setPlayerNametagShowing 

Can be set at the same time as the resource decides whether to hide or show the blip, and that's pretty much all it takes to accomplish what you're trying to do.

Link to comment
setPlayerNametagShowing 
--Blip removal | Remove it from freeroam, or... 
for k,element in ipairs(getAttachedElements(player)) do 
 if getElementType(element) == 'blip' then 
 destroyElement(element) 
 end 
end 

tried the script, didnt work. i added it to a zip file, put a working meta in, and added it to the server but it didnt do anything :P

Link to comment
setPlayerNametagShowing 
--Blip removal | Remove it from freeroam, or... 
for k,element in ipairs(getAttachedElements(player)) do 
 if getElementType(element) == 'blip' then 
 destroyElement(element) 
 end 
end 

tried the script, didnt work. i added it to a zip file, put a working meta in, and added it to the server but it didnt do anything :P

Because an error in lua stops reading.

Linea 1 undefined variable as function (setPlayerNametagShowing are function, read wiki), my script perfectly works without first line

Link to comment

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