Jump to content
Sign in to follow this  
Doodle

Player names above heads

Recommended Posts

Wonder if anyone can help

I know I have seen it at some time in a mission but cant remember where or when, it may have been a version of domination

I am looking for a script that will dispaly the players name above their heads and ideally their distance from wherever they are on the map.

I have seen scripts that dispaly the players name when you are looking at them but I need it to display the name even if you are not look at them.

We are trying to get rid of the ugly white hexagons (I know we can set to hide group in HUD) BUT still want some form of being able to identify players in game -

It needs to work on a dedi and be respawn compatible.

Thanks in advance for any help

Share this post


Link to post
Share on other sites

Something like this:

onEachFrame
{
 {
   if ((side _x == west) && (_x != player)) then
   {
     drawIcon3D ["", [0, 0.27, 0.8, 1], [visiblePosition _x select 0, visiblePosition _x select 1,(visiblePosition _x select 2)+3], 0.2, 0.2, 45, (format ["%2 - %1m",player distance _x, name _x]), 1, 0.03, "PuristaMedium"];
   };
 } foreach allunits;
};

Edited by JW Custom

Share this post


Link to post
Share on other sites

Thanks for reply will give it a go - would I just put this in the init.sqf?

---------- Post added at 10:42 PM ---------- Previous post was at 10:37 PM ----------

Just tried this and it seems to work with one exception as soon as the player goes out of your view (ie behind you) the name dissapears - any idea

Would be forever in your debt..:-)

Share this post


Link to post
Share on other sites
i think that is due to DrawIcon3D.

So would it be possible to get round this somehow? remove the icon?

Share this post


Link to post
Share on other sites
Just tried this and it seems to work with one exception as soon as the player goes out of your view (ie behind you) the name dissapears - any idea

I'm a little confused here, are you saying that you want to see something that is not in your view :confused:

If the code snippet is placed in lets say the init.sqf all players is running it so they are seeing all player names in their view also player names that are out of your view.

Share this post


Link to post
Share on other sites
I'm a little confused here, are you saying that you want to see something that is not in your view :confused:

If the code snippet is placed in lets say the init.sqf all players is running it so they are seeing all player names in their view also player names that are out of your view.

Sorry didnt explain properly - Members of my squad are visible in game with the standard white hexagon - if one of my squad are behind me the at the edge of the screen there will be a small white triangla idicating a squad member behind me - what I would like is that the names above our heads go the the edge of the screen when playes are behind each other.

Reading back your probably more confused now - to be fair its no big deal really just a "would be nice"

That said would be nice if the distance marker wasnt to 5 decimal places...anyone?

Also anyone any idea what the "performance hit" is with these "oneachframe" stuff?

Cheers

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×