Skip to content

Instantly share code, notes, and snippets.

@X39
Last active February 24, 2022 04:48
Show Gist options
  • Select an option

  • Save X39/f149ef35484d6466fc4b to your computer and use it in GitHub Desktop.

Select an option

Save X39/f149ef35484d6466fc4b to your computer and use it in GitHub Desktop.
ArmA 3, Show Playernames with Ranks on HUD
if(!isDedicated && hasInterface) then
{
addMissionEventHandler ["Draw3D", {
{
if(side _x == playerSide) then
{
_dst = (_x distance player);
_size = 1 - (_dst / 100);
_pos = position _x;
_pos set[2, (_pos select 2) + 2.25];
if(_dst < 50) then
{
drawIcon3D [format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _x], [1,1,1,1], _pos, _size, _size, 0, name _x, 0, 0.05 * (_size * 0.5), "PuristaSemibold"];
}
else
{
drawIcon3D [format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _x], [1,1,1,1], _pos, _size, _size, 0, "", 0, 0, "PuristaSemibold"];
};
};
false
}count ((position player) nearEntities ["CAManBase", 100]);
}];
};
@marcegu400
Copy link
Copy Markdown

do you know how to change the color?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment