Untested but should work in theory, the how is:
1: whenever a player joins a game, he runs the init.sqf for all playableUnits.
2: if a marker with player name is not present(isNil), he willl create one, else do nothing.
3: once he leaves game, marker is deleted and the the marker name is removed again(set to nil).
place this in your init.sqf.
Code:
_null = playableUnits execVM "trackPlayers.sqf";
save this as trackPlayers.sqf and place in your mission folder.
Code:
{
waitUntil {isPlayer _x};
if (_x != player) exitWith {};
_mName = format["player_%1_marker",_x];
_pName = format["%1",(name player)];
if (isNil (_mName)) then {
_marker = createMarker[_mName,[0,0]];
_mName setMarkerShape "ICON";
_mName setMarkerColor "ColorBlue";
_mName setMarkerType "DOT";
_mName setMarkerText _pName;
while {!isNull player} do {
_mName setMarkerPos (getPos player);
sleep 1;
if (!alive player) then {
_mName setMarkerAlpha 0;
waitUntil {alive player};
_mName setMarkerAlpha 1;
};
};
deleteMarker _mName;
_mName = nil;
};
} foreach _this;