ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setVehicleCurrentGear

Function

setVehicleCurrentGear

ServerVehiclesTrilogy Hub only

Stores a vehicle's gear number.

Syntax

bool setVehicleCurrentGear(vehicle vehicle, int value)

Arguments

vehiclevehicle
The vehicle.
valueint
Gear 0-10.

Returns

true on success.

Example

local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleCurrentGear(vehicle, 1)

Notes

State for scripts. Gears in the game are changed by the automatic gearbox; this value is for e.g. your own gauges.

See also