function toggleDoor(door: number)
Closed this issue · 2 comments
LandminenTester commented
The function toggleDoor currently just opens a door of a vehicle but it cant close it.
The used function .getDoorState(door) always returns 0
/**
* Toggle door state for the given vehicle
*
* 0 - Driver
* 1 - Passenger
* 2 - Back Left
* 3 - Back Right
* 4 - Hood
* 5 - Trunk
*
* @param {number} door
*/
function toggleDoor(door: number) {
vehicle.setDoorState(door, vehicle.getDoorState(door) === 0 ? 7 : 0);
}
LandminenTester commented
Currently a altv bug: