setVehicleModelWheelSize | Multi Theft Auto: Wiki Skip to content

setVehicleModelWheelSize

Client-side
Server-side
Shared

Pair: getVehicleModelWheelSize

Manual Review Required

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


This function sets the size of a group of wheels for a vehicle model. The wheel size mainly determines their width, collision box (used to check if a bullet hits a tire, for example) and the ground clearance of vehicles with that model (i.e., the minimum distance from the center of the car geometry to the ground). It also changes the visual scale and rotation of the wheels, if not all the wheel groups have equal size. The visual scaling is applied before the per-vehicle wheel scale.

OOP Syntax Help! I don't understand this!

Syntax

bool setVehicleModelWheelSize ( int vehicleModel, string wheelGroup, float wheelSize )
Required Arguments
  • vehicleModel: The vehicle model ID.
  • wheelGroup: The group of wheels of the vehicle model that will have its size set by this function. The following values are supported: front_axle : Represents the wheels in the front axle. The default value for this group is read by GTA from the WheelScale_Front field of the vehicles.ide data file. rear_axle : Represents the wheels in the rear axle. The default value for this group is read by GTA from the WheelScale_Rear field of the vehicles.ide data file. all_wheels : Convenience group that contains the other wheel groups: front_axle and rear_axle .
  • wheelSize: The wheel size value to set. Default GTA values for automobiles usually are around 0.7. It must be greater than 0.

Returns

  • bool: value

Returns true if the size for the specified wheel group and vehicle model has been set successfully, or an error if some parameter is invalid.

Code Examples

shared

This example replaces the Infernus model with a Huntley model and sets the intended wheel scale for the new model accordingly, so that the vehicle does not look sunken into the ground.

engineImportTXD(engineLoadTXD("huntley.txd"), 411)
engineReplaceModel(engineLoadDFF("huntley.txd"), 411)
setVehicleModelWheelSize(411, "all_wheels", 0.9) -- Default Huntley model wheel size, from default vehicles.ide

See Also

Vehicle Functions