RedM Natives

_UI_PROMPT_SET_MASH_WITH_RESISTANCE_CAN_FAIL_MODE

Sets the mode for the given prompt to mash mode.

Hash0xDC0CB602DEADBA53
Runtime nameUiPromptSetMashWithResistanceCanFailMode
NamespaceHUD
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _UI_PROMPT_SET_MASH_WITH_RESISTANCE_CAN_FAIL_MODE(Prompt prompt, int mashes, float decreaseSpeed, float startProgress);

Parameters

NameTypeDescription
promptPrompt—
mashesint—
decreaseSpeedfloat—
startProgressfloat—

Returns void

Description

alloc8or RDR3 NativeDB

Sets the mode for the given prompt to mash mode.
decreaseSpeed: 0.0f will result in the prompt not showing the mash progress at all. 0.01f - ?.0f. At speeds around 7.0f to 8.0f the prompt basically fails immediately if you don't start mashing right away.
startProgress: 0.0f - 1.0f is a percentage value, so 0.5f = 50% progress. Range: 0.0f - 1.0f

VORPCORE RDR3natives

For startProgress, 0.0f - 1.0f is a percentage value, so 0.5f = 50% progress. Range: 0.0f - 1.0f
For decreaseSpeed, 0.0f will result in the prompt not showing the mash progress at all. 0.01f - ?.0f. At speeds around 7.0f to 8.0f the prompt basically fails immediately if you don't start mashing right away.

Usage

Lua
UiPromptSetMashWithResistanceCanFailMode(prompt, mashes, decreaseSpeed, startProgress)

-- always works, by hash
Citizen.InvokeNative(0xDC0CB602DEADBA53, prompt, mashes, decreaseSpeed, startProgress)
JavaScript and C#
JavaScript
UiPromptSetMashWithResistanceCanFailMode(prompt, mashes, decreaseSpeed, startProgress);

// by hash
Citizen.invokeNative('0xDC0CB602DEADBA53', prompt, mashes, decreaseSpeed + 0.0000001, startProgress + 0.0000001);
C#
Function.Call((Hash)0xDC0CB602DEADBA53, prompt, mashes, decreaseSpeed, startProgress);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • 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.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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