A little help.
#1

Hello,
I wanted to ask that how to set a player's team,like if there are teams like medical,security,and then a I type a command /faccept and it set the player team to medical or secrurity.
Reply
#2

You can with SetPlayerTeam or using variables( what I see as better way because SetPlayerTeam don't allow teamkill)
Reply
#3

lol is the wrong thing i ever heard:
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...
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
pawn Код:
if(dTeam[killerid] == dTeam[playerid] )
      {
                  SetPlayerHealth(killerid,0);
                    SendClientMessage(killerid,-1,"Kill team-mates is not allowed!");
               return 1;
       }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)