View Single Post
  #1  
Old 08-30-2006, 11:54 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Looping through every player serverside

Hello, i'm trying to loop through each player on the serverside in a database npc.

I tried this:

PHP Code:
for (pplayers) {
  
this.playernames.add(p.account);
 } 
however, for some reason it doesn't store all the players accounts.

Heres how i'm using it:

PHP Code:
db findnpc("DBNPC");
playernames db.getPlayerNames(); 
All this is serverside, then I send the playernames array, along with some other info to the clientside using triggeractions.

However...

If i'm in a level with more than 1 person I get the names of the people in the same level as me and my account name.
If i'm in a level on my own I just get my own account name.

Can anyone explain this? It's all being done serverside so why it doesnt always show every account on the server is puzzling.

Any ideas? Thanks.

Last edited by JkWhoSaysNi; 08-31-2006 at 12:21 AM..
Reply With Quote