Object Rotation - 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: Object Rotation (
/showthread.php?tid=426991)
Object Rotation -
Matthias134 - 30.03.2013
Hi, I would like to know how to rotate a gate.
From this position.
pawn Код:
rottest = CreateObject(3049, -340.80, 1534.96, 76.29, 0.00, 0.00, 0.00);//
To this one:
pawn Код:
rottest = CreateObject(3049, -340.80, 1534.96, 76.29, 0.00, 0.00, 90.00);//
I tried this:
pawn Код:
COMMAND:rotarear(playerid, params[])
{
if (IsPlayerLAdmin(playerid) >= 1)
{
MoveObject(rottest, 0, 0, 3+0.0001, 0.0001, 0.0, 0.0, 180.0);
SendClientMessage(playerid,-1,"rotation sucessfull");
}
else SendClientMessage(playerid, -1, "SERVER: Unknown Command.");
return 1;
}
Re: Object Rotation -
SuperViper - 30.03.2013
pawn Код:
MoveObject(rottest, -340.801, 1534.96, 76.29, 2, 0, 0, 90);
Re: Object Rotation -
Matthias134 - 31.03.2013
I've already tested that, it just CHANGES the rotation of the object. It doesn't slowly rotate.
Re: Object Rotation -
MP2 - 31.03.2013
The rotation parameters are the FINAL rotation, after MOVEMENT, which means you have to MOVE the object. Move it up/down (ALTERNATIVE) each time by 0.001 and set the speed to about the same (meaning it'll take 1 second) and there you go.
Use my mGates include (see my signature) if you want; it's very helpful.
Re: Object Rotation -
Matthias134 - 31.03.2013
Wow, I'll test it.
Thanks.