SA-MP Forums Archive
how to make moving objects? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make moving objects? (/showthread.php?tid=75019)



how to make moving objects? - luckie12 - 28.04.2009

Hi all im new with scripting and im helping my friend with the server
but how to make moving objects?
can anyone help me?
thx alot :P


Re: how to make moving objects? - [DSK]Vyorel - 28.04.2009

Code:
MoveObject(IDobject, x, y, z, speed);



Re: how to make moving objects? - luckie12 - 28.04.2009

Quote:
Originally Posted by John Cena
Code:
MoveObject(IDobject, x, y, z, speed);
ok but where i do neet to put like this?:
pawn Code:
if (strcmp("/tele", cmdtext, true, 10) == 0)
{
  MoveObject(980, 1961.7462, -2188.8318, 15.3203, 0.0000, 0.0000, 0.0000, 500.0);
  return 1;
}
like it or?


Re: how to make moving objects? - JaTochNietDan - 28.04.2009

You need the ID of the object, not the model number. The easiest way is to store the ID of the object with a variable. Example:

pawn Code:
new Object = CreateObject(...);
Then using

pawn Code:
MoveObject(Object, 1961.7462, -2188.8318, 15.3203, 5.0);
Also remember that the xyz co-ordinates are the amount to move it by in that direction, not the place to move it to.


Re: how to make moving objects? - [DSK]Vyorel - 28.04.2009

Click HERE


Re: how to make moving objects? - luckie12 - 28.04.2009

i have trying that but it dont work for me


Re: how to make moving objects? - luckie12 - 28.04.2009

Quote:
Originally Posted by JaTochNietDan
You need the ID of the object, not the model number. The easiest way is to store the ID of the object with a variable. Example:

pawn Code:
new Object = CreateObject(...);
Then using

pawn Code:
MoveObject(Object, 1961.7462, -2188.8318, 15.3203, 0.0000, 0.0000, 0.0000, 500.0);
JaTochNietDan
can you put it in Netherlands please thx alot


Re: how to make moving objects? - [DSK]Vyorel - 28.04.2009

Quote:
Originally Posted by John Cena
for more detailes


Re: how to make moving objects? - luckie12 - 28.04.2009

Quote:
Originally Posted by John Cena
Quote:
Originally Posted by John Cena
for more detailes
that dont work for me i have already trying but it dont work


Re: how to make moving objects? - HB - 28.04.2009

Quote:
Originally Posted by luckie12
that dont work for me i have already trying but it dont work
Then you fail at coding man. Learn some proper coding then, if you can't do this you should learn it.