The Lab
CAMERA native

CREATE_CAMERA_WITH_PARAMS

returns Cam10 paramsbuild 1207

Creates a script camera from the type hash camHash at the given position, rotation and fov, and returns its handle.

Signature

C
Cam CREATE_CAMERA_WITH_PARAMS(Hash camHash, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fov, BOOL p8, Any p9); // 0x98B99B9F27E2D60B b1207

Parameters

#NameType
1camHashHash
2posXfloat
3posYfloat
4posZfloat
5rotXfloat
6rotYfloat
7rotZfloat
8fovfloat
9p8BOOL
10p9Any

Facts

Facts about CREATE_CAMERA_WITH_PARAMS
Name
CREATE_CAMERA_WITH_PARAMS
Hash
0x98B99B9F27E2D60B
Namespace
Returns
Cam
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local cam = Citizen.InvokeNative(0x98B99B9F27E2D60B, -- CREATE_CAMERA_WITH_PARAMS
  GetHashKey("name"), -- Hash camHash
  0.0, -- float posX
  0.0, -- float posY
  0.0, -- float posZ
  0.0, -- float rotX
  0.0, -- float rotY
  0.0, -- float rotZ
  0.0, -- float fov
  false, -- BOOL p8
  0, -- Any p9
  Citizen.ResultAsInteger()
)
print(cam)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const cam = Citizen.invokeNative("0x98B99B9F27E2D60B", // CREATE_CAMERA_WITH_PARAMS
  GetHashKey("name"), // Hash camHash
  0.0, // float posX
  0.0, // float posY
  0.0, // float posZ
  0.0, // float rotX
  0.0, // float rotY
  0.0, // float rotZ
  0.0, // float fov
  false, // BOOL p8
  0, // Any p9
  Citizen.resultAsInteger()
);
console.log(cam)
C#
int cam = Function.Call<int>((Hash)0x98B99B9F27E2D60B, // CREATE_CAMERA_WITH_PARAMS
  (uint)API.GetHashKey("name"), // Hash camHash
  0.0f, // float posX
  0.0f, // float posY
  0.0f, // float posZ
  0.0f, // float rotX
  0.0f, // float rotY
  0.0f, // float rotZ
  0.0f, // float fov
  false, // BOOL p8
  0 // Any p9
);
All CAMERA natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.