Automatic gates - bugged and taking much ressources
#7

Let's see..

Код:
new boobsgateOpened;

public boobsgatetimer()
{
  new boobsgateNearCount; // No need to make it = 0, it is by default.
  new boobsdoor1NearCount;

  for(new i=0; i<MAX_PLAYERS; i++)
  {
    if(boobsmember[i] == 1 || IsPlayerAdmin(i))
    {
//----------------------------------------------------------------------------
      if(IsPlayerInRangeOfPoint(i,20,-545.30004882813, 1251.1568603516, 1.5))
      {
        boobsgateNearCount ++;
      }
//----------------------------------------------------------------------------
      if(IsPlayerInRangeOfPoint(i,20,-545.30004882813, 1251.1568603516, 1.5))
      {
        boobsdoor1NearCount ++;
      }
//----------------------------------------------------------------------------
    }
  }
//----------------------------------------------------------------------------
// Make the doors move:
//----------------------------------------------------------------------------
  if(boobsgateNearCount > 0)
  {
    MoveObject(boobsgate,-545.30004882813, 1249.1568603516, 9.5, 2);
   }
   else
   {
    MoveObject(boobsgate,-545.30004882813, 1251.1568603516, 1.5, 2); 
   }
//------------------------------
  if(boobsdoor1NearCount > 0)
  {
    MoveObject(boobsdoor1,-540.58142089844, 1329.7946777344, 6.2876319885254, 2);
   }
   else
   {
    MoveObject(boobsdoor1,-540.58142089844, 1329.7946777344, 3.2876319885254, 2);
   }
}
I didn't test it, but I think that should be working. You would have to do the same for every door/gate in the server. Try it and tell me
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)