/msk_enginetoggle

Vehicle EngineToggle On/Off

Primary LanguageLuaOtherNOASSERTION

MSK EngineToggle

Vehicle Engine Toggle On/Off

GitHub release (latest by date)

Forum: https://forum.cfx.re/t/msk-enginetoggle-toggle-engine-on-off/4793840

Discord Support: https://discord.gg/5hHSBRHvJE

Description

  • The engine keeps running if you leave the vehicle without turning the engine off.
  • You can set that the engine starts automatically when entering a vehicle.
  • You can set a Command and Hotkey (RegisterKeyMapping).
  • Set your own Notification and Progressbar.
  • If you set Config.VehicleKeys to true then only the Owner of the Vehicle or someone with a Key can start the Engine!
  • Admin Command to start/stop the engine without a Key (Bypass)
  • Whitelist for models and plates that do not need a Key to start/stop the engine
  • Save the Angel of the Steering Wheel (Synced)
  • Hotwire Function in compatibility with VehicleKeyChain and Jaksams vehicle_keys

Resmon

Resmon without any near vehicles Screenshot_17

Resmon with near vehicles and engines on Screenshot_16

Requirements

  • No Requirements needed

Optional

Exports

All exports are CLIENTSIDE. Look at the Documentation for more information.

  • toggleEngine -> Toggles the engine on/off
  • toggleHotwire -> Starts the Hotwire Feature
  • getEngineState -> Get the current Enginestate of the vehicle
  • setVehicleDamaged -> Set the vehicle undrivable (Can't start/stop engine)
  • getVehicleDamaged -> Get the vehicle is undrivable

RealisticVehicleDamage

If you use RealisticVehicleDamage, then replace following Code in client.lua on Line 333 in RealisticVehicleDamage:

if healthEngineCurrent > cfg.engineSafeGuard+1 then
    SetVehicleUndriveable(vehicle, false)
    exports.msk_enginetoggle:setVehicleDamaged(vehicle, true)
end

if healthEngineCurrent <= cfg.engineSafeGuard+1 and cfg.limpMode == false then
    SetVehicleUndriveable(vehicle, true)
    exports.msk_enginetoggle:setVehicleDamaged(vehicle, false)
end

QB-Vehiclefailure

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

if healthEngineCurrent > cfg.engineSafeGuard+1 then
    SetVehicleUndriveable(vehicle, false)
    exports.msk_enginetoggle:setVehicleDamaged(vehicle, true)
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, false)
end

My other Scripts

Paid

Free