Need a Anti-Kill
#1

Team_Army
Team_Cop
Reply
#2

Try this.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if((killerid != INVALID_PLAYER_ID) && (GetPlayerTeam(killerid) == GetPlayerTeam(playerid)))
    {
        SendClientMessage(playerid, -1, "You have been kicked for killing your own teammate.");
        return Kick(playerid);
    }
   
    return 1;
}
Reply
#3

My Team are
Team_Army
Team_Cop
where i put the team
Reply
#4

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
My Team are
Team_Army
Team_Cop
where i put the team
Try that first.
Reply
#5

i don't wanna the kick one
Team_Army
Team_Cop
Can't kill team
its something like dis
https://sampforum.blast.hk/showthread.php?tid=409297
Код:
 if(gTeam[playerid] == Team_Cop || gTeam[playerid] == Team_Army || gTeam[playerid] == Team_FBI)
	    {
	        format(string, 120, "%s was killed by %s (%s)", PlayerInfo(playerid), PlayerInfo(killerid), aWeaponNames[reason]);
			print(string);
			return 1;
		}
Reply
#6

Why are you using a variable to store the player's team ID? There are perfectly good Set/GetPlayerTeam functions. Setting the players' teams will also not allow them to kill each other.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)