playAmbientSpeechFromPositionNative
PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE0xED640017ED337E45The GTA V native PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE of the AUDIO namespace, as LS:MP client scripts call it: the global function playAmbientSpeechFromPositionNative, in JavaScript and in Lua.
playAmbientSpeechFromPositionNative(
speechName: string,
voiceName: string,
x: number,
y: number,
z: number,
speechParam: string
): voidplayAmbientSpeechFromPositionNative(
speechName: string,
voiceName: string,
x: number,
y: number,
z: number,
speechParam: string
)Usage
JavaScript
playAmbientSpeechFromPositionNative(speechName, voiceName, x, y, z, speechParam);Lua
playAmbientSpeechFromPositionNative(speechName, voiceName, x, y, z, speechParam)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
playAmbientSpeechFromPositionNative(speechName, voiceName, pos, speechParam);Lua · with vectors
playAmbientSpeechFromPositionNative(speechName, voiceName, pos, speechParam)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
speechName | string | string | string |
voiceName | string | string | string |
x | float | number | number |
y | float | number | number |
z | float | number | number |
speechParam | string | string | string |
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.
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_AMBIENT_SPEECH_FROM_POSITION_NATIVE(const char* speechName, const char* voiceName, float x, float y, float z, const char* speechParam)- Hash
0xED640017ED337E45- Formerly
_PLAY_AMBIENT_SPEECH_AT_COORDS