Damage help!
#7

pawn Код:
#define EvaluateDamage(%0); \
if (floatcmp(%0, AP) == 1) { Remain = floatsub(%0, AP); SetPlayerArmour(playerid, 0.0); \
SetPlayerHealth(playerid, HP - Remain); } \
else { SetPlayerArmour(playerid, floatsub(AP, %0)); }

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP, Float:AP, Float:Remain;
    GetPlayerHealth(playerid, HP);
    GetPlayerArmour(playerid, AP);
    if(weaponid == 24) { EvaluateDamage(40); } //DesertEagle
    if(weaponid == 22) { EvaluateDamage(30); } //Colt45
    if(weaponid == 32) { EvaluateDamage(15); } //Tec9
    if(weaponid == 28) { EvaluateDamage(15); } //Uzi
    if(weaponid == 23) { EvaluateDamage(35); } //SilencedColt
    if(weaponid == 31) { EvaluateDamage(37); } //M4
    if(weaponid == 30) { EvaluateDamage(34); } //AK
    if(weaponid == 29) { EvaluateDamage(18); } //MP5
    if(weaponid == 34) { EvaluateDamage(300); } //SniperRifle
    if(weaponid == 33) { EvaluateDamage(35); } //CuntGun
    if(weaponid == 25) { EvaluateDamage(40); }//PumpShotgun
    if(weaponid == 27) { EvaluateDamage(30); } //Spaz12
    return 1;
}
Reply


Messages In This Thread
Damage help! - by Zachlive - 14.09.2012, 00:55
Re: Damage help! - by Lordzy - 14.09.2012, 01:05
Re: Damage help! - by Zachlive - 14.09.2012, 01:28
Re: Damage help! - by Zachlive - 14.09.2012, 21:57
Re: Damage help! - by clarencecuzz - 14.09.2012, 22:57
Re: Damage help! - by SuperViper - 14.09.2012, 23:22
Re: Damage help! - by KoczkaHUN - 14.09.2012, 23:32

Forum Jump:


Users browsing this thread: 5 Guest(s)