# AUDIO::_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH

- **Hash:** `0x72E4D1C4639BC465`
- **Namespace:** AUDIO
- **Runtime name (Lua/JS):** `CreateNewScriptedPedAmbientSpeech`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_CREATE_NEW_SCRIPTED_SPEECH`
- **URL:** https://natives.borderlinerp.com/natives/AUDIO/_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH

## Signature

```c
int _CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH(Ped speaker, Any* params);
```

## Parameters

- `speaker` (`Ped`)
- `params` (`Any*`)

## Returns

`int`

## Description

Create a scripted speech to control speech. If handle is less than 0, it's invalid.
params struct for ScriptedSpeechParams see: PLAY_PED_AMBIENT_SPEECH_NATIVE
Returns scriptedSpeech handle.

## Usage

### Lua

```lua
local retval, params = CreateNewScriptedPedAmbientSpeech(speaker, params)

-- always available, by hash
local retval, params = Citizen.InvokeNative(0x72E4D1C4639BC465, speaker, Citizen.PointerValueIntInitialized(params), Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, params] = CreateNewScriptedPedAmbientSpeech(speaker, params);

// by hash
const [retval, params] = Citizen.invokeNative('0x72E4D1C4639BC465', speaker, Citizen.pointerValueIntInitialized(params), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
var params = new OutputArgument();
int retval = Function.Call<int>((Hash)0x72E4D1C4639BC465, speaker, params);
// params.GetResult<int>()
```

- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.
- 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.*
