16.08.2011, 19:06
Is there any wrong with this? because exactly nothing is showing up when you enter these zones.
What im i doing wrong?
i have also tried that one on wiki in all orders for testing, but i do not die..
if i have the same coords on zones and on isPlayerInArea it should give me a gametext when i enter one of these zones from any directions from outside.
What im i doing wrong?
i have also tried that one on wiki in all orders for testing, but i do not die..
if i have the same coords on zones and on isPlayerInArea it should give me a gametext when i enter one of these zones from any directions from outside.
pawn Код:
forward isPlayerInArea();
new ZoneThunderbirds;
new ZoneAirwolves;
new ZoneBluefoxes;
public OnGameModeInit()
{
SetTimer("isPlayerInArea", 1000, 1);
return 1;
}
GangZoneShowForPlayer(playerid, ZoneThunderbirds, 0xFFFF0015);
GangZoneShowForPlayer(playerid, ZoneAirwolves, 0x00000060);
GangZoneShowForPlayer(playerid, ZoneBluefoxes, 0x0000FF27);
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)
{
} else {
GameTextForPlayer(i,"~r~Warning: you are entering hostile airspace!",3500,5);
}
}
if(x >= 81 && x <= -2931 && y >= 2977 && y <= -840) //ZoneBluefoxes
{
if(GetPlayerTeam(i) == 2)
{
} else {
GameTextForPlayer(i,"~r~Warning: you are entering hostile airspace!",3500,5);
}
}
if(x >= -2907 && x <= -1027 && y >= -607 && y <= 1646) //ZoneThunderbirds
{
if(GetPlayerTeam(i) == 3)
{
} else {
GameTextForPlayer(i,"~r~Warning: you are entering hostile airspace!",3500,5);
}
}
}
return 1;
}