Page 1 of 1

Change team silently

Posted: Tue Nov 10, 2015 10:08 pm
by BackRaw
Hi,

since SP has been updated multiple times now, I'd like to ask: does there is the feature of changing a player's team silently, without them dying, already exist?

Thanks in advance :D

Posted: Tue Nov 10, 2015 10:18 pm
by Ayuto
That feature already exists since a long time. :tongue:

Syntax: Select all

<Player object>.switch_team(<team number>)
This will move the player to the given team without killing him (currently available on CS:S and CS:GO). But it will send a chat message that the player changed the team. If you want to block that message as well, you might want to try to hook the player_team event and return EventAction.DONT_BROADCAST. If I remember correctly this will block the message. If not, please let me know. :)

Posted: Wed Nov 11, 2015 9:05 pm
by BackRaw
Alright awesome! I'll give it a try