08.02.2013, 17:02
Hello,
At my OnPlayerTakeDamage I have got this:
and below that:
But the effect (the messages, etc) isn't triggered. Is there anything I do wrong in here?
At my OnPlayerTakeDamage I have got this:
pawn Код:
if(weaponid == 24) //deagle
{
if(armour > 0)
{
pDamage[playerid] += 15;
}
else
{
pDamage[playerid] += 30;
}
}
pawn Код:
if(pDamage[playerid] > 0)
{
pDamageTimer[playerid] = 120;
GameTextForPlayer(playerid, "~r~You've been hit!", 1500, 1);
if(pDamage[playerid] >= 100)
{
format(string, sizeof(string), "* %s falls to the ground due to the bullet injuries.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
}
}