player count real time

GoldenGirl

Banned
Feb 15, 2011
43
14
is it posible to count the exact number of player on the map and using this number on other entity and calculate it even if a player leave ?
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Sourcemod is your best bet for doing this; there's probably a way to do it with entity wankery, but I don't recommend that.
 

GoldenGirl

Banned
Feb 15, 2011
43
14
why not?
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
It'll probably be very complicated and prone to breaking; if you want to use that method, ask func_door or A Boojum Snark if/how is it possible.

Dragonstorm does have a point, though - how will you map without even owning a Source game?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
tf_gamerules has two outputs, Team1PlayersChanged and Team2PlayersChanged that fire whenever they change and send the number of players as a parameter. Then you can use those for whatever, or add them if you want total count.