With the following edits, you can set the vehicle to "damaged" so that you can't start the engine of the given vehicle.
If a player is driving this specific vehicle or the engine is on, the engine turns off automatically.
if healthEngineCurrent > cfg.engineSafeGuard + 1 then
SetVehicleUndriveable(vehicle, false)
exports.msk_enginetoggle:SetVehicleDamaged(vehicle, false)
end
if healthEngineCurrent <= cfg.engineSafeGuard + 1 and cfg.limpMode == false then
SetVehicleUndriveable(vehicle, true)
exports.msk_enginetoggle:SetVehicleDamaged(vehicle, true)
end
if healthEngineCurrent > cfg.engineSafeGuard+1 then
SetVehicleUndriveable(vehicle, false)
exports.msk_enginetoggle:SetVehicleDamaged(vehicle, false)
end
if healthEngineCurrent <= cfg.engineSafeGuard+1 and cfg.limpMode == false then
local vehpos = GetEntityCoords(vehicle)
StartParticleFxLoopedAtCoord("ent_ray_heli_aprtmnt_l_fire", vehpos.x, vehpos.y, vehpos.z-0.7, 0.0, 0.0, 0.0, 1.0, false, false, false, false)
SetVehicleUndriveable(vehicle, true)
exports.msk_enginetoggle:SetVehicleDamaged(vehicle, true)
end