KWo thanks you so much. I was forgot that I must get the player index via the message.

So here the right function:
Code:
// This message is sent whenever information for the teams is sended. - THE STORM
void Client_CS_TeamInfo (void *p, int/* iPlayerIndex*/)
{
static int iPlayerIndex;
switch (state++)
{
case 0:
iPlayerIndex = *(int *)p;
break;
case 1:
if (strcmp((char *) p, "UNASSIGNED") == 0)
{
clients[iPlayerIndex - 1].iTeam = TEAM_CS_UNASSIGNED;
}
else if (strcmp((char *) p, "TERRORIST") == 0)
{
clients[iPlayerIndex - 1].iTeam = TEAM_CS_TERRORIST;
}
else if (strcmp((char *) p, "CT") == 0)
{
clients[iPlayerIndex - 1].iTeam = TEAM_CS_COUNTER;
}
else if (strcmp((char *) p, "SPECTATOR") == 0)
{
clients[iPlayerIndex - 1].iTeam = TEAM_CS_SPECTATOR;
}
break;
}
}
No more team detection with models.
