02.04.2015, 19:17
"bodypart" is supposed to be a variable and it can be retrieved from the callback itself than defining an array. This is how it should look like:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(PlayerIsWounded(playerid))
{
SetPlayerHealth(playerid, 1000.0);
}
if((0 <= weaponid <= 46) || weaponid == 54)
{
// new bodypart[128];
if(BODY_PART_TORSO <= bodypart <= BODY_PART_HEAD) Damage[playerid][(bodypart - 3)][weaponid]++;
}
return 1;
}