SA-MP Forums Archive
Move object - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Move object (/showthread.php?tid=451905)



Move object - _Khaled_ - 19.07.2013

pawn Код:
//under onplayerupdate

    //AdminGates move
    if(IsPlayerInRangeOfPoint(playerid, 3.0, -84.8094,-1636.9061,3.8391) || IsPlayerInRangeOfPoint(playerid, 3.0, -78.7850,-1662.4958,3.6756))
    {
       AdminGatesMove =5;
    }

//under PlayerOneSecondVariables()  //Timer is okayy and working fine
if(AdminGatesMove > 1)
      {
         MoveObject(AdminGate1, -79.4000015,-1647.1999512,0.5999999, 5.0, 0.0000000,0.0000000,196.0000000);
         MoveObject(AdminGate2, -87.0000000,-1649.4000244,0.5999999,4,0.0000000,0.0000000,196.0000000);
         AdminGatesMove--;
      }
      if(AdminGatesMove == 1)
      {
         MoveObject(AdminGate1, -79.4000015,-1647.1999512,6.5999999,4,0.0000000,0.0000000,196.0000000);
         MoveObject(AdminGate2, -87.0000000,-1649.4000244,6.5999999,4,0.0000000,0.0000000,196.0000000);
         AdminGatesMove =-1;
      }
no compiling errors, no axis errors

THAT'S IT, can someone tell me why isn't it moving?


Re: Move object - _Khaled_ - 19.07.2013

Solved, sorry for spam

what I did? added [MAX_PLAYERS]; to AdminGatesMove because PlayerOneSecondVariable only works for a player, sorry for forums spam


Re: Move object - Pottus - 19.07.2013

Using OnPlayerUpdate() is a bad idea for this.


Re: Move object - Vrag - 19.07.2013

Why is using OnPlayerUpdate() bad?


Re: Move object - Vanter - 19.07.2013

I don't think it's bad, it doesn't really matter