GetVehicleModelWheelSize: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 40: | Line 40: | ||
==Requirements== | ==Requirements== | ||
{{Requirements|n/a|1.5.7-9. | {{Requirements|n/a|1.5.7-9.20642|}} | ||
==See Also== | ==See Also== | ||
{{Client_vehicle_functions}} | {{Client_vehicle_functions}} |
Revision as of 14:02, 25 October 2020
This function gets the size of a group of wheels for a vehicle model.
Syntax
float|table getVehicleModelWheelSize ( int vehicleModel [, string wheelGroup ] )
OOP Syntax Help! I don't understand this!
- Method: Vehicle.getModelWheelSize(...)
- Counterpart: setVehicleModelWheelSize
Required Arguments
- vehicleModel: The vehicle model ID.
Optional Arguments
- wheelGroup: The group of wheels of the vehicle model to retrieve their size value. If not specified, it defaults to all_wheels. The following values are supported:
- front_axle: Represents the wheels in the front axle.
- rear_axle: Represents the wheels in the rear axle.
- all_wheels: Convenience group that returns all the wheel sizes in a table of the following format:
{ front_axle = 0.8, rear_axle = 0.7 }
Returns
Returns a decimal number or a table, depending on the specified wheel group. If the specified vehicle model ID or wheel group are not valid, an error is raised instead. The meaning of the wheel size values is documented in setVehicleModelWheelSize.
Example
This example adds a hoverme command that exploits the fact that the wheel size changes the ground clearance of a vehicle model to make it hover over the ground.
addCommandHandler("hoverme", function() local veh = getPedOccupiedVehicle(localPlayer) if veh then local vehicleId = getElementModel(veh) local currentSizes = getVehicleModelWheelSize(vehicleId) setVehicleModelWheelSize(vehicleId, "front_axle", currentSizes.front_axle * 2) setVehicleModelWheelSize(vehicleId, "rear_axle", currentSizes.rear_axle * 2) outputChatBox("Vehicle model wheel size doubled!", 0, 255, 0) else outputChatBox("You must be in a vehicle to use this command.", 255, 0, 0) end end)
Requirements
This template will be deleted.
See Also
- areVehicleLightsOn
- getHeliBladeCollisionsEnabled
- getHelicopterRotorSpeed
- getVehicleAdjustableProperty
- getVehicleComponentPosition
- getVehicleComponentRotation
- getVehicleComponents
- getVehicleComponentScale
- getVehicleComponentVisible
- getVehicleCurrentGear
- getVehicleDummyPosition
- getVehicleGravity
- getVehicleLandingGearDown
- getVehicleModelDummyDefaultPosition
- getVehicleModelDummyPosition
- getVehicleModelExhaustFumesPosition
- getVehicleModelWheelSize
- getVehicleNitroCount
- getVehicleNitroLevel
- getVehicleWheelFrictionState
- getVehicleWheelScale
- isTrainChainEngine
- isVehicleNitroActivated
- isVehicleNitroRecharging
- isVehicleOnGround
- isVehicleWheelOnGround
- isVehicleWindowOpen
- resetVehicleComponentPosition
- resetVehicleComponentRotation
- resetVehicleComponentScale
- resetVehicleDummyPositions
- setHeliBladeCollisionsEnabled
- setHelicopterRotorSpeed
- setVehicleAdjustableProperty
- setVehicleComponentPosition
- setVehicleComponentRotation
- setVehicleComponentScale
- setVehicleComponentVisible
- setVehicleDummyPosition
- setVehicleGravity
- setVehicleLandingGearDown
- setVehicleModelDummyPosition
- setVehicleModelExhaustFumesPosition
- setVehicleModelWheelSize
- setVehicleNitroActivated
- setVehicleNitroCount
- setVehicleNitroLevel
- setVehicleWheelScale
- setVehicleWheelStates
- setVehicleWindowOpen
- Shared
- 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