14.06.2013, 18:51
1) Do it like this
2)
pawn Код:
switch(weaponid)
{
case 24: { amount = 110; }
case 22: { amount = 10; }
......
}
pawn Код:
new Float:HP;
new Float:Armour;
GetPlayerHealth(playerid, HP);
GetPlayerArmour(playerid, Armour);
Armour -= amount;
HP -= Armour;
if(Armour > 0.0) SetPlayerArmour(playerid, Armour);
else
{
SetPlayerArmour(playerid, 0.0);
if(HP <= 0.0) SetPlayerHealth(playerid, 0.0);
else SetPlayerHealth(playerid, HP);
}