View Full Version : How to save Object Rotation in variable?

31/07/2018, 10:32 PM
Hi, i m trying to make a door and i can make the door open, but i want to get the door closed at the position that the door was.. but i can 't get it work.. anyone know how to do it?

if (IsPlayerNearDynamicObject(playerid, Doors[doorls][0]))

SetDynamicObjectRot(Doors[doorls][0], 0, 0, 90);
Doors[doorOpen][0] = true;
SendErrorMessage(playerid, "The door has been opened !");

but i want to

GetDynamicObjectRot(Doors[doorls][0]; and save it into variable to use
SetDynamicObjectRot again.. how can i do to close the door?

How can i know the original rotate position of door and show it?

thanks !

01/08/2018, 02:34 AM
Save the original position/rotation to a variable, set it back to the original pos variable once the user closes the door.