Vehicle::setGearRatios

From RAGE Multiplayer Wiki
Revision as of 22:58, 24 December 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| === Summary === Sets custom gear ratios for the specified vehicle. === Syntax === <syntaxhighlight lang="javascript"> vehicle.setGearRatios(ratios); </syntaxhighlight> === Required Parameters === * '''ratios:''' {{RageType|Array<number>}} - An array of gear ratios. === Return Value === * '''undefined''' === Example === <syntaxhighlight lang="javascript"> // Set custom gear ratios for a vehicle const myVehicle = mp.players.loca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Sets custom gear ratios for the specified vehicle.

Syntax

vehicle.setGearRatios(ratios);

Required Parameters

  • ratios: Array<number> - An array of gear ratios.

Return Value

  • undefined

Example

// Set custom gear ratios for a vehicle
const myVehicle = mp.players.local.vehicle;
const customRatios = [4.0, 3.0, 2.0, 1.5, 1.0, 0.8];

myVehicle.setGearRatios(customRatios);
mp.gui.chat.push("Custom gear ratios applied to your vehicle.");


See Also