Guides

Guides for msk_enginetoggle

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.

RealisticVehicleFailure

If you use RealisticVehicleFailure, then replace the following Code in client.lua on Line ~339:

client.lua - line ~339
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

QB-Vehiclefailure

If you use qb-vehiclefailure, then replace the following Code in client.lua on Line ~530:

client.lua - line ~530
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

Last updated