_CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH
Create a scripted speech to control speech.
Hash
0x72E4D1C4639BC465Runtime name
CreateNewScriptedPedAmbientSpeechNamespaceAUDIO
SideClient
NameCommunity guess
Docs
Since build1207
Also known as
_CREATE_NEW_SCRIPTED_SPEECHSignature
int _CREATE_NEW_SCRIPTED_PED_AMBIENT_SPEECH(Ped speaker, Any* params);Parameters
| Name | Type | Description |
|---|---|---|
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
local retval, params = CreateNewScriptedPedAmbientSpeech(speaker, params)
-- always works, by hash
local retval, params = Citizen.InvokeNative(0x72E4D1C4639BC465, speaker, Citizen.PointerValueIntInitialized(params), Citizen.ResultAsInteger())JavaScript and C#
const [retval, params] = CreateNewScriptedPedAmbientSpeech(speaker, params);
// by hash
const [retval, params] = Citizen.invokeNative('0x72E4D1C4639BC465', speaker, Citizen.pointerValueIntInitialized(params), Citizen.returnResultAnyway(), Citizen.resultAsInteger());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
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.