IsVehicleWheelOnGround
From Multi Theft Auto: Wiki
FROM VERSION 1.5.5 r11854 ONWARDS
Note: In vehicles with 3 wheels, the wheels are combined 2 in 1, in motorbikes only the left - "front_left" and "rear_left"
|
Syntax
bool isVehicleWheelOnGround ( vehicle theVehicle, string|int wheel )
OOP Syntax Help! I don't understand this!
- Method: vehicle:isWheelOnGround(...)
Required Arguments
- theVehicle The vehicle, which you want to check.
- wheel The wheel name or number, see list below:
"front_left"
or 0"rear_left"
or 1"front_right"
or 2"rear_right"
or 3
Returns
Returns true if the vehicle wheel is on ground/collided, false otherwise.
Example
This example displays four colored rectangles on the screen. If the wheel is colliding, the rectangle will be green, otherwise it will be red.
local Green = tocolor(0, 255, 0, 255) local Red = tocolor(255, 0, 0, 255) addEventHandler( "onClientRender", root, function( ) local theVehicle = getPedOccupiedVehicle( localPlayer ) if isElement( theVehicle ) then dxDrawRectangle( 100, 100, 20, 20, isVehicleWheelOnGround ( theVehicle, 0 ) and Green or Red ) dxDrawRectangle( 100, 140, 20, 20, isVehicleWheelOnGround ( theVehicle, 1 ) and Green or Red ) dxDrawRectangle( 140, 100, 20, 20, isVehicleWheelOnGround ( theVehicle, 2 ) and Green or Red ) dxDrawRectangle( 140, 140, 20, 20, isVehicleWheelOnGround ( theVehicle, 3 ) and Green or Red ) end end )
See Also
FROM VERSION 1.5.7 r19626 ONWARDS
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getHeliBladeCollisionsEnabled
- getHelicopterRotorSpeed
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- getVehicleAdjustableProperty
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleComponentPosition
- getVehicleComponentRotation
- getVehicleComponentScale
- getVehicleComponentVisible
- getVehicleComponents
- getVehicleController
- getVehicleCurrentGear
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleGravity
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelDummyPosition
- getVehicleModelExhaustFumesPosition
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleNitroCount
- getVehicleNitroLevel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirens
- getVehicleSirensOn
- getVehicleSirenParams
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainChainEngine
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleNitroActivated
- isVehicleNitroRecharging
- isVehicleOnGround
- isVehicleTaxiLightOn
- isVehicleWheelOnGround
- isVehicleWindowOpen
- removeVehicleUpgrade
- resetVehicleComponentPosition
- resetVehicleComponentRotation
- resetVehicleComponentScale
- setHeliBladeCollisionsEnabled
- setHelicopterRotorSpeed
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- setVehicleAdjustableProperty
- setVehicleColor
- setVehicleComponentPosition
- setVehicleComponentRotation
- setVehicleComponentScale
- setVehicleComponentVisible
- setVehicleDamageProof
- setVehicleDirtLevel
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleGravity
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleModelDummyPosition
- setVehicleModelExhaustFumesPosition
- setVehicleNitroActivated
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn