CameraClient

shakeCam

SHAKE_CAM0x6A25241C340D3822

The GTA V native SHAKE_CAM of the CAM namespace, as LS:MP client scripts call it: the global function shakeCam, in JavaScript and in Lua.

SignatureJavaScript
shakeCam(cam: Cam, type: string, amplitude: number): void
SignatureLua
shakeCam(cam: Cam, type: string, amplitude: number)

Usage

JavaScript
shakeCam(cam, type, amplitude);
Lua
shakeCam(cam, type, amplitude)

Parameters

ParameterTypeJavaScriptLua
camCamnumberinteger
typestringstringstring
amplitudefloatnumbernumber

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.

Possible shake types (updated b617d):

DEATH_FAIL_IN_EFFECT_SHAKE
DRUNK_SHAKE
FAMILY5_DRUG_TRIP_SHAKE
HAND_SHAKE
JOLT_SHAKE
LARGE_EXPLOSION_SHAKE
MEDIUM_EXPLOSION_SHAKE
SMALL_EXPLOSION_SHAKE
ROAD_VIBRATION_SHAKE
SKY_DIVING_SHAKE
VIBRATE_SHAKE

Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json

Reference

Namespace
Camera CAM
In the game
void SHAKE_CAM(Cam cam, const char* type, float amplitude)
Hash
0x6A25241C340D3822

Open in the interactive natives reference