Realistic weapon damage
#6

Abagail, Yes you right, Danice or anou1 can use to ADD damage but by "wiki" OnplayerTakeDamage and OnPlayerGiveDamage
Quote:

amount The amount of dagmage the player took (health and armour combined).

P.S. Danice, No I think you can't, OnPlayerTakeDamage it is called when Player takes damage so you only can add damage to him...
EDIT: Really you can you need to add Float:amount and then minus damage what you want
This should work... But I don't really know how to add if player armour and hp(together) was lost
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:Armour,Float:HP;
    GetPlayerArmour(playerid,Armour);
    GetPlayerHealth(playerid,HP);
    if (HP == 100)
    {
        SetPlayerArmour(playerid,Armour+amount);
        if(weaponid == 24) SetPlayerArmour(playerid,Armour-45);
    }
    else
    {
        SetPlayerHealth(playerid,HP+amount);
        if(weaponid == 24) SetPlayerHealth(playerid, HP-45);
    }
}
Reply


Messages In This Thread
Realistic weapon damage - by DaniceMcHarley - 10.02.2014, 19:11
Re: Realistic weapon damage - by anou1 - 10.02.2014, 19:16
Re: Realistic weapon damage - by [EnErGyS]KING - 10.02.2014, 19:22
Re: Realistic weapon damage - by anou1 - 10.02.2014, 19:37
Re: Realistic weapon damage - by Abagail - 10.02.2014, 19:40
Re: Realistic weapon damage - by [EnErGyS]KING - 10.02.2014, 19:51
Re: Realistic weapon damage - by DaniceMcHarley - 10.02.2014, 20:08
Re: Realistic weapon damage - by CuervO - 10.02.2014, 20:13
Re: Realistic weapon damage - by [EnErGyS]KING - 10.02.2014, 20:17
Re: Realistic weapon damage - by DaniceMcHarley - 11.02.2014, 06:21

Forum Jump:


Users browsing this thread: 5 Guest(s)