Damage and exp
#5

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
If you are using 0.3z:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid)
    {
        PlayerInfo[issuerid][Experience] += amount; //This is an example, you may have something other than PlayerInfo[issuerid][Experience] to define your experience level.
        //NOTE: The person HITTING the player is 'issuerid', not 'playerid'.
    }
    return 1;
}
Versions earlier than 0.3z:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid)
    {
        PlayerInfo[issuerid][Experience] += amount; //This is an example, you may have something other than PlayerInfo[issuerid][Experience] to define your experience level.
        //NOTE: The person HITTING the player is 'issuerid', not 'playerid'.
    }
    return 1;
}
+reputation Thank you so much!
Reply


Messages In This Thread
Damage and exp - by xZdadyZx - 29.01.2014, 20:31
Re: Damage and exp - by Excelize - 30.01.2014, 05:22
Re: Damage and exp - by xZdadyZx - 30.01.2014, 06:02
Re: Damage and exp - by Threshold - 30.01.2014, 10:11
Re: Damage and exp - by xZdadyZx - 30.01.2014, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)