- Documentation
- Server functions
- setVehicleComponentScale
Function
setVehicleComponentScale
Stores a scale for a named part of a vehicle model on three axes (1 = original size).
Syntax
bool setVehicleComponentScale(vehicle vehicle, string component, float x [, float y = 0, float z = 0])Arguments
vehiclevehicle- The vehicle.
componentstring- Part name.
xfloat- Scale on the X axis (or a vector).
yfloat, optional = 0- Scale on the Y axis.
zfloat, optional = 0- Scale on the Z axis.
Differences from MTA:SA
- These MTA:SA arguments are not here:
string base = "parent"
In MTA:SA
setVehicleComponentScale(vehicle theVehicle, string theComponent, float scaleX, float scaleY, float scaleZ, string base = "parent")Returns
true on success.
Example
local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleComponentScale(vehicle, "exhaust_ok", 1.5, 1.5, 1.5)
Notes
State for scripts. The model does not change (see setVehicleComponentPosition).