[Ajuda] Como defino a life que tiro cada tiro de sniper
#3

pawn Код:
#define SNIPER_DAMAGE 100.0

public OnPlayerTakeDamage(playerid, issuerid, Float:amout, weaponid)
{
    if(weaponid == 34)
    {
        new Float:health[2];
        GetPlayerHealth(playerid, health[0]);
        GetPlayerArmor(playerid, health[1]);

        if(health[1])
        {
            SetPlayerArmor(playerid, health[1] + amout - SNIPER_DAMAGE);
        }
        else
        {
            SetPlayerHealth(playerid, health[0] + amout - SNIPER_DAMAGE);
        }
    }
    return 1;
}
Reply


Messages In This Thread
[Ajuda] Como defino a life que tiro cada tiro de sniper - by master_mc - 13.12.2011, 22:48
Re: Como defino a life que tiro cada tiro de sniper - by Lуs - 13.12.2011, 22:53
Re: Como defino a life que tiro cada tiro de sniper - by AppleX - 13.12.2011, 23:07

Forum Jump:


Users browsing this thread: 2 Guest(s)