ArePlaneControlPanelsIntact
Docslocal retval = ArePlaneControlPanelsIntact(vehicle, checkForZeroHealth)Description
Queries whether the control panels of a plane are intact. This native is used to determine the operational status of a plane's cockpit controls, which can affect the plane's flyability.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to check. This should be a plane. |
checkForZeroHealth | BOOL | If set to `true`, the native also checks if the plane's health is zero, indicating it is completely destroyed. If `false`, only the state of the control panels is considered. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
BOOLReturns TRUE (1) or FALSE (0).
Examples
Official
-- Retrieve the player ped
local playerPed = PlayerPedId()
-- Retrieve the plane the player is currently in.
local plane = GetVehiclePedIsIn(playerPed, false)
-- If the player is not in a plane, return
if (plane == 0) or (not IsThisModelAPlane(GetEntityModel(plane))) then return end
-- Check if the plane's control panels are intact
local controlPanelsIntact = ArePlaneControlPanelsIntact(plane, true)
if (controlPanelsIntact) then
print("The plane's control panels are intact")
else
print("The plane's control panels are damaged or the plane is destroyed")
end