getVehiclePanelState | Multi Theft Auto: Wiki Skip to content

getVehiclePanelState

Client-side
Server-side
Shared

Pair: setVehiclePanelState

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function returns the current state of a specifed panel on the vehicle. A vehicle can have up to 7 panels.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getPanelState(...)

Syntax

int getVehiclePanelState ( vehicle theVehicle, int panel )
Required Arguments
  • theVehicle: MISSING_PARAM_DESC
  • panel: MISSING_PARAM_DESC

Returns

  • int: value

Returns an int indicating the state of the specified the panel. This is a value between 0 and 3, with 0 indicating the panel is undamaged and 3 indicating it is very damaged.

Code Examples

shared

This function creates an admiral and outputs every panel's state in the chatbox.

local admiral = createVehicle ( 445, 0, 0, 10 )
for i=0, 6 do
local panel = getVehiclePanelState ( admiral, i )
outputChatBox ( tostring ( panel ) )
end

See Also

Vehicle Functions