Here's mine:

        if (pPlayer->GetTeamNumber() == TEAM_UNASSIGNED)
        {
                pPlayer->pl.deadflag = true;
                pPlayer->AddSolidFlags( FSOLID_NOT_SOLID );
                pPlayer->SetMoveType( MOVETYPE_NONE );
                pPlayer->SetGroundEntity( NULL );
                pPlayer->SetFOV( pPlayer, 0 );
                pPlayer->AddPhysicsFlag(PFLAG_OBSERVER);

                //omega; if the motd hasn't been shown, then we need to draw
the team menu
                if (!pPlayer->bMOTDActive)
                        pPlayer->ShowViewPortPanel("team", true);
                pPlayer->EnableControl(false);
        }
        else
        {
                pPlayer->RemPhysicsFlag(PFLAG_OBSERVER); //take that one
away
                pPlayer->SetFOV( pPlayer, 0 );
                pPlayer->EnableControl(true);
                pPlayer->StopObserverMode();

                if (GetRulesMode() == RULES_CLASSIC)
                        PlayerSpawnClassic((CFLFPlayer*)pPlayer);
                else if (GetRulesMode() == RULES_CUSTOM)
                        PlayerSpawnCustom((CFLFPlayer*)pPlayer);
        }

Note that I created the add/rem physics flag functions.
-----Original Message-----
From: r00t 3:16 [mailto:[EMAIL PROTECTED]
Sent: December 31, 2004 2:22 AM
To: [email protected]
Subject: [hlcoders] PlayerSpawn

The below code is what I have in sdk_gamerules.cpp
The below code should load the team select menu and place the player in
TEAM_SPECTATOR
Why would it still spawn the player?
What is happening is the Team Selection menu comes up but it spawns me right
into the server as soon as I connect which is not what I want.


void CSDKGameRules::PlayerSpawn(CBasePlayer *pPlayer)
{
CSDKPlayer* pPly = ToSDKPlayer(pPlayer);
if (pPly->GetTeamNumber() == TEAM_UNASSIGNED)
{
pPly->ChangeTeam(TEAM_SPECTATOR);
pPly->StartObserverMode(OBS_MODE_ROAMING);
pPly->ShowViewPortPanel("specgui", false);
pPly->ShowViewPortPanel("team", true);
}
else
{
pPly->EnableControl(true);
pPly->StopObserverMode();
pPly->EquipSuit();
}
}

r00t 3:16
CQC Gaming
www.cqc-gaming.com


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 15/12/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 15/12/2004



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to