[Help] Object Rotation
#1

Код:
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
Reply
#2

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

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

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
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)