Need Anti Team Killing
#1

Found The Requesting....
Reply
#2

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?
Reply
#3

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 !
Reply
#4

Use SetPlayerTeam and then teammates can not kill each other.
Reply
#5

I Got It dude!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)