OnPlayerTakeDamage
#1

hello how can I make the player receive wanted level when punch someone??
Reply
#2

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
    
SetPlayerWantedLevel(playerid,level);
    return 
1;

Reply
#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
#4

thanks ... I will do
+ rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)