CameraClient

setCamCoord

SET_CAM_COORD0x4D41783FB745E42E

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

SignatureJavaScript
setCamCoord(cam: Cam, posX: number, posY: number, posZ: number): void
SignatureLua
setCamCoord(cam: Cam, posX: number, posY: number, posZ: number)

Usage

JavaScript
setCamCoord(cam, posX, posY, posZ);
Lua
setCamCoord(cam, posX, posY, posZ)

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
setCamCoord(cam, pos);
Lua · with vectors
setCamCoord(cam, pos)

Parameters

ParameterTypeJavaScriptLua
camCamnumberinteger
posXfloatnumbernumber
posYfloatnumbernumber
posZfloatnumbernumber

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.

Sets the position of the cam.

Reference

Namespace
Camera CAM
In the game
void SET_CAM_COORD(Cam cam, float posX, float posY, float posZ)
Hash
0x4D41783FB745E42E

Open in the interactive natives reference