CREATE_CAM_WITH_PARAMS
Creates a script camera of type camName at the given position and rotation with field of view fov, and returns its handle.
Signature
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); // 0x40C23491CE83708E b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | camName | const char* |
| 2 | posX | float |
| 3 | posY | float |
| 4 | posZ | float |
| 5 | rotX | float |
| 6 | rotY | float |
| 7 | rotZ | float |
| 8 | fov | float |
| 9 | p8 | BOOL |
| 10 | p9 | int |
Facts
| Name | CREATE_CAM_WITH_PARAMS |
|---|---|
| Hash | 0x40C23491CE83708E |
| Namespace | |
| Returns | Cam |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local cam = Citizen.InvokeNative(0x40C23491CE83708E, -- CREATE_CAM_WITH_PARAMS
"text", -- const char* camName
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, -- int p9
Citizen.ResultAsInteger()
)
print(cam)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const cam = Citizen.invokeNative("0x40C23491CE83708E", // CREATE_CAM_WITH_PARAMS
"text", // const char* camName
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, // int p9
Citizen.resultAsInteger()
);
console.log(cam)int cam = Function.Call<int>((Hash)0x40C23491CE83708E, // CREATE_CAM_WITH_PARAMS
"text", // const char* camName
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 // int p9
);Related CAMERA natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.