Basically, I want "ADMIN: <ADMINNAME>" to appear when a player points their crosshair at an Admin.
Here's what I've got so far:
_adminList = ["ADMINUID1","ADMINUID2"];
waitUntil {(getPlayerUID player) != ""};
Waituntil {!isNull player};
while{true} do
{
sleep 0.5;
_lpID = getPlayerUID cursorTarget;
if((isPlayer cursorTarget) && (alive cursorTarget) && (side cursorTarget == side player) && (_lpID in _adminList) && (player distance cursorTarget < 10)) then
{
_cursorTargetName = name cursorTarget;
cutText [format["ADMIN %1", _cursorTargetName], "PLAIN",0.1];
}
else
{
};
};
It's an adaptation of the CPC name tags code from a while back.
The code does show what I want but it's also showing the names of normal players.
Can anyone point out what I've done wrong please? I don't have a lot of .SQF experience but I think I'm on the right track.
Thanks.