Quote:
Originally Posted by OciXCrom
Your forward is not in "post". RegisterHam's "post" argument defaults to 0 which means you're in "pre" because you did not specify the argument.
|
You are right! I have tried it now, but for some reason the player won't respawn, it only skips the death "cutscene"/animation and still waits for the respawn timer to end...
I tried with set_task but still it wont respawn the player...
Code:
public Ham_OnKilled_Post(id, killer)
{
new Float:value;
new string[MAX_STRING];
if( get_user_team(id) == TEAM_HUMANS ) {
new deathpos[3];
get_user_origin(id, deathpos);
dod_set_user_team(id, TEAM_ZOMBIE, 0);
ExecuteHamB(Ham_DOD_RoundRespawn, id);
set_task(0.5, "Revive", id);
set_user_origin(id, deathpos);
}
}
public Revive(id){
ExecuteHamB(Ham_DOD_RoundRespawn, id)
}