Hi,
  I'm using the following code to respawn players in a metamod plugin for 
Counter-Strike.
  It works wonderfully on windows but _crashes_ my linux server when I enter the 
command.
  Here's the code... any insight on why it could be doing this?
     -----David "BAILOPAN" Anderson

CBaseEntity *pPlayer = UTIL_PlayerByIndex(PlayerIndex);
edict_t *player
player = pPlayer->edict();
CBasePlayer *cbPlayer = (CBasePlayer *)pPlayer;
if (!sPlayerValid(pPlayer)) return 0;
if (pPlayer->pev->deadflag == ((DEAD_DYING)||(DEAD_DEAD)||(DEAD_RESPAWNABLE))) {
    //Note - I used this because respawn() gave me link errors even though I included 
client.h
    cbPlayer->Spawn();
    pPlayer->pev->button = 0;
    cbPlayer->m_iRespawnFrames = 0;
    pPlayer->pev->nextthink = -1;
}



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

Reply via email to