Teams help
#10

Quote:
Originally Posted by (SF)Noobanatior
set gTeam for everyplayer on the server and then the SetPlayerTeam just for the cops
then just check if(gTeam[killerid] == gTeam[playerid]) //teamkill for the other teams

and no one can kill you coz you are setting the players team to 1 for everyone when they spawn you only want to do this for the cop skins
I have already done this.


pawn Код:
SetPlayerTeamFromClass(playerid, classid) {

 if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 10) {

        gTeam[playerid] = TEAM_COP;

    } else if(classid == 8) {

      gTeam[playerid] = TEAM_ARMY;

    } else if(classid == 9) {

      gTeam[playerid] = TEAM_CASSEC;

    } else if(classid == 11) {

      gTeam[playerid] = TEAM_AIRSUPPORT;

    } else if(classid == 12) {

      gTeam[playerid] = TEAM_MARINE;

    } else if(classid == 13) {

      gTeam[playerid] = TEAM_JAILTK;

    } else if(classid == 14) {

      gTeam[playerid] = TEAM_MEDIC;

    } else if(classid == 15) {

      gTeam[playerid] = TEAM_MECHANIC;

    } else if(classid == 16) {

      gTeam[playerid] = TEAM_BISTRO;

    } else if(classid == 17 || classid == 18) {

      gTeam[playerid] = TEAM_DRIVER;

  } else if(classid >= 19 && classid <= 64) {

      gTeam[playerid] = TEAM_CIVIL;


    }

}

Do you mean under onplayerspawn?
Reply


Messages In This Thread
Teams help - by MWF2 - 16.06.2010, 19:16
Re: Teams help - by MWF2 - 17.06.2010, 01:42
Re: Teams help - by (SF)Noobanatior - 17.06.2010, 05:01
Re: Teams help - by MWF2 - 17.06.2010, 12:21
Re: Teams help - by ViruZZzZ_ChiLLL - 17.06.2010, 14:08
Re: Teams help - by MWF2 - 17.06.2010, 21:18
Re: Teams help - by ruckfules99 - 18.06.2010, 00:27
Re: Teams help - by MWF2 - 18.06.2010, 03:40
Re: Teams help - by (SF)Noobanatior - 18.06.2010, 05:53
Re: Teams help - by ruckfules99 - 18.06.2010, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)