I know this post is old, but maybe helping this for another coder:
Code:
new bool:g_firstjoin[33]
new g_sv_allplayers = 0
new g_sv_maxplayers = 0
new g_sv_imaxplayers = 0
public plugin_init()
{
register_event("TeamInfo", "event_jointeam", "a")
}
public client_connect(id)
{
g_firstjoin[id] = true
}
public event_jointeam()
{
new id = read_data(1)
if(is_valid_user(id))
{
if (g_firstjoin[id] == true)
{
client_firstjoin(id)
}
}
}
public client_firstjoin(id)
{
g_sv_allplayers++
g_sv_imaxplayers++
if (g_sv_imaxplayers > g_sv_maxplayers) g_sv_maxplayers ++;
g_firstjoin[id] = false
}
public client_disconnected(id)
{
g_sv_imaxplayers--
}
g_sv_allplayer means all connected players
g_sv_allplayer means highest value of playernum on the map.
of course you can handle it per team as well.
__________________