27.01.2013, 01:25
Hi, I made this and I put it below OnPlayerTakeDamage:
But it does not work. The pDamage is probably not added, but what did I do wrong in here?
pawn Код:
if(weaponid == 33) //Rifle
{
pDamage[playerid] += 15;
}
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);
}
}