getVehicleWheelScale | Multi Theft Auto: Wiki Skip to content

getVehicleWheelScale

Client-side
Server-side
Shared

Pair: setVehicleWheelScale

Manual Review Required

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


This function gets the scale of all the wheels of a vehicle.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getWheelScale(...)
  • Variable: .wheelScale

Syntax

float getVehicleWheelScale ( vehicle theVehicle )
Required Arguments
  • theVehicle: The vehicle to get its wheel scale of.

Returns

  • float: value

Returns the wheel scale of the specified vehicle as a decimal number, or an error if the vehicle is invalid. For more information about the returned number, see setVehicleWheelScale .

Code Examples

shared

This example adds ashrinkwheelscommand that reduces the wheel scale of a vehicle in half each time it is invoked.

addCommandHandler("shrinkwheels", function()
local veh = getPedOccupiedVehicle(localPlayer)
if veh then
local newScale = getVehicleWheelScale(veh) * 0.5
setVehicleWheelScale(veh, newScale)
outputChatBox("Vehicle wheel scale set to " .. newScale .. ".", 0, 255, 0)
else
outputChatBox("You must be in a vehicle to use this command.", 255, 0, 0)
end
end)

See Also

Vehicle Functions