# CAMERA::_SET_CAM_DOF_PARAMS

- **Hash:** `0xE4B7945EF4F1BFB2`
- **Namespace:** CAMERA
- **Runtime name (Lua/JS):** `SetCamDofParams`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/CAMERA/_SET_CAM_DOF_PARAMS

## Signature

```c
void _SET_CAM_DOF_PARAMS(Cam cam, Any* args);
```

## Parameters

- `cam` (`Cam`)
- `args` (`Any*`)

## Returns

`void`

## Description

*Source: VORPCORE RDR3natives*

Set cam DOF and focal settings

## Usage

### Lua

```lua
local args = SetCamDofParams(cam, args)

-- always available, by hash
local args = Citizen.InvokeNative(0xE4B7945EF4F1BFB2, cam, Citizen.PointerValueIntInitialized(args))
```

### JavaScript

```js
const args = SetCamDofParams(cam, args);

// by hash
const args = Citizen.invokeNative('0xE4B7945EF4F1BFB2', cam, Citizen.pointerValueIntInitialized(args));
```

### C#

```csharp
var args = new OutputArgument();
Function.Call((Hash)0xE4B7945EF4F1BFB2, cam, args);
// args.GetResult<int>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

## Examples

*Source: VORPCORE RDR3natives*

```lua
local struct = DataView.ArrayBuffer(10*8)
struct:SetFloat32(0*8, 5.0)
struct:SetFloat32(1*8, 2.0)
struct:SetFloat32(2*8, 128.0)
struct:SetFloat32(3*8, 25.0)
struct:SetFloat32(4*8, 25.0)
struct:SetFloat32(5*8, 60.0)
struct:SetInt32(6*8, 1)
struct:SetInt32(7*8, 0)
struct:SetInt32(8*8, 1)
struct:SetInt32(9*8, 1)
Citizen.InvokeNative(0xE4B7945EF4F1BFB2, cam, struct:Buffer())
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
