OnPlayerGiveDamage help.
#1

I made this:

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
	if(PlayerIsWounded(damagedid))
	{
		SetPlayerHealth(damagedid, 20);
	}
    return 1;
}
When player attacks the player normally it works and with gun no.. it just kills the player
Reply
#2

This callback is called BEFORE the player takes damage on thei client, so they only have 20 health when they get shot, which is low enough to get them killed. Use OnPlayerTakeDamage.
Reply
#3

Nevermind it works, I just had to set player hp to more than 60
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)