02.08.2013, 20:50
I'm struggling to correctly disable weapon from the silenced pistol whilst the player has their taser armed. Sometimes it doesn't do any damage at all, sometimes it manages to kill the player, and sometimes it actually heals the player. Here's my code:
I'm just struggling to understand why it would heal the player.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new string[128];
if(tazerArmed[issuerid] == 1)
{
if(weaponid == 23)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, (health + amount));
}
}
return 1;
}