10.03.2012, 17:12
Hi, my Onplayertakedamage sometimes doesnt respond like it should, the player can just continue running like nothing ever happend.
pawn Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(weaponid == 23)
{
if(tazer[issuerid] == 1)
{
TogglePlayerControllable(playerid, 0);
SetTimerEx("Tazed", 10000, false, "i", playerid);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
}
}
}
return 1;
}