playCamAnim
PLAY_CAM_ANIM0x9A2D0FB2E7852392The GTA V native PLAY_CAM_ANIM of the CAM namespace, as LS:MP client scripts call it: the global function playCamAnim, in JavaScript and in Lua.
playCamAnim(
cam: Cam,
animName: string,
animDictionary: string,
x: number,
y: number,
z: number,
xRot: number,
yRot: number,
zRot: number,
p9: boolean,
p10: number
): booleanplayCamAnim(
cam: Cam,
animName: string,
animDictionary: string,
x: number,
y: number,
z: number,
xRot: number,
yRot: number,
zRot: number,
p9: boolean,
p10: integer
): booleanUsage
JavaScript
const result = playCamAnim(cam, animName, animDictionary, x, y, z, xRot, yRot, zRot, p9, p10);Lua
local result = playCamAnim(cam, animName, animDictionary, x, y, z, xRot, yRot, zRot, p9, p10)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
const result = playCamAnim(cam, animName, animDictionary, pos, rot, p9, p10);Lua · with vectors
local result = playCamAnim(cam, animName, animDictionary, pos, rot, p9, p10)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
cam | Cam | number | integer |
animName | string | string | string |
animDictionary | string | string | string |
x | float | number | number |
y | float | number | number |
z | float | number | number |
xRot | float | number | number |
yRot | float | number | number |
zRot | float | number | number |
p9 | BOOL | boolean | boolean |
p10 | int | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Atleast one time in a script for the zRot Rockstar uses getEntityHeading to help fill the parameter.
p9 is unknown at this time.
p10 throughout all the X360 Scripts is always 2.
Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
Reference
- Namespace
- Camera CAM
- In the game
BOOL PLAY_CAM_ANIM(Cam cam, const char* animName, const char* animDictionary, float x, float y, float z, float xRot, float yRot, float zRot, BOOL p9, int p10)- Hash
0x9A2D0FB2E7852392