08.02.2018, 12:49
I want to make custom damage system but I have an issue. I tried everything - I wanted to make player deathless from everyweapon. It works! But, weaponid 0 always take damage. Why?
Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
new Float:HP;
GetPlayerHealth(damagedid, HP);
SetPlayerHealth(damagedid, HP);
return 1;
}
Tried to make it with OnPlayerTakeDamage but it always first stolen player's HP and restored it back.
// Edit: Sorry, I forgot to say: I'm on lastest 0.3.8 SAMP Version.
Code:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
new Float:HP;
GetPlayerHealth(damagedid, HP);
SetPlayerHealth(damagedid, HP);
return 1;
}
Tried to make it with OnPlayerTakeDamage but it always first stolen player's HP and restored it back.
// Edit: Sorry, I forgot to say: I'm on lastest 0.3.8 SAMP Version.