29.01.2014, 20:31
so I want to get damage did on player on playertakdamage and to give killerid amount of exp how many damage points he did, on player. help?
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;
}
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;
}
If you are using 0.3z:
pawn Код:
pawn Код:
|