Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »



Introduced in

Version:1.68

Description

Description: Selects the currently active gear for a vehicle.
Only works for vehicles which have gearboxes implemented.

Syntax

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

Alternative Syntax

Syntax:vehicle setGear [gear,mode]
Parameters:
  • vehicle: Object - Vehicle equipped with gearbox
  • gear: Number - Gear index. Range depends on vehicle; out of range values are ignored.
  • mode: String - Gear shift mode. Can be
    • "SHIFT": Shifts into selected gear.
    • "GEAR": Sets gear directly in gearbox, but this will get overridden immediately by the engine, and has thus 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



  • No labels