Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   GS2: Scripting Problem? (https://forums.graalonline.com/forums/showthread.php?t=73582)

Dionysus 04-21-2007 03:46 AM

GS2: Scripting Problem?
 
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 03: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 03:55 AM

how? (in gs2 xD)

Novo 04-21-2007 04:00 AM

Quote:

Originally Posted by Dionysus (Post 1301550)
how? (in gs2 xD)

PHP Code:

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

  return 
temp.count;
  } 


Dionysus 04-21-2007 04:08 AM

Thanks :)

Skyld 04-21-2007 11:54 AM

Moving this thread to the GS2 forum. Please create future GS2 posts there.


All times are GMT +2. The time now is 12:33 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.