A) You can find in most of HL2 game mods event
"player_connect".
Maybe
"player_connect_client" is TF2 mod specific event... perhaps to tell it is human who connect.
I recommend to use
"player_connect" and
"player_disconnect" events.
OB = Orange Box serie of HL2 games (it Half-Life 2, Half-Life 2: Episode One, Half-Life 2: Episode Two, Portal ja Team Fortress 2.).
https://en.wikipedia.org/wiki/The_Orange_Box
-Before SteamCMD upgrade, when TF2 game had a lot of updates, those also affect cs:s, dod:s, hl2:dm games also.
It was like pain in ass. Updates, updates, updates...
out of topic.
https://forums.alliedmods.net/showthread.php?t=311384
B) On
"player_connect" event, player is connecting to server, not in game yet.
And again
"player_disconnect" event, player is still in game and team...
If you want track player count on server... I would recommend to use repeating timer, maybe every 2 sec ?
PHP Code:
public void OnPluginStart()
{
CreateTimer(2.0, MyTimer, _, TIMER_REPEAT);
}
public Action MyTimer(Handle timer)
{
int counter;
// Loop client indexs
for(int client = 1; client <= MaxClients; client++)
{
// skip client indexs which are not in use or player is not in game (connecting)
if(!IsClientInGame(client)) continue;
// skip bots
if(IsFakeClient(client)) continue;
counter++;
PrintToServer("Human player - '%N'", client);
}
PrintToServer("Human player count %i", counter);
return Plugin_Continue;
}
__________________