function GetVehicleStatus(handle) -- return: engine, doors, lights
local memory = require 'memory'
return isCarEngineOn(handle), memory.getint8(getCarPointer(handle) + 0x4F8) == 1, memory.getint8(getCarPointer(handle) + 0x584) == 1
end
-- пример
if isCharInAnyCar(PLAYER_PED) then
local veh = storeCarCharIsInNoSave(PLAYER_PED)
local engine, doors, lights = GetVehicleStatus(veh)
print('Vehicle: '..(getNameOfVehicleModel(getCarModel(veh)) or 'unknown'))
print('Engine: ', engine)
print('Doors: ', doors)
print('Lights: ', lights)
end