I have a problem to set player to spectate mode after joining.
I get no errors but he is not in spactating mode.
[PHP]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
[/PHP]But when i do this it works:
[PHP]
function spectate( ply )
ply:Spectate( OBS_MODE_ROAMING )
end
concommand.Add( "spectate", spectate )
[/PHP]
-- Snip -- Didnt read at all..
He is calling it..
Try putting "joining( ply )" after a 5-10 second simple.timer as it might be happening before the player is actually spawned.
[QUOTE=AngryChairR;23728475]He is calling it..
Try putting "joining( ply )" after a 5-10 second simple.timer as it might be happening before the player is actually spawned.[/QUOTE]
Ok I replaced it with:
timer.Simple( 1, joining, ply )
and it is working now THX
Sorry, you need to Log In to post a reply to this thread.