08.01.2015, 11:31
is there any script/like this on the lsrp if you type /damages [ID] it will show where the player was shoot > head / leg .... weapon > who shoot does anyone have this script ?
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]);
}