playPedAmbientSpeechWithVoiceNative
PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE0x3523634255FC3318The GTA V native PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE of the AUDIO namespace, as LS:MP client scripts call it: the global function playPedAmbientSpeechWithVoiceNative, in JavaScript and in Lua.
playPedAmbientSpeechWithVoiceNative(
ped: Ped,
speechName: string,
voiceName: string,
speechParam: string,
p4: boolean
): voidplayPedAmbientSpeechWithVoiceNative(
ped: Ped,
speechName: string,
voiceName: string,
speechParam: string,
p4: boolean
)Usage
playPedAmbientSpeechWithVoiceNative(ped, speechName, voiceName, speechParam, p4);playPedAmbientSpeechWithVoiceNative(ped, speechName, voiceName, speechParam, p4)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
speechName | string | string | string |
voiceName | string | string | string |
speechParam | string | string | string |
p4 | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
This is the same as playPedAmbientSpeechNative and playPedAmbientSpeechAndCloneNative but it will allow you to play a speech file from a specific voice file. It works on players and all peds, even animals.
EX (C#):
GTA.Native.Function.Call(Hash.PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE, Game.Player.Character, "GENERIC_INSULT_HIGH", "s_m_y_sheriff_01_white_full_01", "SPEECH_PARAMS_FORCE_SHOUTED", 0);The first param is the ped you want to play it on, the second is the speech name, the third is the voice name, the fourth is the speech param, and the last param is usually always 0.
Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json
Reference
- Namespace
- Audio AUDIO
- In the game
void PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE(Ped ped, const char* speechName, const char* voiceName, const char* speechParam, BOOL p4)- Hash
0x3523634255FC3318- Formerly
_PLAY_AMBIENT_SPEECH_WITH_VOICE