GetVehicleDoorState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 4: Line 4:


==Syntax==
==Syntax==
<syntaxhighlight lang="lua"> int getVehicleDoorState ( vehicle, door )</syntaxhighlight>
<syntaxhighlight lang="lua">int getVehicleDoorState ( vehicle, door )</syntaxhighlight>


==Required Arguments==
==Required Arguments==

Revision as of 19:03, 10 August 2007

This function returns the current state of a specifed door on the vehicle.

Syntax

int getVehicleDoorState ( vehicle, door )

Required Arguments

  • Vehicle: A handle to the vehicle that you wish to know the door state of.
  • Door: A whole number between 0 and 5.

Example

local newcar = createVehicle ( 520, 1024, 1024, 1024 )
local state = getVehicleDoorState ( newcar, 2 )
outputChatBox ( "The 3rd door state on this car: " .. state )

See Also