resetElementComponentRotation
Cliente
Devuelve un componente de un vehículo u objeto a la rotación original del modelo, deshaciendo setElementComponentRotation.
bool resetElementComponentRotation(vehicle|object element, string component)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| element | vehicle|object | El vehículo u objeto. |
| component | string | Nombre del componente, como lo lista getElementComponents. |
Retorno
true si se restableció, false si el componente no existe.
Ejemplo
addCommandHandler("resetwheel", function()
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
resetElementComponentRotation(vehicle, "wheel_lf_dummy")
end
end)Si vienes de MTAEquivale al
resetVehicleComponentRotation de MTA, pero también funciona con objetos.