Update spawnplayer function