# MISC::REGISTER_INTERACTION_LOCKON_PROMPT

- **Hash:** `0x870708A6E147A9AD`
- **Namespace:** MISC
- **Runtime name (Lua/JS):** `RegisterInteractionLockonPrompt`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MISC/REGISTER_INTERACTION_LOCKON_PROMPT

## Signature

```c
BOOL REGISTER_INTERACTION_LOCKON_PROMPT(Entity entity, const char* text, float radius, float p3, int flag, float p5, float p6, Prompt prompt, BOOL p8, int p9);
```

## Parameters

- `entity` (`Entity`)
- `text` (`const char*`)
- `radius` (`float`)
- `p3` (`float`)
- `flag` (`int`)
- `p5` (`float`)
- `p6` (`float`)
- `prompt` (`Prompt`)
- `p8` (`BOOL`)
- `p9` (`int`)

## Returns

`BOOL`

## Description

p3 is usually the same value of radius
p8 determines whether the ILO prompt is a lock on prompt with RMB

## Usage

### Lua

```lua
local retval = RegisterInteractionLockonPrompt(entity, text, radius, p3, flag, p5, p6, prompt, p8, p9)

-- always available, by hash
local retval = Citizen.InvokeNative(0x870708A6E147A9AD, entity, text, radius, p3, flag, p5, p6, prompt, p8, p9, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = RegisterInteractionLockonPrompt(entity, text, radius, p3, flag, p5, p6, prompt, p8, p9);

// by hash
const retval = Citizen.invokeNative('0x870708A6E147A9AD', entity, text, radius + 0.0000001, p3 + 0.0000001, flag, p5 + 0.0000001, p6 + 0.0000001, prompt, p8, p9, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x870708A6E147A9AD, entity, text, radius, p3, flag, p5, p6, prompt, p8, p9);
```

- 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.

## See also

- [MISC::UNREGISTER_INTERACTION_LOCKON_PROMPT](https://natives.borderlinerp.com/natives/MISC/UNREGISTER_INTERACTION_LOCKON_PROMPT.md)

*Sources: alloc8or RDR3 NativeDB.*
