ControlsClient

setControlShake

SET_CONTROL_SHAKE0x48B3886C1358D0D5

The GTA V native SET_CONTROL_SHAKE of the PAD namespace, as LS:MP client scripts call it: the global function setControlShake, in JavaScript and in Lua.

SignatureJavaScript
setControlShake(control: number, duration: number, frequency: number): void
SignatureLua
setControlShake(control: integer, duration: integer, frequency: integer)

Usage

JavaScript
setControlShake(control, duration, frequency);
Lua
setControlShake(control, duration, frequency)

Parameters

ParameterTypeJavaScriptLua
controlintnumberinteger
durationintnumberinteger
frequencyintnumberinteger

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.

control: see isControlEnabled
duration in milliseconds
frequency should range from about 10 (slow vibration) to 255 (very fast)

example:

setControlShake(PLAYER_CONTROL, 100, 200);

Reference

Namespace
Controls PAD
In the game
void SET_CONTROL_SHAKE(int control, int duration, int frequency)
Hash
0x48B3886C1358D0D5
Formerly
SET_PAD_SHAKE

Open in the interactive natives reference