Quote:
Originally Posted by mrtn
To move all players to spectator is as simple as iterating client Ids, checking if they are in the game and not spectating, and moving to spectator with ChangeClientTeam() (CS_SwitchTeam() can only switch a client to CT or T):
PHP Code:
for (int clientId = 1; clientId <= MaxClients; clientId++) {
if (IsClientInGame(clientId) && !IsClientObserver(clientId)) {
ChangeClientTeam(clientId, CS_TEAM_SPECTATOR);
}
}
|
mrtn, Thanks! That Works
Now I need to move a specific player, how can I do that? First I need to show each player in the menu and when one player is selected, move to CT or TR.
Thanks!