[Tutorial] Simple Realistic Damage Values
#17

Quote:
Originally Posted by AceFlyer
View Post
pawn Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP,Float:A;
    GetPlayerHealth(playerid, HP);
    GetPlayerArmour(playerid,A);
    if(A > 0.0)
    {
        if(weaponid == 31) SetPlayerArmour(playerid, A+amount-25);
        if(weaponid == 30) SetPlayerArmour(playerid, A+amount-26);
        if(weaponid == 34) SetPlayerArmour(playerid, A+amount-90);
        if(weaponid == 29) SetPlayerArmour(playerid, A+amount-20);
        if(weaponid == 24) SetPlayerArmour(playerid, A+amount-50);
        if(weaponid == 4) SetPlayerArmour(playerid, A+amount-60);
        if(weaponid == 26) SetPlayerArmour(playerid, A+amount-30);
        if(weaponid == 32) SetPlayerArmour(playerid, A+amount-20);
    }
    else
    {
        if(weaponid == 31) SetPlayerHealth(playerid, HP+amount-25);
        if(weaponid == 30) SetPlayerHealth(playerid, HP+amount-26);
        if(weaponid == 34) SetPlayerHealth(playerid, HP+amount-90);
        if(weaponid == 29) SetPlayerHealth(playerid, HP+amount-20);
        if(weaponid == 24) SetPlayerHealth(playerid, HP+amount-50);
        if(weaponid == 4) SetPlayerHealth(playerid, HP+amount-60);
        if(weaponid == 26) SetPlayerHealth(playerid, HP+amount-30);
        if(weaponid == 32) SetPlayerHealth(playerid, HP+amount-20);
    }
    return 1;
}
im not sure whether that would work though.
Guess this will not work, when player's will have more then 0 armour and you shoot him he will lost armour BUT, after another shot armour will be increased to 100. That's what I think.
Reply


Messages In This Thread
Simple Realistic Damage Values - by zDevon - 31.03.2012, 03:11
Re: Simple Realistic Damage Values - by Reklez - 31.03.2012, 03:13
Re: Simple Realistic Damage Values - by MP2 - 31.03.2012, 03:14
Re: Simple Realistic Damage Values - by zDevon - 31.03.2012, 03:15
Re: Simple Realistic Damage Values - by MP2 - 31.03.2012, 03:16
Re: Simple Realistic Damage Values - by AceFlyer - 31.03.2012, 03:27
Re: Simple Realistic Damage Values - by zDevon - 31.03.2012, 03:33
Re: Simple Realistic Damage Values - by AceFlyer - 31.03.2012, 03:38
Re: Simple Realistic Damage Values - by zDevon - 31.03.2012, 03:44
Re: Simple Realistic Damage Values - by AceFlyer - 31.03.2012, 03:51
Re: Simple Realistic Damage Values - by zDevon - 31.03.2012, 03:53
Re: Simple Realistic Damage Values - by MP2 - 31.03.2012, 04:06
Re: Simple Realistic Damage Values - by AceFlyer - 31.03.2012, 04:19
Re: Simple Realistic Damage Values - by XFlawless - 31.03.2012, 04:20
Re: Simple Realistic Damage Values - by MP2 - 31.03.2012, 06:14
Re: Simple Realistic Damage Values - by System64 - 31.03.2012, 06:16
Re: Simple Realistic Damage Values - by Smacky - 31.03.2012, 07:56
Re: Simple Realistic Damage Values - by Wickeed - 31.03.2012, 08:03
Re: Simple Realistic Damage Values - by Nicholas. - 02.04.2012, 02:38
Re: Simple Realistic Damage Values - by 2KY - 02.04.2012, 02:48
Re: Simple Realistic Damage Values - by [ABK]Antonio - 02.04.2012, 03:04
Re: Simple Realistic Damage Values - by rati555 - 02.04.2012, 11:42
Re: Simple Realistic Damage Values - by [ABK]Antonio - 02.04.2012, 17:36
Re: Simple Realistic Damage Values - by DaRealShazz - 06.06.2012, 21:11
Re: Simple Realistic Damage Values - by Keelo - 18.07.2012, 15:08
Re: Simple Realistic Damage Values - by Coder_ - 19.07.2012, 10:16
Re: Simple Realistic Damage Values - by Coder_ - 31.07.2012, 19:36
Respuesta: Simple Realistic Damage Values - by Pottus - 05.08.2012, 20:45
Re: Simple Realistic Damage Values - by KingHual - 03.10.2012, 11:28
Re: Simple Realistic Damage Values - by Dziugsas - 09.05.2016, 05:31
Re: Simple Realistic Damage Values - by Manyula - 09.05.2016, 06:41
Re: Simple Realistic Damage Values - by pWesley - 10.05.2016, 19:05
Re: Simple Realistic Damage Values - by iSpy - 14.05.2016, 12:23
Re: Simple Realistic Damage Values - by TheMallard - 30.05.2016, 00:54
Re: Simple Realistic Damage Values - by Markhoss - 15.07.2016, 02:58
Re: Simple Realistic Damage Values - by Sibuscus - 16.03.2017, 15:19
Re: Simple Realistic Damage Values - by Dirda - 24.02.2018, 11:51

Forum Jump:


Users browsing this thread: 1 Guest(s)