Hi,
I need help with this function. It’s supposed to check if door closed then opens it or if door open it closes it. However, not working.
function toggleDoors(doorIndex)
if IsVehicleDoorFullyOpen(GetVehiclePedIsIn(GetPlayerPed(-1), doorIndex) then
SetVehicleDoorShut(GetVehiclePedIsIn(GetPlayerPed(-1), doorIndex, false, false)
else
SetVehicleDoorOpen(GetVehiclePedIsIn(GetPlayerPed(-1), doorIndex, false, false)
end