Posts: 438
Threads: 54
Joined: Mar 2013
Quote:
Originally Posted by GameOvr
Actually you dont have to do this stuff for anti team kill
SetPlayerTeam covers it all
pawn Code:
//make other teams also like this in OnPlayerSpawn if(pTeam[playerid] == TEAM_POLICE) { pTeam[playerid] = TEAM_POLICE; SetPlayerTeam(playerid, pTeam[playerid]); } else if(pTeam[playerid] == TEAM_CIVILLIAN) { pTeam[playerid] = TEAM_CIVILLIAN; SetPlayerTeam(playerid, pTeam[playerid]); }
And remove all your codes in OnPlayerTakeDamage
This will make players in same team unable to kill each other! And they can kill players on other teams
|
What if they are civillians. Also i have
pawn Code:
SetPlayerTeam(playerid, pTeam[playerid]);
under OnPlayerSpawn