Forum

> > CS2D > Scripts > How to count the number of players in your server?
Forums overviewCS2D overview Scripts overviewLog in to reply

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

3 replies
To the start Previous 1 Next To the start

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

DC
Admin Off Offline

Quote
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
Quote
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview