14.06.2013, 18:36
Well, what I want is if the player's armour is 100 it would take the armour first, for now it takes HP more than armour :3 , which means he dies before his armour is taken.
Thank you!
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) { new Float:HP; GetPlayerHealth(playerid, HP); if(weaponid == 24) SetPlayerHealth(playerid, HP-110); if(weaponid == 22) SetPlayerHealth(playerid, HP-10); if(weaponid == 32) SetPlayerHealth(playerid, HP-35); if(weaponid == 28) SetPlayerHealth(playerid, HP-35); if(weaponid == 23) SetPlayerHealth(playerid, HP-30); if(weaponid == 31) SetPlayerHealth(playerid, HP-40); if(weaponid == 30) SetPlayerHealth(playerid, HP-40); if(weaponid == 29) SetPlayerHealth(playerid, HP-25); if(weaponid == 34) SetPlayerHealth(playerid, HP-199); if(weaponid == 33) SetPlayerHealth(playerid, HP-100); if(weaponid == 25) SetPlayerHealth(playerid, HP-35); if(weaponid == 27) SetPlayerHealth(playerid, HP-45); return 1; }