SA-MP Forums Archive
Question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question (/showthread.php?tid=297532)



Question - cruising - 16.11.2011

Of all this

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;
}
why does only this one work?
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;
}



Re: Question - MP2 - 16.11.2011

Debug.


Re: Question - cruising - 16.11.2011

Quote:
Originally Posted by MP2
Посмотреть сообщение
Debug.
what?


Re: Question - TheJayMan - 16.11.2011

Quote:
Originally Posted by cruising
Посмотреть сообщение
what?
Does it show an error or warning when you debug?


Re: Question - cruising - 16.11.2011

Quote:
Originally Posted by TheJayMan
Посмотреть сообщение
Does it show an error or warning when you debug?
if you mean when compile in pawn, no. or else i do not get what you mean with "debug" or how to. :O


Re: Question - TheJayMan - 16.11.2011

Quote:
Originally Posted by cruising
Посмотреть сообщение
if you mean when compile in pawn, no. or else i do not get what you mean with "debug" or how to. :O
Pretty much the same compile/debug - Running the code to see if it works.


Re: Question - oliverrud - 16.11.2011

What is it your trying to do with the callbacks/whatever?