Teams problem
#1

I'm trying to make it so teams cannot hurt each other (like in a TDM)


It's not working, im using SetPlayerTeam,

PROBLEM: The problem is, Cops cannot attack each other BUT, Neither can any other team. So if Team_mechanic attacks Team_Cop, The cops are still not taking damage


This is how i setup my team
pawn Код:
#define TEAM_COP 1

SetPlayerToTeamColour(playerid)
{

    if(gTeam[playerid] == TEAM_COP) {
    }

}


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;
    }

}


SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_COP) {
        SetPlayerColor(playerid, COLOR_BLUE);
    }
    return 1;
}


if(gTeam[playerid] == TEAM_COP)
{
    SetPlayerTeam(playerid, TEAM_COP);
    SetPlayerPos( playerid, 1573.7228,-1694.9384,6.2188);
    SendClientMessage(playerid,0x1E90FFAA, "Type /commands for your commands");
    SendClientMessage(playerid,0x1E90FFAA, "POLICE OFFICER: Your job is to keep criminals off the streets of San Andreas");
    SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
    TextDrawShowForPlayer(playerid, COPBOX);
    TextDrawShowForPlayer(playerid, text11);
    TextDrawShowForPlayer(playerid, text12);
    TextDrawShowForPlayer(playerid, text13);
    TextDrawShowForPlayer(playerid, text14);
    hastazer[playerid] =1;
    HasLawEnforcementRadio[playerid] =1;
    LawEnforcementRadio[playerid] =1;
    TextDrawShowForPlayer(playerid,txtTypeSkill1);
    CanChooseSkill[playerid] = 0;
}
Reply


Messages In This Thread
Teams problem - by MWF2 - 11.07.2010, 01:44
Re: Teams problem - by cessil - 11.07.2010, 02:51
Re: Teams problem - by MWF2 - 11.07.2010, 03:16
Re: Teams problem - by MWF2 - 11.07.2010, 21:45
Re: Teams problem - by DJDhan - 12.07.2010, 00:39
Re: Teams problem - by MWF2 - 12.07.2010, 03:52
Re: Teams problem - by FreshKilla - 12.07.2010, 07:59

Forum Jump:


Users browsing this thread: 3 Guest(s)