Introduced in

Version:1.68

Description

Description:

Selects the currently active gear for a vehicle.

Note: Only works for vehicles which have gearboxes implemented.

Syntax

Syntax:vehicle setGear gear
Parameters:
  • vehicle: Object - Vehicle equipped with a gearbox.
  • gear: Number - Gear index. Range depends on the vehicle (out of range values are ignored).
Return Value:Nothing

Alternative Syntax

Syntax:vehicle setGear [gear,mode]
Parameters:
  • vehicle: Object - Vehicle equipped with a gearbox.
  • gear: Number - Gear index. Range depends on the vehicle (out of range values are ignored).
  • mode: String - Gear shift mode. Can be:
    • "SHIFT": Shifts into selected gear.
    • "GEAR": Sets the gear directly in the gearbox, but gets overridden immediately by the engine, and has no real effect.
    • "TRANS": Shifts transmission gear.
Return Value:Nothing

Examples

Examples:
car1 setGear 1;
car1 setGear [2,"SHIFT"];

Additional Information

See also: getGear
Multiplayer:
Problems:

Notes