How i use onplayertakedamage?
#1

How can i create an system to set back the damage to health for admin?

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(AdminProtection[playerid] == 1) // If not self-inflicted
    {
      new Float:health;
      GetPlayerHealth(playerid,health);
      SetPlayerHealth(playerid, health + amount);
    }
    return 1;
}
Reply
#2

You don't need it for this, just use OnPlayerWeaponShot() and return 0; if the player has admin protection.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)