CREATE_CAMERA_WITH_PARAMS
Creates a script camera from the type hash camHash at the given position, rotation and fov, and returns its handle.
Signature
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 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | camHash | Hash |
| 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 | Any |
Facts
| 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.
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)// 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)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
);Related CAMERA natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.