If the undesired affects you are referring to is the suicide, you can avoid that simply by doing something like the following:
PHP Code:
void ChangeTeam_NoKill(int client, int iTeam)
{
if(IsValidClient(client))
{
int iEntProp = GetEntProp(client, Prop_Send, "m_lifeState");
SetEntProp(client, Prop_Send, "m_lifeState", 2);
ChangeClientTeam(client, iTeam);
SetEntProp(client, Prop_Send, "m_lifeState", iEntProp);
}
}
Edit: I see that you state you cannot do it by changing the alive state. It has always worked for me.
__________________