Quote:
Originally Posted by AceFlyer
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) { new Float:HP,Float:A; GetPlayerHealth(playerid, HP); GetPlayerArmour(playerid,A); if(A > 0.0) { if(weaponid == 31) SetPlayerArmour(playerid, A+amount-25); if(weaponid == 30) SetPlayerArmour(playerid, A+amount-26); if(weaponid == 34) SetPlayerArmour(playerid, A+amount-90); if(weaponid == 29) SetPlayerArmour(playerid, A+amount-20); if(weaponid == 24) SetPlayerArmour(playerid, A+amount-50); if(weaponid == 4) SetPlayerArmour(playerid, A+amount-60); if(weaponid == 26) SetPlayerArmour(playerid, A+amount-30); if(weaponid == 32) SetPlayerArmour(playerid, A+amount-20); } else { if(weaponid == 31) SetPlayerHealth(playerid, HP+amount-25); if(weaponid == 30) SetPlayerHealth(playerid, HP+amount-26); if(weaponid == 34) SetPlayerHealth(playerid, HP+amount-90); if(weaponid == 29) SetPlayerHealth(playerid, HP+amount-20); if(weaponid == 24) SetPlayerHealth(playerid, HP+amount-50); if(weaponid == 4) SetPlayerHealth(playerid, HP+amount-60); if(weaponid == 26) SetPlayerHealth(playerid, HP+amount-30); if(weaponid == 32) SetPlayerHealth(playerid, HP+amount-20); } return 1; }
im not sure whether that would work though.
|
Guess this will not work, when player's will have more then 0 armour and you shoot him he will lost armour BUT, after another shot armour will be increased to 100. That's what I think.