open.mp forum
[Pawn] Texture Studio doors not opening - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] Texture Studio doors not opening (/showthread.php?tid=1728)



Texture Studio doors not opening - Kevinas - 2021-03-05

When I rotate a door it rotates visually, but it's axis doesn't change and stays in the same position, so whenever I rotate a door it opens and closes in the same spots as before, has anyone ever encountered this?

EDIT: sorry, wrong thread


RE: Texture Studio doors not opening - Radical - 2021-03-05

Use this function to rotate a object.
PHP Code:
stock RotateObject(objectidFloat:rotXFloat:rotYFloat:rotZFloat:Speed)
{
? ? new 
Float:XFloat:YFloat:ZFloat:SpeedConverted floatmul(Speed0.01);
? ? 
GetObjectPos(objectidXYZ);
? ? 
SetObjectPos(objectidXYfloatadd(Z0.01));
? ? 
MoveObject(objectidXYfloatsub(Z0.01), SpeedConvertedrotXrotYrotZ);
? ? return 
1;