08.01.2015, 11:40
I don't remember or probably haven't seen any release that's got what you said. But it's simple to create using OnPlayerTakeDamage callback. A small example:
pawn Код:
new
p_LastHeadDamagedBy[MAX_PLAYERS][MAX_PLAYER_NAME]; //An array to store the player's name who head shot.
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID) //If it's not self inflicted
{
if(bodypart == 9)
{
new
temp_Name[MAX_PLAYER_NAME];
GetPlayerName(issuerid, temp_Name, sizeof(temp_Name));
strcpy(p_LastHeadDamagedBy[playerid], temp_Name, MAX_PLAYER_NAME); //Copy the temp_Name to "p_LastHeadDamagedBy"
}
}
return 1;
}
CMD:lastheaddamage(playerid, params[])
{
return SendClientMessage(playerid, -1, p_LastHeadDamagedBy[playerid]);
}