VehicleClient

setInvertVehicleControls

SET_INVERT_VEHICLE_CONTROLS0x5B91B229243351A8

The GTA V native SET_INVERT_VEHICLE_CONTROLS of the VEHICLE namespace, as LS:MP client scripts call it: the global function setInvertVehicleControls, in JavaScript and in Lua.

SignatureJavaScript
setInvertVehicleControls(vehicle: Vehicle, state: boolean): void
SignatureLua
setInvertVehicleControls(vehicle: Vehicle, state: boolean)

Usage

JavaScript
setInvertVehicleControls(vehicle, state);
Lua
setInvertVehicleControls(vehicle, state)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
stateBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Inverts vehicle's controls. So INPUT_VEH_ACCELERATE will be INPUT_VEH_BRAKE and vise versa (same for A/D controls)
Doesn't work for planes/helis.

Reference

Namespace
Vehicle VEHICLE
In the game
void SET_INVERT_VEHICLE_CONTROLS(Vehicle vehicle, BOOL state)
Hash
0x5B91B229243351A8
Introduced
Game build 791 legacy numbering
Formerly
_SET_VEHICLE_CONTROLS_INVERTED

Open in the interactive natives reference