[Help] Barrier Rotation -
Johnny_DeVito - 14.09.2012
Hi, i make some barrier rotation on my server. It's ok, when i open barrier she work perffect. But i've got one problem, how to make it to work when i wanna to close it? This is codes
Код:
CMD:open(playerid,params[])
{
MoveObject(barrier1, 1668.00000000,-1882.59997559,13.30000019+0.0001, 0.0001, 0.0, 0.0001, 0.0001);
return 1;
}
Код:
barrier1 = CreateObject(968,1668.00000000,-1882.59997559,13.30000019,0.00000000,270.00000000,0.00000000);
I wanna to make it work when i try to close barrier. To rotate it on firs position.
Re: [Help] Barrier Rotation -
KoczkaHUN - 15.09.2012
Maybe try MoveObject to the original position?
Edit: failed at coding
Re: [Help] Barrier Rotation -
Johnny_DeVito - 15.09.2012
No, this dosen't work.
Re: [Help] Barrier Rotation -
KoczkaHUN - 15.09.2012
What's the result? It should work.
Re: [Help] Barrier Rotation -
xMCx - 15.09.2012
pawn Код:
CMD:close(playerid,params[])
{
MoveObject(barrier1, 1668.00000000, -1882.59997559, 13.30000019, 3.0, 0.0, 270.0,0.0);// try this it should work
SendClinetMessage(playerid, 0xFFFFFFF, "Closing the Gate");
return 1;
}
Re: [Help] Barrier Rotation -
Johnny_DeVito - 15.09.2012
Yea, it's work. but barrier close very fast. I wanna to close it like she's opening. If u understand. Like in real life.
Wen i type /open, it's work, like in real life, but when i type /close she's close like when u using CreateObject. Like she's destroyed.
Re: [Help] Barrier Rotation -
KoczkaHUN - 15.09.2012
Edit the 4. parameter (speed) for your needs.
https://sampwiki.blast.hk/wiki/MoveObject
To close with the same speed you open it, try:
pawn Код:
CMD:close(playerid,params[])
{
MoveObject(barrier1,1668.0,-1882.59997559,13.30000019,0.0001,0.0,270.0,0.0);
return 1;
}
Re: [Help] Barrier Rotation -
Johnny_DeVito - 15.09.2012
Thank's it's work.