Jump to content
Sign in to follow this  
melbo

Displaying friendly player names

Recommended Posts

I am trying to incorporate friendly name tags appearing over players when you have your cursor over them at a certain distance, say 100m or less. I've tried all sorts of scripts but just cannot get this working. Any ideas or help would be much appreciated!

Share this post


Link to post
Share on other sites

created such a script just today coincidentally.

Have a look and see if it works for what you are trying to do.

_refresh = 0.5;
_maxDistance = 50;

while{true}do{
_target = cursorTarget;
if (_target isKindOf "Man" && player == vehicle player) then{
	if(side _target == playerSide && (player distance _target) < _maxDistance)then{
		_nameString = "<t size='0.5' shadow='2' color='#ffffffff'>" + (name _target) + "</t>";
		[_nameString,0,0.8,_refresh,0,0,3] spawn bis_fnc_dynamicText;
	};
};
sleep _refresh;
};

Share this post


Link to post
Share on other sites

Thanks, will test this out as asap and let you know.

Share this post


Link to post
Share on other sites

It works for AI but not for player controlled units. Any ideas?

Share this post


Link to post
Share on other sites

Does anyone know of a script that can do this? The mission is complete I just need this working.

All it needs to do is display all the human players names (on your team) when you mouse over them from a certain distance. Been searching for hours and cannot find a working one!

Share this post


Link to post
Share on other sites

if (_target isKindOf "Man" && _target isplayer)

try this - not tested and just a thought

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  

×