Help a bit?
#1

I trying to make so weapons take more damnge but wont work

pawn Код:
}

stock DoDamage(playerid, targetid, bodypart, weaponid)
{
    static
        bodyparttext[16],
        string[68],
        DamageType,
        Float:IncreasedDamage,
        Float:health,
        Float:armour;
       
    GetPlayerHealth(targetid, health);
    GetPlayerArmour(targetid, armour);
    GetWeaponNameEx(weaponid, string, sizeof(string));
    switch(bodypart) {
        case 1: bodyparttext = "BODY_PART_HEAD",DamageType = 1;
        case 2: bodyparttext = "BODY_PART_TORSO",DamageType = 2;
        case 3: bodyparttext = "BODY_PART_LEGS",DamageType = 3; }
    switch(weaponid) {
        case 23: IncreasedDamage = SDPistolDMG; // SD Pistol
        case 24: IncreasedDamage = DeagleDMG; // Desert Eagle
        case 25: IncreasedDamage = ShotgunDMG; // Shotgun
        case 28: IncreasedDamage = UziDMG; // UZI
        case 30: IncreasedDamage = AK47DMG; // AK47
        case 31: IncreasedDamage = M4A1DMG; // M4A1
        case 32: IncreasedDamage = Tec9DMG; // Tec9
        case 33: IncreasedDamage = CountryRifleDMG; // Country Rifle
    }
    if(armour > 10) {
        if(DamageType == 1) { IncreasedDamage += 8.6; }
        else if(DamageType == 2) { IncreasedDamage += 6.6; }
        else if(DamageType == 3) { IncreasedDamage += 4.5; }
        SetPlayerArmour(targetid, armour-IncreasedDamage); }
    else if(health > 13) {
        if(DamageType == 1) { IncreasedDamage += 50.0; }
        else if(DamageType == 2) { IncreasedDamage += 50.0; }
        else if(DamageType == 3) { IncreasedDamage += 50.0; }
        SetPlayerHealth(targetid, health-IncreasedDamage); }
    if(health-IncreasedDamage == 0 || health-IncreasedDamage < 0) { Died[targetid] = 1; }
    return 1;
}
Reply


Messages In This Thread
Help a bit? - by N0FeaR - 15.08.2012, 08:57
Re: Help a bit? - by SaYrOn - 15.08.2012, 10:18
Re: Help a bit? - by JaKe Elite - 15.08.2012, 10:21
Re: Help a bit? - by SaYrOn - 15.08.2012, 10:31

Forum Jump:


Users browsing this thread: 2 Guest(s)