I don't believe findnearestplayer works on the client-side.
temp.p refers to a player object so you can just use..
NPC Code:
for (temp.p: players) {
if (mousex in |temp.p.x, temp.p.x + 3| && mousey in |temp.p.y, temp.p.y + 3|) {
// do whatever
}
}
The in operator has a couple different uses:
NPC Code:
temp.array = {"a", "b", "oranges"};
if ("oranges" in temp.array) {
echo("You have oranges!"); // would output "You have oranges"
}
or it can be used as a shortcut instead of doing..
NPC Code:
temp.i = 2;
if (temp.i >= 1 && temp.i <= 3) {
}
// You can use instead:
if (temp.i in |1,3|) {
echo("rawr"); // would output "rawr"
}