Player Health and Armour
#9

Quote:
Originally Posted by Weponz
Посмотреть сообщение
I don't see anything maxing out health. Although I found some flaws, try this:

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(kickback[issuerid] == 1)
    {
        if(weaponid == 30 || weaponid == 31 || weaponid == 29)
        {
            new Float:x, Float:y, Float:z, Float:angle;
            GetPlayerFacingAngle(playerid, angle);
            GetPlayerVelocity(playerid, x, y, z);

            SetPlayerVelocity(playerid, x+0.1, y+0.1, z+0.2);
            SetPlayerFacingAngle(playerid, angle);
            //God knows what is happening here..but let's carry on..
        }
    }
    if(damager[issuerid] == 1)
    {
        if(weaponid == 30 || weaponid == 31 || weaponid == 29)
        {
            new Float:Health, Float:Armour;
            GetPlayerHealth(playerid, Health);
            SetPlayerHealth(playerid, Health -30);

            GetPlayerArmour(playerid, Armour);
            SetPlayerArmour(playerid, Armour -30);
        }
    }
    return 1;
}
Thanks For Help , BTW I Still Confused With This Problem
Reply


Messages In This Thread
Player Health and Armour - by Amunra - 21.01.2016, 05:51
Re: Player Health and Armour - by Weponz - 21.01.2016, 05:58
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:04
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:07
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:09
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:12
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:18
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:24
Re: Player Health and Armour - by Amunra - 21.01.2016, 06:27
Re: Player Health and Armour - by Weponz - 21.01.2016, 06:28

Forum Jump:


Users browsing this thread: 5 Guest(s)