29.10.2017, 16:37
How to delay the death of the player who got headshooted ?
I'm using the 2 sec Timer to set his health to 0 using SetPlayerHealth(playerid,0); but the problem is in deathlist it showing he got killed by no one like he did /kill .
I'm doing this right now. this was working fine with OnPlayerTakeDamage before but after changing it to OnPlayerDamage it's not working like it was.
Should i do this?
I'm using the 2 sec Timer to set his health to 0 using SetPlayerHealth(playerid,0); but the problem is in deathlist it showing he got killed by no one like he did /kill .
I'm doing this right now. this was working fine with OnPlayerTakeDamage before but after changing it to OnPlayerDamage it's not working like it was.
Код:
public OnPlayerHeadshot(Float:Ax, Float:Ay, Float:Az, playerid)
{
KillTimer(HeadshotTimer[playerid]);
DestroyObject(blood[playerid]);
SetPLayerHealth(playerid,0);
return 1;
}
Код:
public OnPlayerHeadshot(Float:Ax, Float:Ay, Float:Az, playerid,Float:amount)
{
KillTimer(HeadshotTimer[playerid]);
DestroyObject(blood[playerid]);
amount = 0.0;
return 1;
}

