Forum

> > CS2D > Scripts > How to count the number of players in your server?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How to count the number of players in your server?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: How to count the number of players in your server?

DC
Admin Off Offline

Zitieren
reading sys/lua/info.txt is pretty helpful + knowing that # gives you the number of elements in a table.

result:
1
#player(0,"table")

also note
Zitat
player(0,"table"): a Lua table with all player IDs
player(0,"tableliving"): a Lua table with all living player IDs
player(0,"team1"): a Lua table with all terrorist IDs
player(0,"team2"): a Lua table with all counter-terrorist IDs
player(0,"team1living"): a Lua table with all living terrorist IDs
player(0,"team2living"): a Lua table with all living counter-terrorist IDs
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht