Cam::getDofParam

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Retrieves the value of a specific Depth of Field (DOF) parameter for a specified camera.

Syntax

mp.game.cam.getDofParam(cameraHandle, paramHash);

Required Parameters

  • cameraHandle: number - The handle of the camera.
  • paramHash: number - The hash of the DOF parameter to retrieve.

Return Value

  • 'bool' - The value of the specified DOF parameter.

Example

// Retrieve a DOF parameter for a specific camera
const cameraHandle = mp.cameras.new("default").handle;
const dofParamHash = mp.game.joaat("dof_blur_amount");

const value = mp.game.cam.getDofParam(cameraHandle, dofParamHash);
mp.gui.chat.push(`Camera DOF parameter value: ${value}`);


See Also