GetVehiclePanelState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 20: Line 20:
==Example==
==Example==
This function creates an admiral and outputs every panel's state in the chatbox.
This function creates an admiral and outputs every panel's state in the chatbox.
<syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 )
<syntaxhighlight lang="lua">local admiral = createVehicle ( 445, 0, 0, 10 )
admiral = createVehicle ( 445, 0, 0, 10 )
 
...


for i=0, 6 do
for i=0, 6 do

Revision as of 06:55, 23 September 2008


Dialog-information.png This article needs checking.

Reason(s): A list of panels would be nice and a more specific explanation on what the function returns --Norby89 12:30, 26 August 2007 (CDT)

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

Syntax

int getVehiclePanelState ( vehicle thevehicle, int panel )

Required Arguments

  • theVehicle: The vehicle that you wish to know the panel state of.
  • panel: An integer ranging from 0 to 6.

Returns

Returns an int indicating the state of the specified the panel. This value can be:

NEEDS UPDATING

Example

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 ( panel )
end

See Also