- Documentation
- Shared functions
- getVehicleEngineState
Function
getVehicleEngineState
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)