AudioClient

updateSoundCoord

UPDATE_SOUND_COORD0x7EC3C679D0E7E46B

The GTA V native UPDATE_SOUND_COORD of the AUDIO namespace, as LS:MP client scripts call it: the global function updateSoundCoord, in JavaScript and in Lua.

SignatureJavaScript
updateSoundCoord(soundId: number, x: number, y: number, z: number): void
SignatureLua
updateSoundCoord(soundId: integer, x: number, y: number, z: number)

Usage

JavaScript
updateSoundCoord(soundId, x, y, z);
Lua
updateSoundCoord(soundId, x, y, z)

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
updateSoundCoord(soundId, pos);
Lua · with vectors
updateSoundCoord(soundId, pos)

Parameters

ParameterTypeJavaScriptLua
soundIdintnumberinteger
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Audio AUDIO
In the game
void UPDATE_SOUND_COORD(int soundId, float x, float y, float z)
Hash
0x7EC3C679D0E7E46B
Introduced
Game build 678 legacy numbering

Open in the interactive natives reference