Respawn player without Animation
How to do that would be the death of the body vanished and death animation player
Code:
public respawn_player(id)
{
// Disconnected, already spawned, or switched to Spectator
if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return;
// Try to spawn the player setting the appropiate dead flag and forcing a think
set_pev(id, pev_deadflag, DEAD_RESPAWNABLE, EF_NODRAW)
dllfunc(DLLFunc_Think, id)
// Fix for CZ Bots: DLLFunc_Think won't work on them,
// but DLLFunc_Spawn does the job without any bugs.
// (for some reason I'm not suprised...)
if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE)
{
dllfunc(DLLFunc_Spawn, id)
}
}
|