14.09.2012, 00:55
Hello, I am trying to script in realistic damage for a script yet I do not know how to tell the script, if the player has armor to "Attack the armor first" Not just the HP... here is it so far!
Any help will be appreciated
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 24) SetPlayerHealth(playerid, HP-40);//DesertEagle
if(weaponid == 22) SetPlayerHealth(playerid, HP-30);//Colt45
if(weaponid == 32) SetPlayerHealth(playerid, HP-15);//Tec9
if(weaponid == 28) SetPlayerHealth(playerid, HP-15);//Uzi
if(weaponid == 23) SetPlayerHealth(playerid, HP-35);//SilencedColt
if(weaponid == 31) SetPlayerHealth(playerid, HP-37);//M4
if(weaponid == 30) SetPlayerHealth(playerid, HP-34);//AK
if(weaponid == 29) SetPlayerHealth(playerid, HP-18);//MP5
if(weaponid == 34) SetPlayerHealth(playerid, HP-300);//SniperRifle
if(weaponid == 33) SetPlayerHealth(playerid, HP-35);//CuntGun
if(weaponid == 25) SetPlayerHealth(playerid, HP-40);//PumpShotgun
if(weaponid == 27) SetPlayerHealth(playerid, HP-30);//Spaz12
return 1;
}

