31.03.2012, 04:19
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;
}