Posts: 930
Threads: 7
Joined: Jul 2010
Reputation:
0
Do you want it to stop damage when they shoot the player, or do you want it to warn them if they kill their own team?
Posts: 701
Threads: 91
Joined: Mar 2012
add these lines to your server !
add this like below your new lines !
Код:
new gTeam[MAX_PLAYERS];
then go to on player spawn and add these lines like if you have a team called FBI Then :
Код:
gTeam[playerid] = FBI;
and if you have a team called COP then :
Код:
gTeam[playerid] = COP;
and also add this anywhere in ur script !
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(gTeam[issuerid] == gTeam[playerid])
{
GameTextForPlayer(issuerid,"Dont Kill Team Mates !",2000,4);
}
}
return 1;
}
Hope you got it !
Posts: 106
Threads: 9
Joined: Oct 2011
Reputation:
0
Use SetPlayerTeam and then teammates can not kill each other.