24.07.2015, 10:44
Quote:
|
So, based on a post that I saw on forums plus my noob knowledge about pawn I ended up with that:
Код:
if(issuerid != INVALID_PLAYER_ID && weaponid == 33 && bodypart == 9)
{
new Float:armour;
SetPlayerArmour(playerid,-85);
GetPlayerArmour(playerid, armour);
if(playerid,armour == 0) SetPlayerHealth(playerid,-85);
}
If the player hits the head with a rifle, its going to cause 85 damage, but instead, if someone hits the other player's head, it just resplenish the armour, and if the bullet hit the body it just go trough the armour and causes 85 damage to the health. If someone can find out what's wrong, I would thank you ! |
try this
Код:
if(issuerid != INVALID_PLAYER_ID && weaponid == 33 && bodypart == 9)
{
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid,armour-85);
if(playerid,armour == 0) SetPlayerHealth(playerid,-85);
}



!