setVehicleComponentScale | Multi Theft Auto: Wiki Skip to content

setVehicleComponentScale

Client-side
Server-side
Shared

Pair: getVehicleComponentScale

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 sets the component scale of a vehicle.

Syntax

setVehicleComponentScale ( )

Code Examples

client

Example 1:This example would set the scale of the component.

addCommandHandler("scs", -- short for 'set component scale'
function()
local theVeh = getPedOccupiedVehicle(localPlayer)
local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle
if (theVeh) then
for k in pairs (getComponent) do
local x, y, z = getVehicleComponentScale(theVeh, k) --get the scale of the component
setVehicleComponentScale(theVeh, k, x*2, y*2, z*2) -- double the sizes
end
end
end
)

See Also

Vehicle Functions