Vehicle::getDefaultHandling: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "{{ClientsideJsFunction}} {{JSContainer| Gets default vehicle handling type value. Handling Types from '''handling.meta''': <pre> fInitialDriveMaxFlatVel fBrakeBiasFront fSteeringLock fTractionCurveLateral fTractionBiasFront fSuspensionCompDamp fSuspensionReboundDamp fSuspensionBiasFront fAntiRollBarBiasFront </pre> ===Required Params=== *'''type''': {{RageType|string}} ===Return value=== *''' {{RageType|float}} ''' ==Syntax== <syntaxhighlight lang="javascript"> vehic...")
 
 
Line 35: Line 35:
}}
}}
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

Latest revision as of 16:40, 29 May 2024

Client-Side
Function

 JavaScript



JavaScript Syntax

Gets default vehicle handling type value.

Handling Types from handling.meta:

fInitialDriveMaxFlatVel
fBrakeBiasFront
fSteeringLock
fTractionCurveLateral
fTractionBiasFront
fSuspensionCompDamp
fSuspensionReboundDamp
fSuspensionBiasFront
fAntiRollBarBiasFront

Required Params

  • type: string

Return value

  • float

Syntax

vehicle.getDefaultHandling(type);

Example

const vehicle = mp.vehicles.new(mp.game.joaat("sultanrs"), mp.players.local.position); //create a sultanrs at player's position
const initialDriveMaxValue = vehicle.getDefaultHandling('fInitialDriveMaxFlatVel'); // get fInitialDriveMaxFlatVel default value
mp.console.logInfo(`initialDriveMaxValue is ${initialDriveMaxValue}`);


See also