elevator
#1

hi can anyone send me a code for an elevator

that is up if i type in /elevatorup

the object

of this:

pawn Код:
CreateObject(3280, 1899.982422, 1401.652588, 8.282812, 0.0000, 0.0000, 0.0000);
must go to
pawn Код:
(3280, 1899.993530, 1401.680054, 15.907696, 0.0000, 0.0000, 0.0000);
anyone can help me ? ty alot
Reply
#2

bump
Reply
#3

please help
Reply
#4

https://sampwiki.blast.hk/wiki/MoveObject
Reply
#5

what is wrong whit this?

pawn Код:
#include <a_samp>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
new obj;
  obj = CreateObject(3280, 1899.982422, 1401.652588, 8.282812, 0.0000, 0.0000, 0.0000);
  return 1;
}
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else
public OnPlayerCommandText()
{
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(obj, 0, 0, 10, 2.00 );
    return 1;
  }
  return 0;
}
whats wrong
Reply
#6

Quote:
Originally Posted by luckie12
what is wrong whit this?

pawn Код:
#include <a_samp>

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
new obj;
  obj = CreateObject(3280, 1899.982422, 1401.652588, 8.282812, 0.0000, 0.0000, 0.0000);
  return 1;
}
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else
public OnPlayerCommandText()
{
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(obj, 0, 0, 10, 2.00 );
    return 1;
  }
  return 0;
}
whats wrong
whats wrong
Reply
#7

pawn Код:
#include <a_samp>

new obj;

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
  obj = CreateObject(3280, 1899.982422, 1401.652588, 8.282812, 0.0000, 0.0000, 0.0000);
  return 1;
}
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else
public OnPlayerCommandText()
{
  new cmdtext[256];
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(obj, 0, 0, 10, 2.00 );
    return 1;
  }
  return 0;
}

#endif
Reply
#8

dont spam around lol!!!!!!
you must be patience -.- otherwise nobody will help ya

Код:
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(obj, 0, 0, 10, 2.00 );
    return 1;
  }
MoveObject(obj, 0= NEW X, 0= NEW Y, 10 = NEW Z, 2.00 = MOVE SPEED );

so the new x,y,z must be the new position where the "elevator" should be moved to.

cheerz
Reply
#9

Quote:
Originally Posted by nutzkung69
pawn Код:
#include <a_samp>

new obj;

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
  obj = CreateObject(3280, 1899.982422, 1401.652588, 8.282812, 0.0000, 0.0000, 0.0000);
  return 1;
}
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else
public OnPlayerCommandText()
{
  new cmdtext[256];
  if(strcmp(cmdtext, "/moveobject", true) == 0)
  {
    MoveObject(obj, 0, 0, 10, 2.00 );
    return 1;
  }
  return 0;
}

#endif
ty so if i do now moveobject it goes up?
Reply
#10

no..

MoveObject(obj, new_x, new_y, new_z, 2.00 );


the new_x
new_y
new_z

must be the new position of the object... you failed by using it coz you change the position of it to 0.000000,0.000000,10.000000


Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)