SA-MP Forums Archive
[Help] 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: [Help] Object Rotation (/showthread.php?tid=280958)



[Help] Object Rotation - alainchaccour - 03.09.2011

Код:
new cellsdoor;
new cellsdooropen = 0;

cellsdoor = CreateObject(1495,2756.09252930,-2358.50292969,12.63281250,0.00000000,0.00000000,0.00000000); //object(gen_doorext01) (1)

if(strcmp(cmdtext, "/cell", true) == 0)
	{
        if(IsPlayerInRangeOfPoint(playerid,9,2757.1213,-2358.9177,13.6328))
        {//Door to Cells
             if(!(PlayerInfo[playerid][pMember] == 5)) return SendClientMessage(playerid,COLOR_GREY,"   You are not a member of the National Guards !");
             if(cellsdooropen==0)
             {
				cellsdooropen = 1;
				SetObjectRot( cellsdoor, ?, ?, ?);
				SetObjectPos( cellsdoor, 2756.09179688,-2358.50292969,12.63281250 );
			 }
			 else if(cellsdoor==1)
			 {
				cellsdooropen = 0;
				SetObjectRot( cellsdoor, ?, ?, ?);
				SetObjectPos( cellsdoor, 2756.09252930,-2358.50292969,12.63281250 );
		     }
	   }
       else
       {
       SendClientMessage(playerid, COLOR_GREY, "   You are not near a door !");
       return 1;
       }
       return 1;
    }
I can't find the good rotation for the door to open like in the pictures.
Can you help me please!

Door Closed


Door Opened



Re: [Help] Object Rotation - =WoR=Varth - 03.09.2011

https://sampforum.blast.hk/showthread.php?tid=151452


Re: [Help] Object Rotation - alainchaccour - 03.09.2011

But this doesnt tell me what coords should I put to rotate it like in the picture


Re: [Help] Object Rotation - alainchaccour - 03.09.2011

Ok now this worked to open the door SetObjectRot( cellsdoor, 0.0000, 360.0000, -90.0000);

now I need the coords to close, cant find correct one


Re: [Help] Object Rotation - alainchaccour - 03.09.2011

Nevermind, my fault, I typed the wrong name of object. Works now.