Factions problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Factions problem (
/showthread.php?tid=277137)
Factions problem -
CoLLYY - 16.08.2011
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];
Re: Factions problem -
Kitten - 16.08.2011
i don't actually get whats your problem can you please explain?
Re: Factions problem -
Mozz - 16.08.2011
what errors if any are you getting?
Re: Factions problem -
CoLLYY - 16.08.2011
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
Re: Factions problem -
=WoR=Varth - 17.08.2011
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