21.04.2016, 17:20
Try changing your whole code with this:
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(weaponid == 34 || weaponid == 23)
{
if(bodypart == 9)
{
if(gTeam[playerid] == gTeam[issuerid])
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, -1, "You can't headshot your teammates");
}
else
{
SetPlayerHealth(playerid, 0);
}
}
}
}
return 1;
}