Why does this only work for the highest player ID?
#8

As far as I am aware no there is not. I never had a reason to add that.
pawn Код:
forward Timex();
public Timex()
{
   foreach(Player, i)
    {
            //Gates Start
      if (gTeam[i] == LSPD1 || gTeam[i] == LSPD2 || gTeam[i] == SWAT || gTeam[i] == FBI || gTeam[i] == CIA || gTeam[i] == ARMY)
            {
                if(IsPlayerInRangeOfPoint(i, 15, 1590.1999511719, -1638.0999755859, 15.300000190735)) //If they are near the point
                {
                    if(IsLSPDGateOpen == false)
                    {
                    MoveObject(LSPDGate, 1598.1999511719, -1637.9000244141, 15.300000190735, 5.0); //Open Position
                    IsLSPDGateOpen = true;
                    }
                }
                else
                {
                    if(IsLSPDGateOpen == true)
                    {
                    MoveObject(LSPDGate, 1590.1999511719, -1638.0999755859, 15.300000190735, 5.0); //Back to closed position
                    IsLSPDGateOpen = false;
                    }
                }
       }
            if (gTeam[i] == CIA)
            {
                if(IsPlayerInRangeOfPoint(i, 15, 320.79998779297, -1487.9000244141, 28.200000762939)) //If they are near the point
                {
                    if(IsCIAGateOpen == false)
                    {
                    MoveObject(CIAGate, 314, -1482.8000488281, 28.200000762939, 5.0); //Open Position
                    IsCIAGateOpen = true;
                    }
                }
                else
                {
                    if(IsCIAGateOpen == true)
                    {
                    MoveObject(CIAGate, 320.79998779297, -1487.9000244141, 28.200000762939, 5.0); //Back to closed position
                    IsCIAGateOpen = false;
                    }
                }
            }
            if (gTeam[i] == CIA)
            {
                if(IsPlayerInRangeOfPoint(i, 15, 282.79998779297, -1542.5999755859, 28.200000762939)) //If they are near the point
                {
                    if(IsCIAGate2Open == false)
                    {
                    MoveObject(CIAGate2, 275.60000610352, -1538.0999755859, 28.200000762939, 5.0); //Open Position
                    IsCIAGate2Open = true;
                    }
                }
                else
                {
                    if(IsCIAGate2Open == true)
                    {
                    MoveObject(CIAGate2, 282.79998779297, -1542.5999755859, 28.200000762939, 5.0); //Back to closed position
                    IsCIAGate2Open = false;
                    }
                }
            }
            if (gTeam[i] == ARMY)
            {
                if(IsPlayerInRangeOfPoint(i, 10, 2720, -2409.6000976563, 12.5)) //If they are near the point
                {
                    if(IsARMYGateOpen == false)
                    {
                    MoveObject(ARMYGate, 2719.6000976563, -2401.3999023438, 12.5, 5.0); //Open Position
                    IsARMYGateOpen = true;
                    }
                }
                else
                {
                    if(IsARMYGateOpen == true)
                    {
                    MoveObject(ARMYGate, 2720, -2409.6000976563, 12.5, 5.0); //Back to closed position
                    IsARMYGateOpen = false;
                    }
                }
            }
            if (gTeam[i] == ARMY)
            {
                if(IsPlayerInRangeOfPoint(i, 10, 2720, -2508.3000488281, 12.5)) //If they are near the point
                {
                    if(IsARMYGate2Open == false)
                    {
                    MoveObject(ARMYGate2, 2719.8000488281, -2499.6000976563, 12.5, 5.0); //Open Position
                    IsARMYGate2Open = true;
                    }
                }
                else
                {
                    if(IsARMYGate2Open == true)
                    {
                    MoveObject(ARMYGate2, 2720, -2508.3000488281, 12.5, 5.0); //Back to closed position
                    IsARMYGate2Open = false;
                    }
                }
            }
            if (gTeam[i] == SWAT)
            {
                if(IsPlayerInRangeOfPoint(i, 15, 1287.3000488281, -1650.0999755859, 15.300000190735)) //If they are near the point
                {
                    if(IsSWATGateOpen == false)
                    {
                    MoveObject(SWATGate, 1286.8000488281, -1638.8000488281, 15.300000190735, 5.0); //Open Position
                    IsSWATGateOpen = true;
                    }
                }
                else
                {
                    if(IsSWATGateOpen == true)
                    {
                    MoveObject(SWATGate, 1287.3000488281, -1650.0999755859, 15.300000190735, 5.0); //Back to closed position
                    IsSWATGateOpen = false;
                    }
                }
            }
            if (gTeam[i] == FBI)
            {
                if(IsPlayerInRangeOfPoint(i, 15, 1534.3000488281, -1451.6999511719, 15.199999809265)) //If they are near the point
                {
                    if(IsFBIGateOpen == false)
                    {
                    MoveObject(FBIGate, 1545.8000488281, -1451.5, 15.199999809265, 5.0); //Open Position
                    IsFBIGateOpen = true;
                    }
                }
                else
                {
                    if(IsFBIGateOpen == true)
                    {
                    MoveObject(FBIGate, 1534.3000488281, -1451.6999511719, 15.199999809265, 5.0); //Back to closed position
                    IsFBIGateOpen = false;
                    }
                }
            }
            //Gates End
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)