Need seriously help!
#1

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.

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;
}
Reply
#2

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;
}
Reply
#3

Now i at least get the message, but i get the message in my own zone and not on the others, and i dont get the message at the right coords, it is like the message "zone" is out if place
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)