Hi,
I am using this code for respawning(works fine):
Code:
public DeathMsg()
{
new victim;
victim = read_data(2)
if (get_cvar_num("amx_respawn") > 0)
set_task(1.0, "respawn_player", victim + 483)
}
public respawn_player(id)
{
id -= 483;
if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR) return;
set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
dllfunc(DLLFunc_Think, id)
if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE)
{
dllfunc(DLLFunc_Spawn, id)
}
}
public sayrespawn(gracz)
{
if (!is_user_connected(gracz) || cs_get_user_team(gracz) == CS_TEAM_SPECTATOR) return PLUGIN_HANDLED;
set_pev(gracz, pev_deadflag, DEAD_RESPAWNABLE)
dllfunc(DLLFunc_Think, gracz)
dllfunc(DLLFunc_Spawn, gracz)
return PLUGIN_HANDLED;
}
("gracz" is id)
But I want bodies to disappear just right after death, at the moment some maps looks like this:
http://iv.pl/images/f8kvcr040qy9ha48y.jpg
Check out fps- not really good fps for surf
Note: I need this for my surf mod, and I want to keep as many fps as I can
__________________