Vehicle::getDriveForceCurveValue

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Retrieves the drive force output for a specified RPM using a previously created drive force curve.

Syntax

mp.game.vehicle.getDriveForceCurveValue(curveNameHash, input);

Required Parameters

  • curveNameHash: number - The hash identifier for the curve.
  • input: number - The input RPM value.

Return Value

  • 'number' - The drive force for the given RPM.

Example

const curveHash = mp.game.joaat("custom_curve");
const rpm = 0.5;

const driveForce = mp.game.vehicle.getDriveForceCurveValue(curveHash, rpm);
mp.gui.chat.push(`Drive force for RPM ${rpm}: ${driveForce}`);


See Also