SA-MP Forums Archive
Moving gate with angle Z - 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: Moving gate with angle Z (/showthread.php?tid=488157)



Moving gate with angle Z - RicardoMaia - 16.01.2014

Hello guys, I have a problem, I created a command to move a gate with only the Z angle, but I wanted him to move slowly, but it moves in time to the send position, and I do not want this happen, since I set the speed to 5, but nothing ...

I'll give an example here of the command:

pawn Код:
if (PlayerToPoint(7.0, playerid, X,Y,Z))
        {
            MoveObject( portao,X, Y, Z, 5, aX, aY, 0.0);
            SendClientMessage(playerid, COR, "Opening Gate");
        }
        else if (PlayerToPoint(7.0, playerid, X,Y,Z))
        {
                MoveObject( portao,X, Y, Z, 5, aX, aY, 90.0);
            SendClientMessage(playerid, COR, "Closing Gate");
        }
So in this case I wanted the gate to move the Z "0" angle to the Z "90" slowly, but no matter what the set speed, angle it moves in time. Can anyone help me? Thank you ...


Re: Moving gate with angle Z - Quincy_Gatlin - 17.01.2014

The speed is in milliseconds I believe sooo 1000 = 1 second. 5 = 5/1000 of a second, give it a shot with 5000 (5 seconds) or 10000 (10 seconds) and post back. I think this is your problem