16.11.2011, 14:22
Of all this
why does only this one work?
pawn Код:
forward CheckZoneAirwolwes();
forward CheckZoneBluefoxes();
forward CheckZoneThunderbirds();
SetTimer("CheckZoneAirwolwes", 2000, 1);
SetTimer("CheckZoneBluefoxes", 2000, 1);
SetTimer("CheckZoneThunderbirds", 2000, 1);
public CheckZoneAirwolwes()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInArea(i, 817, 607, 2931, 2896)) //ZoneAirwolves
{
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
{
ZoneShowed[i] = false;
GangZoneStopFlashForPlayer(i, ZoneAirwolves);
}
}
}
return 1;
}
public CheckZoneBluefoxes()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInArea(i, 81, -2931, 2977, -840)) //Bluefoxes
{
if(GetPlayerTeam(i) != 2)
{
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
{
ZoneShowed[i] = false;
GangZoneStopFlashForPlayer(i, ZoneBluefoxes);
}
}
}
return 1;
}
public CheckZoneThunderbirds()
{
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
{
ZoneShowed[i] = false;
GangZoneStopFlashForPlayer(i, ZoneThunderbirds);
}
}
}
return 1;
}
pawn Код:
public CheckZoneThunderbirds()
{
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
{
ZoneShowed[i] = false;
GangZoneStopFlashForPlayer(i, ZoneThunderbirds);
}
}
}
return 1;
}