how to make moving objects?
#1

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
Reply
#2

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

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?
Reply
#4

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.
Reply
#5

Click HERE
Reply
#6

i have trying that but it dont work for me
Reply
#7

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
Reply
#8

Quote:
Originally Posted by John Cena
for more detailes
Reply
#9

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
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)