# AUDIO::PREPARE_SOUND_WITH_ENTITY

- **Hash:** `0x4AD019591E94C064`
- **Namespace:** AUDIO
- **Runtime name (Lua/JS):** `PrepareSoundWithEntity`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/AUDIO/PREPARE_SOUND_WITH_ENTITY

## Signature

```c
BOOL PREPARE_SOUND_WITH_ENTITY(const char* soundName, Entity entity, const char* soundsetName, int soundId);
```

## Parameters

- `soundName` (`const char*`)
- `entity` (`Entity`)
- `soundsetName` (`const char*`)
- `soundId` (`int`)

## Returns

`BOOL`

## Usage

### Lua

```lua
local retval = PrepareSoundWithEntity(soundName, entity, soundsetName, soundId)

-- always available, by hash
local retval = Citizen.InvokeNative(0x4AD019591E94C064, soundName, entity, soundsetName, soundId, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = PrepareSoundWithEntity(soundName, entity, soundsetName, soundId);

// by hash
const retval = Citizen.invokeNative('0x4AD019591E94C064', soundName, entity, soundsetName, soundId, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x4AD019591E94C064, soundName, entity, soundsetName, soundId);
```

*Sources: alloc8or RDR3 NativeDB.*
