RedM Natives

EVENTS_UI_GET_MESSAGE

alignas(8) eUIScriptEventType eventType; // alignas(8) int intParam; alignas(8) Hash hashParam; alignas(8) Hash datastoreParam; Old name: _EVENT_MANAGER_GET_EVENT

Hash0xE24E957294241444
Runtime nameEventsUiGetMessage
NamespaceUIEVENTS
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL EVENTS_UI_GET_MESSAGE(Hash hash, Any* eventData);

Parameters

NameTypeDescription
hashHash—
eventDataAny*—

Returns BOOL

Description

eventData:
struct UI_SCRIPT_EVENT
{
	alignas(8) eUIScriptEventType eventType; // https://alloc8or.re/rdr3/doc/enums/eUIScriptEventType.txt
	alignas(8) int intParam;
	alignas(8) Hash hashParam;
	alignas(8) Hash datastoreParam;
};

Old name: _EVENT_MANAGER_GET_EVENT

Usage

Lua
local retval, eventData = EventsUiGetMessage(hash, eventData)

-- always works, by hash
local retval, eventData = Citizen.InvokeNative(0xE24E957294241444, hash, Citizen.PointerValueIntInitialized(eventData), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, eventData] = EventsUiGetMessage(hash, eventData);

// by hash
const [retval, eventData] = Citizen.invokeNative('0xE24E957294241444', hash, Citizen.pointerValueIntInitialized(eventData), Citizen.returnResultAnyway());
C#
var eventData = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xE24E957294241444, hash, eventData);
// eventData.GetResult<int>()
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • 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.

Sources

alloc8or RDR3 NativeDB

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