Help sniper problem
#6

Try one of those, or each.

You could put your codes at only one, but it's better that way and should be synced
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if(weaponid == WEAPON_SNIPER && bodypart ==  9) //If it's a sniper headshot
    {
        new Float:h; GetPlayerHealth(damagedid, h);
        if(h - amount < 0.1)//If that shot killed him
        {
            GameTextForPlayer(playerid, "~r~Headshotted", 3000, 3);
        }
    }
}

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(weaponid == WEAPON_SNIPER && bodypart ==  9) //If it's a sniper headshot
    {
        new Float:h; GetPlayerHealth(playerid, h);
        if(h - amount < 0.1)//If that shot killed him
        {
            //Do something
            GameTextForPlayer(playerid, "~r~Headshotted", 3000, 3);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help sniper problem - by Mijata - 21.01.2015, 22:19
Re: Help sniper problem - by nGen.SoNNy - 21.01.2015, 22:37
Re: Help sniper problem - by Mijata - 21.01.2015, 23:03
Re: Help sniper problem - by SickAttack - 21.01.2015, 23:13
Re: Help sniper problem - by Mijata - 21.01.2015, 23:16
Re: Help sniper problem - by xVIP3Rx - 21.01.2015, 23:26

Forum Jump:


Users browsing this thread: 1 Guest(s)