30.01.2014, 10:11
If you are using 0.3z:
Versions earlier than 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;
}
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;
}