I try to use this code, but server was crashed.
PHP Code:
ChangeTeam()
{
new iTeam;
for( new id = 1; id <= 32; id++ )
{
if(!is_user_connected(id)) continue;
iTeam = get_user_team(id);
cs_set_user_team(id, iTeam == 1 ? CS_TEAM_CT : iTeam == 2 ? CS_TEAM_T : CS_TEAM_SPECTATOR)
}
server_cmd("sv_restartround 3");
set_task(4.5, "Announce")
}