OnPlayerTakeDamage
#3

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(weaponid == 0)
        {
            new level = GetPlayerWantedLevel(issuerid);
            SetPlayerWantedLevel(issuerid, (level+1))
        }
    }
    return 1;
}
Edit: I wasn't aware of the existence of OnPlayerGiveDamage, so Dziugsas's code is easier, but add the weaponid-check from my code to see if the player used his fists.
Reply


Messages In This Thread
OnPlayerTakeDamage - by Clarck - 08.12.2014, 13:16
Re: OnPlayerTakeDamage - by Dziugsas - 08.12.2014, 13:20
Re: OnPlayerTakeDamage - by Schneider - 08.12.2014, 13:20
Re: OnPlayerTakeDamage - by Clarck - 08.12.2014, 13:25

Forum Jump:


Users browsing this thread: 2 Guest(s)