Need help with gates..
#1

This is my current gate check:

pawn Код:
forward GateCheck1();
public GateCheck1()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if (APlayerData[i][PlayerClass] == ClassSRT)
            {
                if(IsPlayerInRangeOfPoint(i, 20.0, 2294.00000000,2497.19995117,4.00000000))
                {
                    MoveObject(AutomaticGate1, 2294.00000000,2497.19995117,0.50000000, 3.0);
                }
                else
                {
                    MoveObject(AutomaticGate1, 2294.00000000,2497.19995117,4.00000000, 3.0);
                }
            }
            else
                return 0;
     }
 }
   
    return 1;
}

forward GateCheck2();
public GateCheck2()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if (APlayerData[i][PlayerClass] == ClassSRT)
            {
                if(IsPlayerInRangeOfPoint(i, 20.0, 2335.00000000,2443.69995117,6.50000000))
                {
                    MoveObject(AutomaticGate2, 2335.00000000,2443.69995117,3.00000000, 3.0);
                }
                else
                {
                    MoveObject(AutomaticGate2, 2335.00000000,2443.69995117,6.50000000, 3.0);
                }
            }
            else
                return 0;
        }
    }
   
    return 1;
}
The problem is, it only opens for id 0.. Anyone knows why?

Thanks.. Kevin
Reply


Messages In This Thread
Need help with gates.. - by SomebodyAndMe - 03.01.2012, 10:40
Re: Need help with gates.. - by JaTochNietDan - 03.01.2012, 10:42
Re: Need help with gates.. - by SomebodyAndMe - 03.01.2012, 10:46
Re: Need help with gates.. - by Minion - 03.01.2012, 10:50
Re: Need help with gates.. - by CmZxC - 03.01.2012, 10:53
Re: Need help with gates.. - by SomebodyAndMe - 04.01.2012, 14:02
Re: Need help with gates.. - by SomebodyAndMe - 05.01.2012, 11:18

Forum Jump:


Users browsing this thread: 2 Guest(s)