16.08.2011, 19:14
Try this out.
pawn Код:
public isPlayerInArea()
{
new Float:x,Float:y,Float:z;
for(new i=0;i<MAX_PLAYERS;i++)
{
GetPlayerPos(i,x,y,z);
if((x < 817 && x > 607) && (y < 2931 && y > 2896)) //ZoneAirwolves
{
if(GetPlayerTeam(i) != 1)
GameTextForPlayer(i,"~r~Warning: you are entering hostile airspace!",3500,5);
continue;
}
if((x < 81 && x > -2931) && (y < 2977 && y > -840)) //ZoneBluefoxes
{
if(GetPlayerTeam(i) != 2)
GameTextForPlayer(i,"~r~Warning: you are entering hostile airspace!",3500,5);
continue;
}
if((x > -2907 && x < -1027) && (y > -607 && y < 1646)) //ZoneThunderbirds
{
if(GetPlayerTeam(i) != 3)
GameTextForPlayer(i,"~r~Warning: you are entering hostile airspace!",3500,5);
continue;
}
}
return 1;
}