RedM Natives

_PLAY_SOUND_FROM_POSITION_WITH_ID

Starts Audio Loop _PLAY_SOUND_FROM_ENTITY* - _PLAY_SOUND_FRONTEND*

Hash0xDCF5BA95BBF0FABA
Runtime namePlaySoundFromPositionWithId
NamespaceAUDIO
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _PLAY_SOUND_FROM_POSITION_WITH_ID(int soundId, const char* soundName, float x, float y, float z, const char* soundsetName, BOOL p6, int p7, BOOL p8);

Parameters

NameTypeDescription
soundIdint—
soundNameconst char*—
xfloat—
yfloat—
zfloat—
soundsetNameconst char*—
p6BOOL—
p7int—
p8BOOL—

Returns void

Description

Starts Audio Loop
_PLAY_SOUND_FROM_ENTITY* - _PLAY_SOUND_FRONTEND*

Usage

Lua
PlaySoundFromPositionWithId(soundId, soundName, x, y, z, soundsetName, p6, p7, p8)

-- always works, by hash
Citizen.InvokeNative(0xDCF5BA95BBF0FABA, soundId, soundName, x, y, z, soundsetName, p6, p7, p8)
JavaScript and C#
JavaScript
PlaySoundFromPositionWithId(soundId, soundName, x, y, z, soundsetName, p6, p7, p8);

// by hash
Citizen.invokeNative('0xDCF5BA95BBF0FABA', soundId, soundName, x + 0.0000001, y + 0.0000001, z + 0.0000001, soundsetName, p6, p7, p8);
C#
Function.Call((Hash)0xDCF5BA95BBF0FABA, soundId, soundName, x, y, z, soundsetName, p6, p7, 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

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