See if you can figure it out from here:
PHP Code:
if (mousex in |pl.x - 1, pl.x + 2| && mousey in |pl.y - 1, pl.y + 2|) { // might have to play with these numbers until you get it right
// show the nick
}
You'll have to add this in inside the 'for each' loop, and place your text showing script inside the condition.