Factions problem
#1

HI !


I just made the gangzone script with that tutorial:

https://sampforum.blast.hk/showthread.php?tid=276352

So,I don't know how I can that my factions with id 5,6,12,13,14,15

to be represented by :

Код:
new Teams[] = {
    TEAM_PATERNO,
    TEAM_CORLEONE,
    TEAM_BARZINI,
    TEAM_TATTAGLIA,
    TEAM_CUNEO,
    TEAM_STRACCI,
    TEAM_RANDOM
};
I think that here is the problem and here i must to edit something...

Код:
public ZoneTimer()
{
    for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
    {
        if(ZoneAttacker[i] != -1) // zone is being attacked
        {
            if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone
            {
                ZoneAttackTime[i]++;
                if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
                {
                    GangZoneStopFlashForAll(ZoneID[i]);
                    SendClientMessage(i,COLOR_RED, "Gangzone-ul a fost cucerit !");
                    ZoneInfo[i][zTeam] = ZoneAttacker[i];
                    GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
                    ZoneAttacker[i] = -1;
                }
            }
            else // attackers failed to take over the zone
            {
                GangZoneStopFlashForAll(ZoneID[i]);
                SendClientMessage(i,COLOR_RED, "Gangzone-ul nu a putut fi cucerit!");
                ZoneAttacker[i] = -1;
            }
        }
        else // check if somebody is attacking
        {
            for(new t=0; t < sizeof(Teams); t++) // loop all teams
            {
                if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone
                {
                    ZoneAttacker[i] = Teams[t];
                    ZoneAttackTime[i] = 0;
                    SendClientMessageToAll(COLOR_RED, "Tocmai a izbucnit un gangwar,asa ca verifica daca este al tau !");
                    GangZoneFlashForAll(ZoneID[i], GetTeamZoneColor(ZoneAttacker[i]));
                }
            }
        }
    }
}
Thank you !!

I'm using gTeam[MAX_PLAYERS];
Reply
#2

i don't actually get whats your problem can you please explain?
Reply
#3

what errors if any are you getting?
Reply
#4

I get no error but my factions are setted on ID 0 .

I want to be on id 5,6,12,13,14,15

TEAM_PATERNO, ID 5
TEAM_CORLEONE, ID 6
TEAM_BARZINI,ID 12
TEAM_TATTAGLIA,ID 13
TEAM_CUNEO, ID 14
TEAM_STRACCI,ID 15
Reply
#5

pawn Код:
#define TEAM_PATERNO 5
#define TEAM_CORLEONE 6
#define TEAM_BARZINI 12
#define TEAM_TATTAGLIA 13
#define TEAM_CUNEO 14
#define TEAM_STRACCI 15
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)