public OnPlayerTakeDamage
#1

Ok, i'm sure i've probably posted too many help threads this past week, what was it? 3? =3

Anyways, i'm having an issue with OnPlayerTakeDamage. I'm basically using it so people won't be idiots, and it'd force them to actually take cover and maybe rp their shootouts (rp server =3). Anyways, with this, it makes the armor useless, so i've come up with something that would hopefully make it deduct the armor first, but instead it one hit kills, or just doesn't even work. Maybe one of you would have better luck solving that issue

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
	new Float:HP;
	new Float:AR;
	GetPlayerArmour(playerid,AR);
	if(PlayerInfo[playerid][pSArmour] >= 2)
	{
	    if(weaponid == 22) SetPlayerArmour(playerid, AR-50);
	    if(weaponid == 34) SetPlayerArmour(playerid, AR-200);
	    if(weaponid == 33) SetPlayerArmour(playerid, AR-100);
	    if(weaponid == 25) SetPlayerArmour(playerid, AR-70);
	    return 1;
	}
	else
	{
	    if(weaponid == 22) SetPlayerHealth(playerid, HP-50);
	    if(weaponid == 34) SetPlayerHealth(playerid, HP-200);
		if(weaponid == 33) SetPlayerHealth(playerid, HP-100);
		if(weaponid == 25) SetPlayerHealth(playerid, HP-70);
	}
	return 1;
}
Reply
#2

Link please, cuz i can't find it.
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=38965&page=396

Here you are.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)