5150 Posted September 25, 2015 Posted September 25, 2015 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
UserToDelete Posted September 26, 2015 Posted September 26, 2015 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
5150 Posted September 27, 2015 Author Posted September 27, 2015 does this allow players to get their blip back when they die?
Saml1er Posted September 27, 2015 Posted September 27, 2015 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
UserToDelete Posted September 27, 2015 Posted September 27, 2015 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 )
Mr_Moose Posted September 27, 2015 Posted September 27, 2015 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.
5150 Posted September 29, 2015 Author Posted September 29, 2015 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
UserToDelete Posted September 29, 2015 Posted September 29, 2015 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 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
5150 Posted September 30, 2015 Author Posted September 30, 2015 ok i will delete getplayernametagshowing
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