in00b Posted March 23, 2016 Share Posted March 23, 2016 I'm trying to get the status of the door. But I always returns the same value. And the door is opened but never closed.Sorry for my bad english Thanks Vehicle car;void Doors(int index) { if (VEHICLE::IS_VEHICLE_DOOR_FULLY_OPEN(car, index)) { //always returns the same value. VEHICLE::SET_VEHICLE_DOOR_SHUT(car,index, false); } else { VEHICLE::SET_VEHICLE_DOOR_OPEN(car, index, false, false); }}void main() { Ped playerPed = PLAYER::PLAYER_PED_ID(); while (true) { if (PED::IS_PED_IN_ANY_VEHICLE(playerPed, 1)) { car = PED::GET_VEHICLE_PED_IS_USING(playerPed); if (IsKeyJustUp(VK_NUMPAD7)) { Doors(0); } }}} Link to comment Share on other sites More sharing options...
Guad Posted March 23, 2016 Share Posted March 23, 2016 I use var isOpen = (Function.Call<float>(Hash.GET_VEHICLE_DOOR_ANGLE_RATIO, car.Handle, i) > 0.5f) in00b 1 Link to comment Share on other sites More sharing options...
in00b Posted March 23, 2016 Author Share Posted March 23, 2016 I use var isOpen = (Function.Call<float>(Hash.GET_VEHICLE_DOOR_ANGLE_RATIO, car.Handle, i) > 0.5f) Muchas gracias! Funciona perfecto! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now