Quote:
Originally Posted by Ilusion9
PHP Code:
AddCommandListener(Command_JoinGame, "joingame");
public Action Command_JoinGame(int client, const char[] command, int args) { SetEntPropFloat(client, Prop_Send, "m_fForceTeam", 0.0); SetEntProp(client, Prop_Send, "m_iPendingTeamNum", CS_TEAM_CT); }
Another way to assign a team on connect. Tested only on local server.
|
Somehow this method causes a very strange bug. When people switch back to spectator and go watch a player they will become ghosts players. In my case I run a zombie server. Let's say someone go spectate a zombie. From that point and beyond the zombie won't be able to infect humans because spectator will magically exist in front/between of that zombie no matter where they go blocking the damage and we can also hear the stabbing sounds. So weird.