SetSpecialFlightModeRatio
DocsSetSpecialFlightModeRatio(vehicle, ratio)Description
Used alongside <code>SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO</code>, this function initiates hover transformation for vehicles with a hover mode, like the Deluxo, based on a specified ratio (0.0 to 1.0). Incorrect values can glitch the vehicle. Without pairing, vehicles revert to car mode. Ineffective on the oppressor2
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to which the ratio will be applied. |
ratio | float | A value between 0.0 and 1.0 indicating the target state for the vehicle's hover mode transition. In decompiled scripts, a common usage is 0.75 - GetFrameTime(). Exceeding the maximum can cause the `Deluxo's` wheels to glitch, delaying their return to the initial position. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
voidThis native does not return a value.
Examples
Official
-- In this case we are enabling the hover mode for the vehicle and initiates hover transformation.
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
SetSpecialFlightModeRatio(vehicle, 0.75 - GetFrameTime())
SetVehicleHoverTransformPercentage(vehicle, 1.0)