M MY Multiplayer: Wiki
Side
Kind

resetElementComponentRotation

Client

Puts a vehicle's or object's component back at the model's own rotation, undoing setElementComponentRotation.

bool resetElementComponentRotation(vehicle|object element, string component)

Parameters

NameTypeDescription
elementvehicle|objectThe vehicle or object.
componentstringThe component's name, as getElementComponents lists it.

Returns

true if it was reset, false if the component does not exist.

Example

addCommandHandler("resetwheel", function()
    local vehicle = getPedOccupiedVehicle(localPlayer)
    if vehicle then
        resetElementComponentRotation(vehicle, "wheel_lf_dummy")
    end
end)
Coming from MTAThe same as MTA's resetVehicleComponentRotation, but it also works on objects.

See also