PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE
Play a speech from a position.
Hash
0xED640017ED337E45Runtime name
PlayAmbientSpeechFromPositionNativeNamespaceAUDIO
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xED640017ED337E45Signature
BOOL PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(float x, float y, float z, Any* params);Parameters
| Name | Type | Description |
|---|---|---|
x | float | — |
y | float | — |
z | float | — |
params | Any* | — |
Returns BOOL
Description
Play a speech from a position.
params struct for ScriptedSpeechParams see: PLAY_PED_AMBIENT_SPEECH_NATIVE
Old name: _PLAY_AMBIENT_SPEECH_AT_COORDS
Usage
local retval, params = PlayAmbientSpeechFromPositionNative(x, y, z, params)
-- always works, by hash
local retval, params = Citizen.InvokeNative(0xED640017ED337E45, x, y, z, Citizen.PointerValueIntInitialized(params), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, params] = PlayAmbientSpeechFromPositionNative(x, y, z, params);
// by hash
const [retval, params] = Citizen.invokeNative('0xED640017ED337E45', x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.pointerValueIntInitialized(params), Citizen.returnResultAnyway());var params = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xED640017ED337E45, x, y, z, params);
// params.GetResult<int>()- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - 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.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.