setSpecialFlightModeTargetRatio
SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO0x438B3D7CA026FE91The GTA V native SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO of the VEHICLE namespace, as LS:MP client scripts call it: the global function setSpecialFlightModeTargetRatio, in JavaScript and in Lua.
setSpecialFlightModeTargetRatio(vehicle: Vehicle, targetRatio: number): voidsetSpecialFlightModeTargetRatio(vehicle: Vehicle, targetRatio: number)Usage
setSpecialFlightModeTargetRatio(vehicle, targetRatio);setSpecialFlightModeTargetRatio(vehicle, targetRatio)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
targetRatio | float | number | number |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Used in conjunction with setSpecialFlightModeRatio, in Rockstar's scripts. The vehicle will transform into the given targetRatio, starting from the vehicle's current hover mode transform ratio (which can also be manually set by setSpecialFlightModeRatio,) i.e. setting targetRatio to 0.0 while the vehicle is in hover mode will transform the vehicle into car mode, likewise setting targetRatio to 1.0 while the vehicle is in car mode will transform the vehicle into hover mode, and if the current transform ratio is set to 0.7 while targetRatio is 1.0 the vehicle will transform into hover mode starting from being already partially transformed.
targetRatio is recommended to always be 0.0 or 1.0, otherwise the vehicle will transform into a glitched state.
Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2.
Example:
Ped playerPed = playerPedId();
Vehicle veh = getVehiclePedIsUsing(playerPed);
setSpecialFlightModeRatio(veh, 0.7f);
setSpecialFlightModeTargetRatio(veh, 1.0f);Reference
- Namespace
- Vehicle VEHICLE
- In the game
void SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(Vehicle vehicle, float targetRatio)- Hash
0x438B3D7CA026FE91- Introduced
- Game build 1290 legacy numbering
- Formerly
_SET_VEHICLE_TRANSFORM_STATE_SET_VEHICLE_HOVER_TRANSFORM_PERCENTAGE