Camera::getDofParam

From RAGE Multiplayer Wiki
Revision as of 18:07, 25 December 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| === Summary === Retrieves the current value of a specific Depth of Field (DOF) parameter for the active camera. === Syntax === <syntaxhighlight lang="javascript"> camera.getDofParam(paramHash); </syntaxhighlight> === Required Parameters === * '''paramHash:''' {{RageType|number}} - The hash of the DOF parameter to retrieve. === Return Value === * '''{{RageType|bool|number|Array}}''' - The value of the specified DOF parameter. Th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

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

Syntax

camera.getDofParam(paramHash);

Required Parameters

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

Return Value

  • 'bool' - The value of the specified DOF parameter. The type can vary based on the parameter.

Example

// Retrieve the value of a DOF parameter
const dofParamHash = mp.game.joaat("dof_blur_amount");
const value = camera.getDofParam(dofParamHash);

mp.gui.chat.push(`DOF parameter value: ${value}`);


See Also