GetVehicleLandingGearDown: Difference between revisions
Jump to navigation
Jump to search
Black Dragon (talk | contribs) mNo edit summary |
Black Dragon (talk | contribs) m (→Example) |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
This function tells you to pull up if you're flying low in a hydra with your landing gear up. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | function checkGear( player ) | ||
vehicle = getPlayerOccupiedVehicle( player ) --Get the players vehicle | |||
-- | if ( ( getVehicleID(vehicle) == 520 ) and ( getVehicleLandingGearDown( vehicle ) == false ) ) then --if the vehicle is a hydra, and the landing gear is up | ||
outputChatBox( "Pull up!", player ) --tell the player to pull up. | |||
end | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 14:03, 30 July 2007
This function is used to check whether a vehicles' landing gear is down or not.
Syntax
bool getVehicleLandingGearDown ( vehicle thevehicle )
Required Arguments
- thevehicle: The vehicle that you wish to check its' landing gear state.
Returns
Returns true if landing gear is down, false if the landing gear is up.
Returns nil if the vehicle has no landing gear, or is invalid.
Example
This function tells you to pull up if you're flying low in a hydra with your landing gear up.
function checkGear( player ) vehicle = getPlayerOccupiedVehicle( player ) --Get the players vehicle if ( ( getVehicleID(vehicle) == 520 ) and ( getVehicleLandingGearDown( vehicle ) == false ) ) then --if the vehicle is a hydra, and the landing gear is up outputChatBox( "Pull up!", player ) --tell the player to pull up. end end
See Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates