OnPlayerTakeDamage +REP
#1

Okay i'm trying to make something epic.. when he shots his chest only the armor get lost not their health okay here's my code

Код:
	if(issuerid != INVALID_PLAYER_ID && weaponid == 22 && bodypart == 4)
    {
  		new Float:ARMOR;
  		GetPlayerArmour(playerid, ARMOR);
  		if(ARMOR > 0)
  		{
			SetPlayerArmour(playerid, -26);
  		}
        if(ARMOR == 0)
        {
        	new Float:HP;
        	RemovePlayerAttachedObject(playerid,1);
        	RemovePlayerAttachedObject(playerid,6);
			HasArmour[playerid] = 0;
    		GetPlayerHealth(playerid, HP);
			SetPlayerHealth(playerid, HP-60);
			SetPlayerDrunkLevel(playerid, 500000);
			TextDrawShowForPlayer(playerid, Danio);
			TT[playerid] = SetTimerEx("Damage", 250, 1, "i", playerid);
			TC[playerid] = SetTimerEx("Blood", 10000, 1, "i", playerid);
		}
	}
i made it for bodypart 3 and 4 only, it works perfect but when the armor's gone to 0 it returns again to 1000 i've tried multipe times to make it but i failed and one more thing i don't want the damage to be -25 can i make it to regular damage, i tried return 1; but it doesn't work i think there's a messing part please answer me as soon as possible
Reply


Messages In This Thread
OnPlayerTakeDamage +REP - by Antoniohl - 22.04.2015, 13:29
Re: OnPlayerTakeDamage +REP - by Azula - 22.04.2015, 13:40
Re: OnPlayerTakeDamage +REP - by Antoniohl - 22.04.2015, 13:58
Re: OnPlayerTakeDamage +REP - by R0 - 22.04.2015, 14:25
Re: OnPlayerTakeDamage +REP - by Antoniohl - 22.04.2015, 14:40
Re: OnPlayerTakeDamage +REP - by Pottus - 22.04.2015, 15:04
Re: OnPlayerTakeDamage +REP - by Antoniohl - 22.04.2015, 17:13

Forum Jump:


Users browsing this thread: 2 Guest(s)