- Documentation
- Shared functions
- setVehicleModelWheelSize
Function
setVehicleModelWheelSize
Changes the wheel diameter of a vehicle model. On the client it changes the wheels of vehicles with a custom model (engineReplaceModel) for this player; game cars' wheels stay as they are. On the server it only stores the value for scripts.
Syntax
bool setVehicleModelWheelSize(int model, string wheelGroup, float size)Arguments
modelint- Vehicle model ID.
wheelGroupstring"front_axle","rear_axle"or"all_wheels".sizefloat- Wheel diameter in metres (as in vehicles.ide, e.g. 0.7).
Returns
true on success.
Example
setVehicleModelWheelSize(411, "rear_axle", 0.8)
See also
getVehicleModelWheelSizeReturns a model's wheel diameter set withsetVehicleModelWheelSize. On the client without a group name it returns a{ front_axle, rear_axle }table.engineReplaceModelReplaces the look of a model number: with an engine asset (engineLoadAsset) or a model from a file (engineLoadMesh). Objects, vehicles and peds (skins 0-312; a file model without a skeleton is static) with that number show the new model. An object without its own collision gets one from the.dffor from the model triangles;engineReplaceCOLgives a custom collision. It works for this player, so call it in a client script. Replacing a newengineRequestModelmodel that the game has not created yet (the player is just joining, a resource restart) waits for it; a model number that does not exist givesfalse.