RedM Natives

ATTACH_CAM_TO_ENTITY

Last param determines if its relative to the Entity

Hash0xFDC0DF7F6FB0A592
Runtime nameAttachCamToEntity
NamespaceCAMERA
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xFEDB7D269E8C60E3

Signature

void ATTACH_CAM_TO_ENTITY(Cam cam, Entity entity, float xOffset, float yOffset, float zOffset, BOOL isRelative);

Parameters

NameTypeDescription
camCam—
entityEntity—
xOffsetfloat—
yOffsetfloat—
zOffsetfloat—
isRelativeBOOL—

Returns void

Description

Last param determines if its relative to the Entity

Usage

Lua
AttachCamToEntity(cam, entity, xOffset, yOffset, zOffset, isRelative)

-- always works, by hash
Citizen.InvokeNative(0xFDC0DF7F6FB0A592, cam, entity, xOffset, yOffset, zOffset, isRelative)
JavaScript and C#
JavaScript
AttachCamToEntity(cam, entity, xOffset, yOffset, zOffset, isRelative);

// by hash
Citizen.invokeNative('0xFDC0DF7F6FB0A592', cam, entity, xOffset + 0.0000001, yOffset + 0.0000001, zOffset + 0.0000001, isRelative);
C#
Function.Call((Hash)0xFDC0DF7F6FB0A592, cam, entity, xOffset, yOffset, zOffset, isRelative);
  • 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.

Sources

alloc8or RDR3 NativeDB

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