AudioClient

playSoundFromEntityHash

PLAY_SOUND_FROM_ENTITY_HASH0x5B9853296731E88D

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

SignatureJavaScript
playSoundFromEntityHash(
  soundId: number,
  model: Hash,
  entity: Entity,
  soundSetHash: Hash,
  p4: any,
  p5: any
): void
SignatureLua
playSoundFromEntityHash(
  soundId: integer,
  model: Hash,
  entity: Entity,
  soundSetHash: Hash,
  p4: any,
  p5: any
)

Usage

JavaScript
playSoundFromEntityHash(soundId, model, entity, soundSetHash, p4, p5);
Lua
playSoundFromEntityHash(soundId, model, entity, soundSetHash, p4, p5)

Parameters

ParameterTypeJavaScriptLua
soundIdintnumberinteger
modelHashnumberinteger
entityEntitynumberinteger
soundSetHashHashnumberinteger
p4Anyanyany
p5Anyanyany

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Only used with "formation_flying_blips_soundset" and "biker_formation_blips_soundset".
p1 is always the model of p2

Reference

Namespace
Audio AUDIO
In the game
void PLAY_SOUND_FROM_ENTITY_HASH(int soundId, Hash model, Entity entity, Hash soundSetHash, Any p4, Any p5)
Hash
0x5B9853296731E88D
Introduced
Game build 877 legacy numbering

Open in the interactive natives reference