22.12.2012, 17:58
Can someone please explain me, how to make an anti-team attack system.. I got the teams, i got everything simply i gave up at trying to make it so i had to post here, if anybody could help me that'd be awesome..
OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_ONE)
{
SetPlayerTeam(playerid, 1);
}
else if (gTeam[playerid] == TEAM_TWO)
{
SetPlayerTeam(playerid, 2);
}
//ect..................
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && GetPlayerTeam(playerid) == GetPlayerTeam(issuerid))return 1;
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && gTeam[playerid] == gTeam[issuerid])return 1;
return 1;
}