I have a problem to set player to spectate mode after joining.
I get no errors but he is not in spactating mode.
function GM:PlayerInitialSpawn( ply ) joining( ply ) ply:SendLua( "welocomescr()" ) //Show welcome screen end function joining( ply ) ply:Spectate( OBS_MODE_ROAMING ) ply:SetTeam( 3 ) //Set his team to Joining end
But when i do this it works:
function spectate( ply ) ply:Spectate( OBS_MODE_ROAMING ) end concommand.Add( "spectate", spectate )