Ok apparently (player_set_team_no) only works when you are host
Guys I am slowly running out of ideas...
choose faction .. spectator..
Yes I know. That is the oldschool way I am currently using to suicide. But I wanted to declare it to a special keyboar key. So for instance I press F6 and then it changes the team.
The function (player_set_team_no) does apparently only work when you are host.
So now I am asking myself why I can change my team through menu, but not through a function...