RedM Natives

SET_CAM_COORD

Sets the position of the cam.

Hash0xF9EE7D419EE49DE6
Runtime nameSetCamCoord
NamespaceCAMERA
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x4D41783FB745E42E

Signature

void SET_CAM_COORD(Cam cam, float posX, float posY, float posZ);

Parameters

NameTypeDescription
camCam—
posXfloat—
posYfloat—
posZfloat—

Returns void

Description

Sets the position of the cam.

Usage

Lua
SetCamCoord(cam, posX, posY, posZ)

-- always works, by hash
Citizen.InvokeNative(0xF9EE7D419EE49DE6, cam, posX, posY, posZ)
JavaScript and C#
JavaScript
SetCamCoord(cam, posX, posY, posZ);

// by hash
Citizen.invokeNative('0xF9EE7D419EE49DE6', cam, posX + 0.0000001, posY + 0.0000001, posZ + 0.0000001);
C#
Function.Call((Hash)0xF9EE7D419EE49DE6, cam, posX, posY, posZ);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

See also

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.