pawn Код:
SetPlayerTeam(playerid, 1); // If the player with the team 1 shoots another player in team 1, no damage will be conflicted.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(GetPlayerTeam(playerid) == GetPlayerTeam(issuerid))
{
new Float:health, Float:arm;
if(GetPlayerArmour(playerid) > 0)
{
GetPlayerArmour(playerid, arm);
SetPlayerArmour(playerid, floatadd(arm, amount));
}
else
{
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, floatadd(health, amount));
}
return 1;
}
You also don't need to do this function as Neonman said, SetPlayerTeam doesn't allow you to harm another player on that team.