SA-MP Forums Archive
Is it Possible??? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Is it Possible??? (/showthread.php?tid=120461)



Is it Possible??? - linthebigs - 11.01.2010

Is it possible to make a object movein rotation as the function MoveObject(......) The object must move as the function MoveObject, no as SetObjectRot(.....). Thanks...


Re: Is it Possible??? - lameguy - 11.01.2010

To rotate object animated?
Yes, it is, using SetObjectRot.

Just create timer like

pawn Код:
forward ObjectRotater();
public ObjectRotater()
{
    new Float:Xrotation, Float:Yrotation, Float:Zrotation;
    GetObjectRot(YourObject, Xrotation, Yrotation, Zrotation);
    SetObjectRot(YourObject, Xrotation, Yrotation, Zrotation+0.1);
}
and SetTimer("ObjectRotater", 10, 1);


Re: Is it Possible??? - linthebigs - 11.01.2010

Thanks for helping...


Re: Is it Possible??? - Jakku - 12.01.2010

Quote:
Originally Posted by Johnson_boy

and SetTimer("ObjectRotater", 10, 1);
Don't set the timer value 10, it will lag your server (Expection if you don't use it after OnGameModeInit)