RedM Natives

CREATE_DUI

Creates a DUI browser.

Hash0x23EAF899
Runtime nameCreateDui
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

long CREATE_DUI(char* url, int width, int height);

Parameters

NameTypeDescription
urlchar*

The initial URL to load in the browser.

widthint

The width of the backing surface.

heightint

The height of the backing surface.

Returns long — A DUI object.

Description

Cfx.re native reference

Creates a DUI browser. This can be used to draw on a runtime texture using CREATE_RUNTIME_TEXTURE_FROM_DUI_HANDLE.

Usage

Lua
local retval = CreateDui(url, width, height)

-- always works, by hash
local retval = Citizen.InvokeNative(0x23eaf899, url, width, height, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = CreateDui(url, width, height);

// by hash
const retval = Citizen.invokeNative('0x23eaf899', url, width, height, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x23eaf899, url, width, height);

Sources

Cfx.re native reference

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