OnPlayerTakeDamage
#2

You can do all of that stuff under OnPlayerWeaponShot and return 0 to desync the bullet so it won't take any damage.
Like this:
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
        if (hittype == BULLET_HIT_TYPE_PLAYER)
	{
		if(PlayerInfo[playerid][pFaction] == 1 && PD_Taser[playerid] == 1 && weaponid == 23)
		{
			if(Paralized[hitid] == 0)
			{
				new Float:health;
				GetPlayerHealth(hitid, health);
				SetPlayerHealth(hitid, health+amount);
				ApplyAnimation(hitid, "SWEET", "LaFin_Sweet", 4.1, 0, 1, 1, 1, 0);
				TogglePlayerControllable(hitid, 0);
				Paralized[hitid] = 1;
				SetTimerEx("Tazz", 10000, false, "i", hitid);
		        }
		        return 0;
		}
	}
        return 1;
}
Or you can set everyone to the same team and create your own damages and if you shoot someone with a tazer then just don't take damage.
Reply


Messages In This Thread
OnPlayerTakeDamage - by HidroDF - 27.12.2016, 19:09
Re: OnPlayerTakeDamage - by GoldenLion - 27.12.2016, 19:16
Respuesta: OnPlayerTakeDamage - by HidroDF - 27.12.2016, 19:20
Re: Respuesta: OnPlayerTakeDamage - by GoldenLion - 27.12.2016, 19:22
Re: OnPlayerTakeDamage - by Clora - 27.12.2016, 19:23
Re: OnPlayerTakeDamage - by GoldenLion - 27.12.2016, 19:25
Respuesta: OnPlayerTakeDamage - by HidroDF - 27.12.2016, 19:39

Forum Jump:


Users browsing this thread: 2 Guest(s)