14.09.2012, 22:57
(
Последний раз редактировалось clarencecuzz; 14.09.2012 в 23:46.
)
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:Armour, Float:Health;
GetPlayerArmour(playerid, Armour);
GetPlayerHealth(playerid, Health);
if(Armour > 0)
{
switch(weaponid)
{
case 22, 27: return SetPlayerArmour(playerid, Armour - 30);
case 28, 32: return SetPlayerArmour(playerid, Armour - 15);
case 23, 33: return SetPlayerArmour(playerid, Armour - 35);
case 24, 25: return SetPlayerArmour(playerid, Armour - 40);
case 29: return SetPlayerArmour(playerid, Armour - 18);
case 30: return SetPlayerArmour(playerid, Armour - 34);
case 31: return SetPlayerArmour(playerid, Armour - 37);
case 34: return SetPlayerArmour(playerid, Armour - 300);
}
}
else
{
switch(weaponid)
{
case 22, 27: return SetPlayerHealth(playerid, Health - 30);
case 28, 32: return SetPlayerHealth(playerid, Health - 15);
case 23, 33: return SetPlayerHealth(playerid, Health - 35);
case 24, 25: return SetPlayerHealth(playerid, Health - 40);
case 29: return SetPlayerHealth(playerid, Health - 18);
case 30: return SetPlayerHealth(playerid, Health - 34);
case 31: return SetPlayerHealth(playerid, Health - 37);
case 34: return SetPlayerHealth(playerid, Health - 300);
}
}
return 1;
}