NextScripts
  • NextScripts Documentation
  • ESX Scripts
    • ✅Garage System
      • Installation
      • SQL
      • Configuration
        • Main Config
        • Blips Config
        • Commands Config
        • Zones Config
      • Events & Exports
        • Client
          • Deformation
          • getExtraData - Export
          • SpawnVehicle - Export
          • StoreVehicle - Export
          • isInAnyMarker - Export
          • impound - Export
          • pdimpound - Export
        • Server
          • Deformation
      • Commands
    • 🛠️Engine System
      • Installation
      • Configuration
      • Events & Exports
        • Client
        • Server
    • 🛠️Vehicle Lock
Powered by GitBook
On this page
  • Events
  • Exports
  • Start Engine
  • Stop Engine
  • Toggle Engine
  • Get Engine State
  1. ESX Scripts
  2. Engine System
  3. Events & Exports

Client

Events

Share State Event

AddEventHandler("ns_enginesystem:toggleEngine", function(vehicle, state)
    -- Your Code
    print(state)
end)

Exports

Start Engine

With that Export you can Start the Engine. Is the Fuel false then will the motor not start.

Parameters: Only Vehicle

exports['ns_enginesystem']:StartEngine(vehicle)

Stop Engine

With that Export you can Stop the Engine.

Parameters: Only Vehicle

exports['ns_enginesystem']:StopEngine(vehicle)

Toggle Engine

With that Export you can Trigger the export like Hotkey or Command.

Parameters: Only Vehicle

exports['ns_enginesystem']:ToggleEngine(vehicle)

Get Engine State

With that you can Check the Current Engine State.

Parameters: Only Vehicle

Return Value: true / false

local state = exports['ns_enginesystem']:GetEngineState(vehicle)
PreviousEvents & ExportsNextServer

Last updated 1 year ago

🛠️