Need help with making objects move!!
#1

I want to make objects move for my server using Pawno but i have no idea how to
Reply
#2

MoveObject, use wiki please.
Reply
#3

couldn't find it there either
Reply
#4

https://sampwiki.blast.hk/wiki/MoveObject

Also, maybe this link can help you -> https://sampwiki.blast.hk/wiki/Automatic_Gates
Reply
#5

Код:
public OnGameModeInit()
{
  new obj;
  obj = CreateObject(980,0,0,0,0,0,0);
  return 1;
}
 
public OnPlayerCommandText()
{
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(obj, 0, 0, 10, 2.00 );
    return 1;
  }
  return 0;
}
this is what i found at the link i think i understand the haf of it (i know i suck xD) can some one explain it a bit to me?
cause im not sure wich words i should replace..
exc.
Quote:

new obj;
obj = CreateObject(980,0,0,0,0,0,0);

does that i mean i gotta write ''new createobject'' ?
Reply
#6

Start here: https://sampwiki.blast.hk/wiki/PAWN_tutorial
Reply
#7

I know how to create objects, vehicles also i know how to make a simple command as /teleport.
The link doesn't give answer to my question, i really want to learn how to do this! pls help
let me tell you where im now:
I created my object, it's on the right location: -746.1996, -2123.5566, 25.2215
What i want to do is move it to this cordinates: -800.548828125, -2141.3171386719, 24.819633483887
So this is how i scripted it:
Код:
 under Public ongamemodeinit  
  {
  new obj;
  obj = CreateObject(980,-746.1996, -2123.5566, 25.2215, 0, 0, 0);
  }
Код:
Under public OnPlayerCommandText(playerid, cmdtext[])
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(980, -800.548828125, -2141.3171386719, 24.819633483887, 500 );
    return 1;
  }
what am i doing wrong?
Reply
#8

obj needs to be global variable in order to be able to use it with your MoveObject.
Reply
#9

so for excample ''superduper'' instead of obj if im wrong i have no idea what ur saying xD
Reply
#10

Quote:
Originally Posted by jurtes
so for excample ''superduper'' instead of obj if im wrong i have no idea what ur saying xD
That's why I suggested you to first read pawn turtorials and learn basic things.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)