Skip to content

Instantly share code, notes, and snippets.

View ihyajb's full-sized avatar

aj ihyajb

View GitHub Profile
@umaruru
umaruru / rdr2_prompt_research.md
Last active September 9, 2024 07:18
RDR2 Prompt research

Prompt Research

Note: The code examples below should work on RedM. On other frameworks, you may need to adjust some function names.

Creating prompts

To create a prompt, start with _UI_PROMPT_REGISTER_BEGIN (0x04F97DE45A519419), set up some settings, then finish with _UI_PROMPT_REGISTER_END (0xF7AA2696A22AD8B9). While there's a native to create prompts (_UI_PROMPT_CREATE (0x29FA7910726C3889)), there aren't many exemples around.

A prompt basically needs a control and a text. You can find a list of controls here Controls (femga/rdr3_discoveries). The text has to be created with VAR_STRING (0xFA925AC00EB830B9).