Author Topic: [Tutorial]Automatic Gate  (Read 310 times)

greentarch

  • Global Moderator
  • Newbie
  • ********
  • Posts: 16
  • Reputation: 0
    • View Profile
Re: [Tutorial]Automatic Gate
« on: April 22, 2013, 10:31:37 pm »
P_P

public OnPlayerUpdate(playerid)//
{
   if(IsPlayerInRangeOfPoint(playerid, 5.0 ,898.536437,2088.507324,10.820312)) // if palyer in rage !!
   {
          MoveObject(bla2)//you can add more
   return 1;
if(IsPlayerInRangeOfPoint(playerid, 5.0 ,898.536437,2088.507324,10.820312)) // if palyer in rage !!
   {
          MoveObject(bla2)//you can add more
if(IsPlayerInRangeOfPoint(playerid, 5.0 ,898.536437,2088.507324,10.820312)) // if palyer in rage !!
   {
          MoveObject(bla2)//you can add more
          //easy ?
   return 1;
   return 1;
   }
   return 1;
}

That is not even a valid example.
How much you did "return 1;" ?

And I have said that putting it at OnPlayerUpdate ain't a good idea, because it get's called VERY FREQUENTLY PER SECOND FOR PLAYER. That's why I suggest you to use a one-second timer.