Native referenceFiveM

CREATE_CAM_WITH_PARAMS

0xB51194800B257161 CAM
FUNCTION SIGNATURE
Cam CREATE_CAM_WITH_PARAMS(char* camName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fov, BOOL active, int rotationOrder);
Property Value
Native Name CREATE_CAM_WITH_PARAMS
Hash 0xB51194800B257161
Return Type Cam
Parameters camName (char*), posX (float), posY (float), posZ (float), rotX (float), rotY (float), rotZ (float), fov (float), active (BOOL), rotationOrder (int)

Description: Create a camera with the specified cam name/type, You can use SET_CAM_ natives to manipulate the camera.

Take a look at CREATE_CAM if you would like to see the available camera names.

Parameters

  • camName (char*) — A string representing the camera type, the game will convert the string into a joaat hash upon native execution.
  • posX (float) — The x position of the camera (you can also send a vector3 instead of the bulk coordinates)
  • posY (float) — The y position of the camera (you can also send a vector3 instead of the bulk coordinates)
  • posZ (float) — The z position of the camera (you can also send a vector3 instead of the bulk coordinates)
  • rotX (float) — The x rotation of the camera
  • rotY (float) — The y rotation of the camera
  • rotZ (float) — The z rotation of the camera
  • fov (float) — The Field Of View of the camera, is the observable world that is seen
  • active (BOOL) — Set to true if you wish to make this new camera the active camera.
  • rotationOrder (int) — The order of rotation, see GET_ENTITY_ROTATION

Examples

local cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", 561.3, 301.3, 63.0, 0.0, 0.0, 0.0, 90.0)
const cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", 561.3, 301.3, 63.0, 0.0, 0.0, 0.0, 90.0);
int cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", 561.3f, 301.3f, 63.0f, 0.0f, 0.0f, 0.0f, 90.0f);
Back to CAM