{"hash":"0xB18FEC133C7C6C69","ns":"AUDIO","name":"_PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH","slug":"_PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH","official":false,"named":true,"luaName":"PlaySoundFromScriptedPedAmbientSpeech","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"scriptedSpeech","type":"int"}],"summary":"Play/advance a scripted speech created via _CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH and return a status code.","descriptions":[{"source":"alloc8or","format":"text","body":"Play/advance a scripted speech created via _CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH and return a status code.\nReturn values:\n  0 = not ready/invalid/failed\n  1 = started/playing\n  2 = finished/consumed (you can drop the handle)\nTypical usage: poll this in a tick after creating the speech; when it returns 2, clear your handle."}],"examples":[],"aliases":["_PLAY_SOUND_FROM_SCRIPTED_SPEECH"],"enums":[],"related":[],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/AUDIO/_PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH","markdownUrl":"https://natives.borderlinerp.com/natives/AUDIO/_PLAY_SOUND_FROM_SCRIPTED_PED_AMBIENT_SPEECH.md","snippets":{"lua":"local retval = PlaySoundFromScriptedPedAmbientSpeech(scriptedSpeech)","luaInvoke":"local retval = Citizen.InvokeNative(0xB18FEC133C7C6C69, scriptedSpeech, Citizen.ResultAsInteger())","js":"const retval = PlaySoundFromScriptedPedAmbientSpeech(scriptedSpeech);","jsInvoke":"const retval = Citizen.invokeNative('0xB18FEC133C7C6C69', scriptedSpeech, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0xB18FEC133C7C6C69, scriptedSpeech);","notes":["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."]}}