RedM Natives

_PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH

Play/advance a scripted speech created via _CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH and return a status code.

Hash0xB18FEC133C7C6C69
Runtime namePlaySoundFromScriptedPedAmbientSpeech
NamespaceAUDIO
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_PLAY_SOUND_FROM_SCRIPTED_SPEECH

Signature

int _PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH(int scriptedSpeech);

Parameters

NameTypeDescription
scriptedSpeechint—

Returns int

Description

Play/advance a scripted speech created via _CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH and return a status code.
Return values:
0 = not ready/invalid/failed
1 = started/playing
2 = finished/consumed (you can drop the handle)
Typical usage: poll this in a tick after creating the speech; when it returns 2, clear your handle.

Usage

Lua
local retval = PlaySoundFromScriptedPedAmbientSpeech(scriptedSpeech)

-- always works, by hash
local retval = Citizen.InvokeNative(0xB18FEC133C7C6C69, scriptedSpeech, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = PlaySoundFromScriptedPedAmbientSpeech(scriptedSpeech);

// by hash
const retval = Citizen.invokeNative('0xB18FEC133C7C6C69', scriptedSpeech, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xB18FEC133C7C6C69, scriptedSpeech);
  • 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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.