My Auto Gates won't close
#4

PUBLICs need RETURN!!!

add them before you close last brace in every public
Код:
public LspdGarage()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(8.0, i, 1588.489014, -1637.890991, 13.268718) && OpenGate[i] == 0)
    {
    		MoveObject(lspd_garage, 1597.340332, -1637.890991, 13.268718, 1.5);
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(8.0, i, 1588.489014, -1637.890991, 13.268718) && OpenGate[i] == 1)
    {
   	  MoveObject(lspd_garage, 1588.489014, -1637.890991, 13.268718, 1.5);
      OpenGate[i] = 0;
    }
  }
  return 1;
}
Код:
public LspdGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(10.0, i, 1545.765381, -1631.450073, 14.093480) && OpenGate[i] == 0)
    {
    		MoveObject(lspd_gate2, 1545.754639, -1614.595459, 14.093480, 1.5);
    		MoveObject(lspd_gate1, 1545.765381, -1638.832275, 14.093480, 1.5);
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(10.0, i, 1545.765381, -1631.450073, 14.093480) && OpenGate[i] == 1)
    {
   	  MoveObject(lspd_gate1, 1545.765381, -1631.450073, 14.093480, 1.5);
   	  MoveObject(lspd_gate2, 1545.729614, -1623.504150, 14.093480, 1.5);
      OpenGate[i] = 0;
    }
  }
  return 1;
}
Код:
public LsfdGate()
{
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(!IsPlayerConnected(i)) continue;
    if(PlayerToPoint(10.0, i, 1761.606445, -1691.706055, 12.744606) && OpenGate[i] == 0)
    {
    		MoveObject(lsfd_gate1, 1761.606445, -1691.706055, 6.469672, 1.5);
    		MoveObject(lsfd_gate2, 1761.379028, -1700.606934, 6.472194, 1.5);
      OpenGate[i] = 1;
    }
    else if(!PlayerToPoint(10.0, i, 1761.606445, -1691.706055, 12.744606) && OpenGate[i] == 1)
    {
   	  MoveObject(lsfd_gate1, 1761.606445, -1691.706055, 12.744606, 1.5);
   	  MoveObject(lsfd_gate2, 1761.379028, -1700.606934, 12.722128, 1.5);
      OpenGate[i] = 0;
    }
  }
  return 1;
}
ALSO leave like that!

Код:
SetTimer("LsfdGate", 300, true);
SetTimer("LspdGate", 300, true);
SetTimer("LspdGarage", 300, true);
Reply


Messages In This Thread
My Auto Gates won't close - by skylord - 22.11.2009, 11:44
Re: My Auto Gates won't close - by Zeromanster - 22.11.2009, 13:13
Re: My Auto Gates won't close - by skylord - 22.11.2009, 13:49
Re: My Auto Gates won't close - by TMasters - 22.11.2009, 13:52
Re: My Auto Gates won't close - by skylord - 22.11.2009, 15:26
Re: My Auto Gates won't close - by skylord - 22.11.2009, 17:32
Re: My Auto Gates won't close - by dice7 - 22.11.2009, 17:59
Re: My Auto Gates won't close - by skylord - 22.11.2009, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)