How can I make doors of car open with animation in my c# script?
-
Hi Im trying to get the back doors of a truck to open in my script and I got all that working except there is an issue where the doors dont do the anim for opening, instead it skips the animation.
Here is the code
truckveh.OpenDoor(VehicleDoor.BackLeftDoor, false, false);
truckveh.OpenDoor(VehicleDoor.BackRightDoor, false, false);
-
Which vehicle are you testing with? I tested with a few different vehicles and it worked as expected on all of them.
-
@Jitnaught Mule
-
Works for me. https://i.imgur.com/tlOAeFt.mp4
-
This worked for me as well. Are you running more than 1 animation, in a task sequence for example.
Function.Call(Hash.SET_VEHICLE_DOOR_OPEN, truckveh, 3, false);
Other door is 4
Function.Call(Hash.SET_VEHICLE_DOOR_SHUT, truckveh, 3, false);