You don't even need a loop for that.
PHP Code:
temp.p = findnearestplayer(mousex,mousey);
if (p.x in |mousex+.5,mousex+2.5| && p.y in |mousey+1,mousex+3|) {
with (findimg(200 + temp.p.id * 2)) {
text = p.nick;
x = temp.p.x + 1.5;
y = temp.p.y + 3.2;
style = "bc";
font = $pref::graal::defaultfontname;
red = 0;
green = 1;
blue = 0;
layer = 0;
}
} else hideimg(200);
This is theoretical, though... but I think it should work.