createCamWithParams
CREATE_CAM_WITH_PARAMS0xB51194800B257161The GTA V native CREATE_CAM_WITH_PARAMS of the CAM namespace, as LS:MP client scripts call it: the global function createCamWithParams, in JavaScript and in Lua.
createCamWithParams(
camName: string,
posX: number,
posY: number,
posZ: number,
rotX: number,
rotY: number,
rotZ: number,
fov: number,
p8: boolean,
p9: number
): CamcreateCamWithParams(
camName: string,
posX: number,
posY: number,
posZ: number,
rotX: number,
rotY: number,
rotZ: number,
fov: number,
p8: boolean,
p9: integer
): CamUsage
const cam = createCamWithParams(camName, posX, posY, posZ, rotX, rotY, rotZ, fov, p8, p9);local cam = createCamWithParams(camName, posX, posY, posZ, rotX, rotY, rotZ, fov, p8, p9)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
const cam = createCamWithParams(camName, pos, rot, fov, p8, p9);local cam = createCamWithParams(camName, pos, rot, fov, p8, p9)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
camName | string | string | string |
posX | float | number | number |
posY | float | number | number |
posZ | float | number | number |
rotX | float | number | number |
rotY | float | number | number |
rotZ | float | number | number |
fov | float | number | number |
p8 | BOOL | boolean | boolean |
p9 | int | number | integer |
Returns
Cam JavaScript number, Lua integerHandle of a scripted camera.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
camName is always set to "DEFAULT_SCRIPTED_CAMERA" in Rockstar's scripts.
Camera names found in the b617d scripts:
"DEFAULT_ANIMATED_CAMERA"
"DEFAULT_SCRIPTED_CAMERA"
"DEFAULT_SCRIPTED_FLY_CAMERA"
"DEFAULT_SPLINE_CAMERA"
Side Note: It seems p8 is basically to represent what would be the bool p1 within createCam native. As well as the p9 since it's always 2 in scripts seems to represent what would be the last param within setCamRot native which normally would be 2.
Reference
- Namespace
- Camera CAM
- In the game
Cam CREATE_CAM_WITH_PARAMS(const char* camName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fov, BOOL p8, int p9)- Hash
0xB51194800B257161