getVehicleModelWheelSize | Multi Theft Auto: Wiki Skip to content

getVehicleModelWheelSize

Client-side
Server-side
Shared

Pair: setVehicleModelWheelSize

This page is incomplete! Help wanted!

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


This function gets the size of a group of wheels for a vehicle model.

Syntax

getVehicleModelWheelSize ( )

Code Examples

client

This example adds ahovermecommand 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)

See Also

Vehicle Functions