news
current
submit
tutorials
database
-mp
-client
submit
search
forum
main
contact
email
|
CS/TFC Spawn Delay
Created by G3n3Starwind
HalfLife's Code is BLUE
G3n3Starwind's Code is RED
G3n3Starwind's Commentary is GREEN
Now
this I cant belive i missed cause its so easy but [You Must Have A
Class System] anyway i figured theres idiots out there who need to know
so.
Go To your join team function in teamplay.cpp
you should see this:
//=========================================================
// Chip - JoinTeam Function
//=========================================================
void CHalfLifeTeamplay::JoinTeam(CBasePlayer *pPlayer, const char *pTeamName)
{
char text [1024];
//If already on this team, do nothing
if (FStrEq(pPlayer->m_szTeamName, pTeamName))
{
return;
}
//Join the team
//When observer, make it respawnable, let it join a team and
then respawn
if ( pPlayer->m_afPhysicsFlags & PFLAG_OBSERVER)
{
// notify everyone of the team change
sprintf( text, "* %s has joined
%s\n", STRING(pPlayer->pev->netname), pTeamName );
UTIL_SayText( text, pPlayer );
UTIL_LogPrintf( "\"%s<%i>\" has
joined %s\n", STRING( pPlayer->pev->netname ), GETPLAYERUSERID( pPlayer->edict()
), pTeamName );
pPlayer->pev->deadflag =
DEAD_RESPAWNABLE;
ChangePlayerTeam( pPlayer, pTeamName,
FALSE, FALSE );
// recound stuff
RecountTeams();
pPlayer->Spawn();
}
//Else just switch teams
else
{
// notify everyone of the team change
sprintf( text, "* %s has joined
%s\n", STRING(pPlayer->pev->netname), pTeamName );
UTIL_SayText( text, pPlayer );
UTIL_LogPrintf( "\"%s<%i>\" has
joined %s\n", STRING( pPlayer->pev->netname ), GETPLAYERUSERID( pPlayer->edict()
), pTeamName );
ChangePlayerTeam( pPlayer, pTeamName,
TRUE, TRUE );
// recound stuff
RecountTeams();
}
}
//Chip
Now delete the pPlayer->Spawn();
Now change this DEAD_RESPAWNABLE;
To DEAD_DEAD;
See very easy any dumbass can figure this out GOOD LUCK!
|