10.01.2011, 04:32
Despite SetPlayerTeam's purpose of not allowing members of the same team to damage each other, it is very buggy. I'm not sure why, but the following code in a timer a few seconds after the player has spawned will prevent the bug from occurring.
It sets the team accordingly, but it never actually prevents from harming, or getting harmed, from other teammates. For some reason, after applying the function again, it fixes the issue.
pawn Код:
SetTeams( playerid )
{
SetPlayerTeam( playerid, GetPlayerTeam( playerid ) );
return 1;
}