_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.
Hash
0xB18FEC133C7C6C69Runtime name
PlaySoundFromScriptedPedAmbientSpeechNamespaceAUDIO
SideClient
NameCommunity guess
Docs
Since build1207
Also known as
_PLAY_SOUND_FROM_SCRIPTED_SPEECHSignature
int _PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH(int scriptedSpeech);Parameters
| Name | Type | Description |
|---|---|---|
scriptedSpeech | int | — |
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
local retval = PlaySoundFromScriptedPedAmbientSpeech(scriptedSpeech)
-- always works, by hash
local retval = Citizen.InvokeNative(0xB18FEC133C7C6C69, scriptedSpeech, Citizen.ResultAsInteger())JavaScript and C#
const retval = PlaySoundFromScriptedPedAmbientSpeech(scriptedSpeech);
// by hash
const retval = Citizen.invokeNative('0xB18FEC133C7C6C69', scriptedSpeech, Citizen.returnResultAnyway(), Citizen.resultAsInteger());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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.