Make Character to enter backseat of car
-
So I tried to make my very first mod, which will get me a stretch-limo + driver to drive around. I can spawn the car and bring it to my place, but I can't enter it. I tried this in my onTick-Method:
if (Game.Player.Character.GetVehicleIsTryingToEnter() == stretch && isEnteringCar == false) { isEnteringCar = true; Game.Player.Character.Task.EnterVehicle(stretch, VehicleSeat.RightRear); isEnteringCar = false; }
isEnteringCar is just a bool that's supposed to make sure, that this method is only executed once while entering. But the problem is, when I press F, my character runs to the right back door and then just stops, while "flimmering". It#s like the "EnterCar"-Animation gets resetted every tick, but I thought the bool would prevent that. So what am I doing wrong?