OnPlayerTakeDamage
#1

Hello, I'm making a Taser system and I have some questions.

How I can make that the Taser Weapon (currently silenced pistol) don't take health to player?
I don't want to add the amount to his health because when a player has, for example, 10hp he'll die inmediately and will be a little buggy. Here's my actual code:

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(PlayerInfo[issuerid][pFaction] == 1 && PD_Taser[issuerid] == 1 && weaponid == 23)
	{
		if(Paralized[playerid] == 0)
		{
 			new Float:health;
        	GetPlayerHealth(playerid, health);
        	SetPlayerHealth(playerid, health+amount);
            ApplyAnimation(playerid, "SWEET", "LaFin_Sweet", 4.1, 0, 1, 1, 1, 0);
            TogglePlayerControllable(playerid, 0);
            Paralized[playerid] = 1;
            SetTimerEx("Tazz", 10000, false, "i", playerid);
       }
	}
 	return 1;
}
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: 1 Guest(s)