Put client to spectator?

Hello,

is there any way to force player to join spectators? I’m working with /code/server and I really cannot find anything related to setting their team.

Thank you

You can tell the Game VM to change client’s team using the forceteam command.

Cbuf_AddText( va( "forceteam %d spectator\n", clientNum ) );

In general, it’s better to work with the /code/game directly.

Thank you! I’ll check this tonight. I’ll post my plugin source when it’s done.