SA-MP Forums Archive
Extra Weapon Damage BUG [Searched] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Extra Weapon Damage BUG [Searched] (/showthread.php?tid=240178)



Extra Weapon Damage BUG [Searched] - oLiMp - 15.03.2011

Hi, I have a problem with adding an extra damage to weapon. I've already searched the forums and didn't find the solution. I'm using Double-O-Seven's OnPlayerShootPlayer function and .LaaRs.'s Real Weapon Damage FS which I edited a bit. (Changed only weapon damage).
The problem is when I shoot player, no matter which weapon he dies from just 1 bullet.

I recorded a video:
[ame]http://www.youtube.com/watch?v=ALNQYz5M-7A[/ame]

Here is the code of Colt45 and AK-47
pawn Код:
#define COLT45_DAMAGE 45.0
#define AK47_DAMAGE 40.0
pawn Код:
if(GetPlayerWeapon(shooter) == 22) //colt45
{
    new Float:armour;
    GetPlayerArmour(target,armour);
    new Float:health;
    GetPlayerHealth(target,health);
    if(armour == 0)
    {
        SetPlayerHealth(target,health+damage-COLT45_DAMAGE);
    }
    else
    {
        SetPlayerArmour(target,armour+damage-COLT45_DAMAGE);
    }
}
if(GetPlayerWeapon(shooter) == 30) //ak47
{
    new Float:armour;
    GetPlayerArmour(target,armour);
    new Float:health;
    GetPlayerHealth(target,health);
    if(armour == 0)
    {
        SetPlayerHealth(target,health+damage-AK47_DAMAGE);
    }
    else
    {
        SetPlayerArmour(target,armour+damage-AK47_DAMAGE);
    }
}
Someone please help with this!


Re: Extra Weapon Damage BUG [Searched] - Stigg - 15.03.2011

Video is set to private.


Re: Extra Weapon Damage BUG [Searched] - oLiMp - 15.03.2011

Sorry! Edited, now it's public...


Re: Extra Weapon Damage BUG [Searched] - oLiMp - 15.03.2011

bump! anyone?