Driveable is true

I have a small problem with the function “IsVehicleDriveable”, it makes me real even if I set “SetVehicleUndriveable” to false.


	if engine then
		Citizen.Trace("-------- Engine on --------- \n")
		Citizen.Trace("-------- Engine off --------- \n")

		if IsVehicleDriveable( then
			Citizen.Trace("-------- Driveable on --------- \n")
			Citizen.Trace("-------- Driveable onf --------- \n")

  if IsVehicleEngineOn( and fuelLevel > 0 then
  elseif engine and fuelLevel <= 0 then
		engine = false
    SetVehicleUndriveable(, true)
    SetVehicleEngineOn(, false, false, true)
  elseif not engine and fuelLevel > 0 then
    engine = true
    SetVehicleUndriveable(, false)
		SetVehicleEngineOn(, true, false, true)

Put traces all through the code and see which one prints. Looks like engine is being set to false so one of those engine = false is setting.

If I understand correctly, if you want the vehicle to be undrivable, you should set SetVehicleUndriveable to true.

I want both to be false. The car can not be driven.

SetVehicleUNdriveable would have to be true.

	if not engine and IsVehicleDriveable( then
		Citizen.Trace("-------- Set To undriveable --------- \n")
		SetVehicleUndriveable(, true)

IsVehicleDriveable remains true even when SetVehicleUndriveable is set to true. What to do ?

I have the same problem with my script:

SetVehicleUndriveable(vehicle, true)
print(IsVehicleDriveable(vehicle, 0))

And in console the output of the print-statement is always the value “1”.

I do not understand why !?

I also tried this way:

SetVehicleUndriveable(vehicle, false)
print(IsVehicleDriveable(vehicle, 0))

But the console output is also always the value “1”.

Native Documentation says:

IsVehicleDriveable(vehicle: Vehicle, isOnFireCheck: boolean): boolean
p1 is always 0 in the scripts. p1 = check if vehicle is on fire

So I tried this:

SetVehicleUndriveable(vehicle, false)
print(IsVehicleDriveable(vehicle, IsVehicleEngineOnFire(vehicle)))

But as before the console output is also always the value “1”.

I do not understand what to do or to change to get a real indication if the vehicle is driveable.