Giter VIP home page Giter VIP logo

msk_enginetoggle's Introduction

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

msk_enginetoggle's People

Contributors

musiker15 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

msk_enginetoggle's Issues

EngineToggle is Broken with Newest VehicleKeyChain

After update the VKC - The EngineToggle doesnt works anymore with VKC.

Due to somethin in client.lua "50" old export...

Edit: Nevermind, i fixed that issue.

Is it possible for you to provide an update for best compatibility ?
Thanks

Where to add "Make sure to add the following in every Script that spawns a Vehicle" for LukeGarages

""Make sure to add the following in every Script that spawns a Vehicle

-- Give a Key to the Player
SetVehicleNumberPlateText(vehicle, 'PLATE_TEXT')
exports["kimi_callbacks"]:Trigger("VKC:createNewKey", 'PLATE_TEXT', 1, true)
-- Remove the Key from the Player
exports["kimi_callbacks"]:Trigger("VKC:removeKey", 'PLATE_TEXT', 1)""

Where for LukeGarages ?
Client? Config? Server?

Which line ?

Nothin works

Vehicles Respawn instant with "Advanced Parking" by Kiminaze

If i use this fantastic little script, every Vehicle respawns when i put into garage
i use this in Addition with

-VehicleKeyChain by Kiminaze

  • AdvancedParking by Kiminaze

I also plan to integrate this

  • VehicleRegistration by Kiminaze

Kimi Callback is active

Maybe you can help out, or built in a support For the Scripts.
Thank you much

Probleme mit dem An und Ausschalten des Motors

Wenn man den Motor während man fährt ausschalten und dann wieder einschaltet kann man nicht mehr fahren, Wenn man den Motor anlässt, aussteigt und dann wieder einsteigt, ist der Motor nicht an und man kann ihn auch nicht starten.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.