14.08.2014, 19:52
Untested:
pawn Код:
new shot[MAX_PLAYERS];
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID) // If not self-inflicted
{
new
weaponName[24],
victimName[MAX_PLAYER_NAME],
attackerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, victimName, sizeof (victimName));
GetPlayerName(issuerid, attackerName, sizeof (attackerName));
GetWeaponName(weaponid, weaponName, sizeof (weaponName));
shot[playerid]++;
if(IsHurt[playerid] == 0)
{
new string[64];
format(string,sizeof(string),"(( Has been injured %d times, Weapon: %s ))", shot[playerid], weaponName);
new Text3D:wounded;
wounded = Create3DTextLabel(string, 0xAA3333AA, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(wounded, playerid, 0.0, 0.0, 0.7);
Update3DTextLabelText(wounded, 0xAA3333AA, string);
}
}
return 1;
}