# VOLUME::_CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY

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

## Signature

```c
Volume _CREATE_VOLUME_LOCK_ATTACHED_TO_ENTITY(Entity entity, float radius, int flag, Any p3);
```

## Parameters

- `entity` (`Entity`)
- `radius` (`float`)
- `flag` (`int`)
- `p3` (`Any`)

## Returns

`Volume`

## Description

Params: p3 is always 0

## Usage

### Lua

```lua
local retval = CreateVolumeLockAttachedToEntity(entity, radius, flag, p3)

-- always available, by hash
local retval = Citizen.InvokeNative(0xF383E96C4904DF0C, entity, radius, flag, p3, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = CreateVolumeLockAttachedToEntity(entity, radius, flag, p3);

// by hash
const retval = Citizen.invokeNative('0xF383E96C4904DF0C', entity, radius + 0.0000001, flag, p3, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xF383E96C4904DF0C, entity, radius, flag, p3);
```

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