The Lab
AUDIO native

PREPARE_SOUND_WITH_ENTITY

returns BOOL4 paramsbuild 1207

Preloads soundName from soundsetName on soundId for playback on entity, returning true once ready.

Signature

C
BOOL PREPARE_SOUND_WITH_ENTITY(const char* soundName, Entity entity, const char* soundsetName, int soundId); // 0x4AD019591E94C064 b1207

Parameters

#NameType
1soundNameconst char*
2entityEntity
3soundsetNameconst char*
4soundIdint

Facts

Facts about PREPARE_SOUND_WITH_ENTITY
Name
PREPARE_SOUND_WITH_ENTITY
Hash
0x4AD019591E94C064
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0x4AD019591E94C064, -- PREPARE_SOUND_WITH_ENTITY
  "text", -- const char* soundName
  PlayerPedId(), -- Entity entity
  "text", -- const char* soundsetName
  0 -- int soundId
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0x4AD019591E94C064", // PREPARE_SOUND_WITH_ENTITY
  "text", // const char* soundName
  PlayerPedId(), // Entity entity
  "text", // const char* soundsetName
  0, // int soundId
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0x4AD019591E94C064, // PREPARE_SOUND_WITH_ENTITY
  "text", // const char* soundName
  API.PlayerPedId(), // Entity entity
  "text", // const char* soundsetName
  0 // int soundId
);
All AUDIO natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.