GetVehicleDoorState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:
==Example==
==Example==
<syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 )
<syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 )
state = getVehicleDoorState ( newcar, 2 )
local state = getVehicleDoorState ( newcar, 2 )
outputChatBox ( "The 3rd door state on this car: " .. state )</syntaxhighlight>
outputChatBox ( "The 3rd door state on this car: " .. state )</syntaxhighlight>


==See Also==
==See Also==
{{Vehicle functions}}
{{Vehicle functions}}

Revision as of 18:59, 10 August 2007

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

Syntax

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