SA-MP Forums Archive
MoveDynamicObject gate with speed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MoveDynamicObject gate with speed (/showthread.php?tid=461667)



MoveDynamicObject gate with speed - lider1241 - 02.09.2013

I have gates for faction by the command /gate it opens the nearest gate, the problem is it open on "suddenly" and close too. i want with the gate with speed - but with same Rot, the gates with the "suddenly" i'm using SetDynamicObjectRot function.
I heard the only way to move it slowly and not bam is MoveDynamicObject, i tried this but the gate doesn't move up and down.

Код:
new TollGate;

TollGate = CreateDynamicObject(968, 55.5, -1528.90002, 4.7, 0, 90, 82.09);

My function: 
SetDynamicObjectRot(TollGate, 0.000000, 0, 90); and SetDynamicObjectRot(TollGate, 0.000000, 90, 82.09); for close and open
Please help me how to do the following function correctly with that coordiantes and make it move slow up and down (default speed is 3)

MoveDynamicObject(968, 55.5, -1528.90002, 4.7, 0, 90, 82.09);




Re: MoveDynamicObject gate with speed - Dragonsaurus - 02.09.2013

When opening:
pawn Код:
MoveObject(TollGate, 55.5, -1528.9, 4.7, 1, 0, 0, 90);
When closing:
pawn Код:
MoveObject(TollGate, 55.5, -1528.901, 4.7, 1, 0, 90, 82.09);