Some help plz :)
#1

Hiii sampers

Ive got a question about the function MoveObject because i dont really understand it
i searched for it on wiki i found it but i think im doing it wrong with the coordinates so heres it.

Код:
public OnGameModeInit()
{
  CreateObject(2927, 2067.4082, -2515.8733, 50.8578,);
  return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/startlift", true) == 0)
  {
    MoveObject(2927, 2067.6858, -2515.8843, 15.5967 10, 0.5);
    return 1;
  }
  return 0;
}

you can change it to explain me about it thanks already !
Reply
#2

Quote:
Originally Posted by yoennie
Hiii sampers

Ive got a question about the function MoveObject because i dont really understand it
i searched for it on wiki i found it but i think im doing it wrong with the coordinates so heres it.

Код:
public OnGameModeInit()
{
  CreateObject(2927, 2067.4082, -2515.8733, 50.8578,);
  return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/startlift", true) == 0)
  {
    MoveObject(2927, 2067.6858, -2515.8843, 15.5967 10, 0.5);
    return 1;
  }
  return 0;
}

you can change it to explain me about it thanks already !
i don't see anything wrong
tho you could use
Код:
 instead of ^^
Reply
#3

You have the define the object.
at the top of yoru script just below the #includes add:
pawn Код:
new Lift;
pawn Код:
public OnGameModeInit()
{
  Lift = CreateObject(2927, 2067.4082, -2515.8733, 50.8578,); // Im not sure if this is right, I'm sure there is more parameters other than the Objectid,x,y,z... How did you create this object?
  return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp(cmdtext, "/startlift", true) == 0)
  {
    MoveObject(Lift, 2067.6858, -2515.8843, 15.5967 10, 0.5);
    return 1;
  }
  return 0;
}
Reply
#4

Yes almost have it but now it says it doesnt have the right number of arguments

public OnGameModeInit()
{
Lift = CreateObject(2927, 2067.4885253906, -2515.8937988281, 14.338908195496, 90, 0, 0);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/moveobject", true) == 0)
{
MoveObject(Lift, 2067.48828125, -2515.8935546875, 49.599998474121, 90, 10, 0.5);
return 1;
}
return 0;
}
the red line is the error line
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)