RedM Natives

_PLAY_SOUND_FROM_POSITION

Old name: _PLAY_SOUND_FROM_POSITION

Hash0xCCE219C922737BFA
Runtime namePlaySoundFromPosition
NamespaceAUDIO
SideClient
NameCommunity guess
Docs
Since build1207
Also known asPLAY_SOUND_FROM_COORD

Signature

void _PLAY_SOUND_FROM_POSITION(const char* audioName, float x, float y, float z, const char* audioRef, BOOL isNetwork, Any p6, BOOL isExteriorLoc, Any p8);

Parameters

NameTypeDescription
audioNameconst char*—
xfloat—
yfloat—
zfloat—
audioRefconst char*—
isNetworkBOOL—
p6Any—
isExteriorLocBOOL—
p8Any—

Returns void

Description

Usage

Lua
PlaySoundFromPosition(audioName, x, y, z, audioRef, isNetwork, p6, isExteriorLoc, p8)

-- always works, by hash
Citizen.InvokeNative(0xCCE219C922737BFA, audioName, x, y, z, audioRef, isNetwork, p6, isExteriorLoc, p8)
JavaScript and C#
JavaScript
PlaySoundFromPosition(audioName, x, y, z, audioRef, isNetwork, p6, isExteriorLoc, p8);

// by hash
Citizen.invokeNative('0xCCE219C922737BFA', audioName, x + 0.0000001, y + 0.0000001, z + 0.0000001, audioRef, isNetwork, p6, isExteriorLoc, p8);
C#
Function.Call((Hash)0xCCE219C922737BFA, audioName, x, y, z, audioRef, isNetwork, p6, isExteriorLoc, p8);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.