setVehicleRotorSpeed | Multi Theft Auto: Wiki Skip to content

setVehicleRotorSpeed

Client-side
Server-side
Shared

Pair: getVehicleRotorSpeed

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Sets the rotor speed of a helicopter or plane. This function now applies to both helicopters and planes.

Note

Setting higher values will cause problems to the client

Syntax

setVehicleRotorSpeed ( )

Code Examples

client
addCommandHandler("rs", function()
local theVehicle = getPedOccupiedVehicle(localPlayer)
if not theVehicle then return end
local controller = getVehicleController(theVehicle)
if controller ~= localPlayer then return end
local vehicleType = getVehicleType(theVehicle)
if vehicleType ~= "Helicopter" and vehicleType ~= "Plane" then return end
setVehicleRotorSpeed(theVehicle, 10)
end)

See Also

Vehicle Functions