Barrier rotating? - 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: Barrier rotating? (
/showthread.php?tid=327845)
Barrier rotating? -
Admigo - 22.03.2012
Heey all,
How can i rotate a barrier with MoveObject?
I dont know how the 1000 rot works.
Thanks Admigo
Re: Barrier rotating? -
Grimrandomer - 22.03.2012
To smooth rotate a barrier:
When opening, increase its z position by 0.001
When closing, decrease its z position by 0.001
Re: Barrier rotating? -
ikkentim - 22.03.2012
//to close
MoveObject(obj, x, y, z, 0.1, rx, ry,rz);
//to close
MoveObject(obj, x, y, z+0.01, 0.1, rx, ry,rz);
make sure to change x,y,z,rx,ry,rz to the proper position
Re: Barrier rotating? -
Admigo - 22.03.2012
How can i make it?:
Код:
if (strcmp("/open", cmdtext, true, 10) == 0)
{
new Float:rx,Float:ry,Float:rz;
MoveObject(barrier, 1544.69995117,-1630.82006836,13.19999981-0.0001, 0.0001, rx, ry, rz-0.0001);
return 1;
}
if (strcmp("/close", cmdtext, true, 10) == 0)
{
new Float:rx,Float:ry,Float:rz;
MoveObject(barrier,1544.69995117,-1630.82006836,13.19999981+0.0001, 0.0001, rx, ry, rz+0.0001);
return 1;
}