PDA

View Full Version : GS2: Scripting Problem?


Dionysus
04-21-2007, 04:46 AM
im making an Client-RC and i added an GS2 Gui to display "Players: #".

But when i use the "allplayers.size()" i get a number like "Players: 26" when on my normal rc it displays "Players: 5" zzzzzzzzz how could i fix this???

zokemon
04-21-2007, 04:54 AM
allplayers includes IRC bots. I suggest you just get the number of IRC bots and just subtract it from that allplayers.size().

You might also beable to use the gs1 variable: allplayerscount *shudders at the thought*

Dionysus
04-21-2007, 04:55 AM
how? (in gs2 xD)

Novo
04-21-2007, 05:00 AM
how? (in gs2 xD)


function getPlayerCount()
{
temp.count = 0;
for ( pl: allplayers )
temp.count += (! pl.isExternal );

return temp.count;
}

Dionysus
04-21-2007, 05:08 AM
Thanks :)

Skyld
04-21-2007, 12:54 PM
Moving this thread to the GS2 forum. Please create future GS2 posts there.