I have this code and it works fine as long I do not spectate an other player (Hit left or right mouse key when in spectator-mode). However if I spectate an other player and go back to playing mode, my player is invisible and I cannot fire a weapon or throw a grenade. I can move and other players see me (and can kill me), but for me my player is invisible and I cannot shot.
I have try ent.Call("show") and many other things, but nothing works.

Does anyone have a solution for this, or a hint what goes wrong?

                    player.Call("notifyonplayercommand", "AdminSpec", "+actionslot 1");
                    player.OnNotify("AdminSpec", (ent) =>
                        HudElem label = ent.GetField<HudElem>("asHud");

                        if (ent.GetField<string>("sessionstate") != "spectator")
                            label.SetText("^7Press ^3[{+actionslot 1}]^7 to go back to playing mode.");
                            ent.SetField("position", new Vector3(player.Origin.X, player.Origin.Y, player.Origin.Z));
                            ent.Call("allowspectateteam", "freelook", true);
                            ent.SetField("sessionstate", "spectator");
                            label.SetText("^7Press ^3[{+actionslot 1}]^7 to go to speculator mode.");
                            ent.Call("setorigin", new Parameter[] { player.GetField<Vector3>("position") });
                            ent.Call("allowspectateteam", "freelook", false);
                            ent.SetField("sessionstate", "playing");