# HUD::_UI_PROMPT_SET_MASH_WITH_RESISTANCE_CAN_FAIL_MODE

- **Hash:** `0xDC0CB602DEADBA53`
- **Namespace:** HUD
- **Runtime name (Lua/JS):** `UiPromptSetMashWithResistanceCanFailMode`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/HUD/_UI_PROMPT_SET_MASH_WITH_RESISTANCE_CAN_FAIL_MODE

## Signature

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

## Parameters

- `prompt` (`Prompt`)
- `mashes` (`int`)
- `decreaseSpeed` (`float`)
- `startProgress` (`float`)

## Returns

`void`

## Description

*Source: 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

*Source: 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

```lua
UiPromptSetMashWithResistanceCanFailMode(prompt, mashes, decreaseSpeed, startProgress)

-- always available, by hash
Citizen.InvokeNative(0xDC0CB602DEADBA53, prompt, mashes, decreaseSpeed, startProgress)
```

### JavaScript

```js
UiPromptSetMashWithResistanceCanFailMode(prompt, mashes, decreaseSpeed, startProgress);

// by hash
Citizen.invokeNative('0xDC0CB602DEADBA53', prompt, mashes, decreaseSpeed + 0.0000001, startProgress + 0.0000001);
```

### C#

```csharp
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.*
