12.06.2017, 14:03
PHP Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_PLAYER)
{
if(hitid != INVALID_PLAYER_ID)
{
new Float:hp;
GetPlayerHealth(hitid, hp);
if(hp <= 5.0 && GetPlayerWeapon(playerid) == WEAPON_DEAGLE) return 0; //Return 0 means the one who got shot (hitid) is not going to take damage
//Change the hp as you wish it but that's how i understand what you said
}
}
return 1;
}