08.01.2011, 13:45
Quote:
Will that check for armor first and if he does have armor, take it? Or would I have to write below it..
SetPlayerArmor(target, A-100) And I probably sound stupid, but how do I make a .inc? |
pawn Код:
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
new Float:H[2];
GetPlayerHealth(target, H[0]);
GetPlayerArmour(target,H[1]);
if(GetPlayerWeapon(shooter) == 34)
{
if(H[1] > 0) return SetPlayerArmour(target,0);
SetPlayerHealth(target, H[0]-100);
}
return 1;
}
A bug on Kwarde code:
If players armour is more than 100, then armour gets set to a negative value, and health is Health + some armour.