Quote:
Originally Posted by DustyPorViva
You shouldn't need allplayers.
Try:
PHP Code:
for (temp.pl : players) { echo(temp.pl.account); }
Alternatively just try this:
echo(players.size()); and see if it's actually just returning 1. I don't remember if players returns objects or id's.
|
players returns an object, and the size is always outputting 1, no matter how many players are in the level.
Quote:
Originally Posted by Tim_Rocks
PHP Code:
for (temp.pl: findNearestPlayers(player.x, player.y)) { echo(temp.pl); }
|
Not having any luck with this, it's still only returning one player in the level. I'm doing it through a weapon NPC, so I switched it to what I'm using. Now, I can change where it detects the nearest player(s), but it still only returns one player
I mean that method can work just fine and is probably what I'll end up doing, but I'm trying to figure out why all of the players in the level aren't being returned o_o