RedM Natives

PREPARE_SOUND

soundId maybe be incorrect name for param p2, in the decompiles is always -2

Hash0xE368E8422C860BA7
Runtime namePrepareSound
NamespaceAUDIO
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL PREPARE_SOUND(const char* soundName, const char* soundsetName, int soundId);

Parameters

NameTypeDescription
soundNameconst char*—
soundsetNameconst char*—
soundIdint—

Returns BOOL

Description

VORPCORE RDR3natives

soundId maybe be incorrect name for param p2, in the decompiles is always -2

Usage

Lua
local retval = PrepareSound(soundName, soundsetName, soundId)

-- always works, by hash
local retval = Citizen.InvokeNative(0xE368E8422C860BA7, soundName, soundsetName, soundId, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = PrepareSound(soundName, soundsetName, soundId);

// by hash
const retval = Citizen.invokeNative('0xE368E8422C860BA7', soundName, soundsetName, soundId, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xE368E8422C860BA7, soundName, soundsetName, soundId);

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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