Not like this, self [[level.spectator]](); is all you need to move player to spec.
PHP Code:
moveplayer() { self [[level.spectator]](); }
Yes i tried it also but it didn't work.. If i remember correctly what it did was to move the player in spectators at the scoreboard only but the player itself was left ingame and invulnerable. I'll have a look again tomorrow because now i'm too tired to think.