ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getVehicleEngineState

Function

getVehicleEngineState

Server and clientVehiclesIdentical to MTA:SA

Checks whether the vehicle's engine is running (set with setVehicleEngineState; destroying the vehicle also turns the engine off).

Syntax

bool getVehicleEngineState(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

true when the engine is running.

Example

addEventHandler("onVehicleEnter", root, function(player, seat)
    if seat == 0 and not getVehicleEngineState(source) then
        outputChatBox("Wpisz /silnik, aby zapalic.", player)
    end
end)

See also