setVehicleLandingGearDown | Multi Theft Auto: Wiki Skip to content

setVehicleLandingGearDown

Client-side
Server-side
Shared

Manual Review Required

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


This function is used to set the landing gear state of certain vehicles.

Syntax

bool setVehicleLandingGearDown ( vehicle theVehicle, bool gearState )
Required Arguments
  • theVehicle: The vehicle of which you wish to set the landing gear state.
  • gearState: A bool representing the state of the landing gear. true represents a collapsed landing gear, while false represents a disabled landing gear.

Returns

  • bool: value

Returns true if the landing gear was set successfully, false otherwise.

Code Examples

shared

This example sets the landing gear up and outputs to the player to pull up

function checkGear( thePlayer )
local theVehicle = getPedOccupiedVehicle( thePlayer ) --Get the players vehicle
if ( getElementModel(theVehicle) == 520 and getVehicleLandingGearDown( theVehicle ) == true) then --if the vehicle is a hydra, and the landing gear is down
setVehicleLandingGearDown(theVehicle,false) --Set the landing gear up
outputChatBox( "Pull up!", thePlayer ) --and tell the player to pull up.
end
end

See Also

Vehicle Functions