Vehicle::setEnginePowerMultiplier

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Vehicle power multiplier.
Does not have to be looped each frame. Can be set once.
Values lower than 1f don't work.

Note: If the value is set with GET_RANDOM_FLOAT_IN_RANGE, the vehicle will have an absurdly high ammount of power, and will become almost undrivable for the player or NPCs. The range doesn't seem to matter.

An high value like 10000000000f will visually remove the wheels that apply the power (front wheels for FWD, rear wheels for RWD), but the power multiplier will still apply, and the wheels still work.

Syntax

vehicle.setEnginePowerMultiplier(value);

Required Arguments

  • value: float

Return value

  • Undefined

Example

Client-Side
//Boosting all emergency vehicles
mp.events.add('render', () => {
    if (mp.players.local.vehicle) {
        if (mp.players.local.vehicle.getClass() === 18) {
            mp.players.local.vehicle.setEnginePowerMultiplier(12)
        }
    }
})

See also