{"hash":"0x72E4D1C4639BC465","ns":"AUDIO","name":"_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH","slug":"_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH","official":false,"named":true,"luaName":"CreateNewScriptedPedAmbientSpeech","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"speaker","type":"Ped"},{"name":"params","type":"Any*"}],"summary":"Create a scripted speech to control speech.","descriptions":[{"source":"alloc8or","format":"text","body":"Create a scripted speech to control speech. If handle is less than 0, it's invalid.\nparams struct for ScriptedSpeechParams see: PLAY_PED_AMBIENT_SPEECH_NATIVE\nReturns scriptedSpeech handle."}],"examples":[],"aliases":["_CREATE_NEW_SCRIPTED_SPEECH"],"enums":[],"related":[],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/AUDIO/_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH","markdownUrl":"https://natives.borderlinerp.com/natives/AUDIO/_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH.md","snippets":{"lua":"local retval, params = CreateNewScriptedPedAmbientSpeech(speaker, params)","luaInvoke":"local retval, params = Citizen.InvokeNative(0x72E4D1C4639BC465, speaker, Citizen.PointerValueIntInitialized(params), Citizen.ResultAsInteger())","js":"const [retval, params] = CreateNewScriptedPedAmbientSpeech(speaker, params);","jsInvoke":"const [retval, params] = Citizen.invokeNative('0x72E4D1C4639BC465', speaker, Citizen.pointerValueIntInitialized(params), Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var params = new OutputArgument();\nint retval = Function.Call<int>((Hash)0x72E4D1C4639BC465, speaker, params);\n// params.GetResult<int>()","notes":["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."]}}