Move Object - need !
#1

Hey guys i want to make moving gate is there any good tutorial pls ?
Reply
#2

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

if(strcmp(cmdtext, "/opengate", true) == 0)
{
new string[50];
new movetime = MoveObject(gate, 1255.13, -767.58, 92.73, 2.00);
format(string, sizeof(string), "Object will finish moving in %d milliseconds", movetime);
SendClientMessage(playerid, 0xFF000000, string);
return 1;
}

i try this but i type /opengate and gates standing and nothing!
Reply
#4

Just do that
pawn Код:
new gate;
pawn Код:
if(strcmp(cmdtext, "/opengate", true) == 0)
    {
    MoveObject(gate, 1255.13, -767.58, 92.73, 2.00);
    return 1;
    }
Reply
#5

if(strcmp(cmdtext, "/opengate", true) == 0)
{
new string[50];
MoveObject(gate, 1255.13, -767.58, 92.73, 2.00);
format(string, sizeof(string), "Object will finish moving in 2 seconds");
SendClientMessage(playerid, 0xFF000000, string);
return 1;
}
Reply
#6

[AC]Eth Thank you but how can i return back to his start position ?
Reply
#7

Quote:
Originally Posted by Bomba' Xtreme'Stuntage
pawn Код:
new gate;
pawn Код:
if(strcmp(cmdtext, "/opengate", true) == 0)
    {
    MoveObject(gate, 1255.13, -767.58, 92.73, 2.00);
    SetTimer("GateClose", 5000, false);
    return 1;
    }
pawn Код:
forward GateClose();
pawn Код:
public GateClose()
{
    MoveObject(gate, X, Y, Z, 2.00);
    return 1;
}
X,Y,Z are the original coords of the gate (before moving)
Reply
#8

Thx
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)