Now i have done this so far, i have added all 3 zones to make them give you a warning when enter enemy zones, and to make the zones flash when inside it.
BUT... why does only the first one work? (the Thunderbirds one)
Airwolves and Bluefoxes do not work, the Thunderbirds do work for all players as it should do.
And i also had to change the coordinates manual for Thunderbirds to be bigger then the zone to make it sync with the zone, how come?
So why does only the first one working?
CODE:
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInArea(i, -2907, -600, -1025, 1646)) //Thunderbirds
{
if(GetPlayerTeam(i) != 3)
{
if(ZoneShowed[i] == false)
{
GangZoneFlashForPlayer(i,ZoneThunderbirds,COLOR_RED);
GameTextForPlayer(i, "~r~You are entering hostile ground and airspace", 6000, 3);
ZoneShowed[i] = true;
}
}
}
else if(IsPlayerInArea(i, 817, 607, 2931, 2896))//Airwolves
{
if(GetPlayerTeam(i) != 1)
{
if(ZoneShowed[i] == false)
{
GangZoneFlashForPlayer(i,ZoneAirwolves,COLOR_RED);
GameTextForPlayer(i, "~r~You are entering hostile ground and airspace", 6000, 3);
ZoneShowed[i] = true;
}
}
}
else if(IsPlayerInArea(i, 81, -2931, 2977, -840))//Bluefoxes
{
if(GetPlayerTeam(i) != 2)
{
if(ZoneShowed[i] == false)
{
GangZoneFlashForPlayer(i,ZoneBluefoxes,COLOR_RED);
GameTextForPlayer(i, "~r~You are entering hostile ground and airspace", 6000, 3);
ZoneShowed[i] = true;
}
}
}
else
{
ZoneShowed[i] = false;
GangZoneStopFlashForPlayer(i, ZoneThunderbirds);
}
}
}
return 1;
}