01.08.2012, 19:22
lol is the wrong thing i ever heard:
in top of script
you will must/can replace RED/ Blue with your team name this was only an example
and now you can do the rest and for anti team kill
in top of script
pawn Код:
#define TEAM_RED 0
#define TEAM_BLUE 1
new dTeam[MAX_PLAYERS];
for setting the team
dTeam[playerid] = value // exaple dTeam[playerid] = TEAM_BLUE/RED or your team this think with red/blue was an ideea
for veffy is is in that team
if(dTeam[playerid] != TEAM_RED) return 0; //so if team is not = with red => will not return the value , so nothing will be happened...
and now you can do the rest and for anti team kill
pawn Код:
if(dTeam[killerid] == dTeam[playerid] )
{
SetPlayerHealth(killerid,0);
SendClientMessage(killerid,-1,"Kill team-mates is not allowed!");
return 1;
}