RedM Natives

_SET_CAM_DOF_PARAMS

Set cam DOF and focal settings

Hash0xE4B7945EF4F1BFB2
Runtime nameSetCamDofParams
NamespaceCAMERA
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _SET_CAM_DOF_PARAMS(Cam cam, Any* args);

Parameters

NameTypeDescription
camCam—
argsAny*—

Returns void

Description

VORPCORE RDR3natives

Set cam DOF and focal settings

Usage

Lua
local args = SetCamDofParams(cam, args)

-- always works, by hash
local args = Citizen.InvokeNative(0xE4B7945EF4F1BFB2, cam, Citizen.PointerValueIntInitialized(args))
JavaScript and C#
JavaScript
const args = SetCamDofParams(cam, args);

// by hash
const args = Citizen.invokeNative('0xE4B7945EF4F1BFB2', cam, Citizen.pointerValueIntInitialized(args));
C#
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

LUA · VORPCORE RDR3natives
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.