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
| Name | Type | Description |
|---|---|---|
| element | vehicle|object | The vehicle or object. |
| component | string | The 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.