I've had problems with test player so I made my own function
PHP Code:
function findNearestPlayers(fx,fy,dist)
{
for (pl : players)
{
if (pl.x in |fx-dist,fx+dist|)
{
if (pl.y in |fy-dist,fy+dist|)
{
return pl;
}
}
}
}
You can edit it to make it add all accounts into an array or make it return an account name instead of an object =p.
You could also change it to look for players in a square area instead of a circle.
