| Property | Value |
|---|---|
| Native Name | CREATE_CAMERA |
| Hash | 0x5E3CF89C6BCCA67D |
| Return Type | Cam |
| Parameters | camHash (Hash), active (BOOL) |
Description: Creates a camera with the specified camera hash, You can use SET_CAM_ natives to manipulate the camera.
Make sure to call RENDER_SCRIPT_CAMS once the camera is created, or this won't have any visible effect.
Take a look at CREATE_CAM if you would like to see the available camera names.
NativeDB Introduced: v323
Parameters
camHash(Hash) — The hash of the camera type, use GET_HASH_KEY to get the camera hash from the name.active(BOOL) — Set to true if you wish to make this new camera the active camera.
Examples
-- creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type
local cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true)
RenderScriptCams(true, false, 0, true, true)
// creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type
const cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true);
RenderScriptCams(true, false, 0, true, true)
using static CitizenFX.Core.Native.API;
// creates a camera with the "DEFAULT_SCRIPTED_CAMERA" type
int cam = CreateCamera(GetHashKey("DEFAULT_SCRIPTED_CAMERA"), true);
RenderScriptCams(true, false, 0, true, true);