playSoundFromEntity
PLAY_SOUND_FROM_ENTITY0xE65F427EB70AB1EDThe GTA V native PLAY_SOUND_FROM_ENTITY of the AUDIO namespace, as LS:MP client scripts call it: the global function playSoundFromEntity, in JavaScript and in Lua.
playSoundFromEntity(
soundId: number,
audioName: string,
entity: Entity,
audioRef: string,
isNetwork: boolean,
p5: any
): voidplaySoundFromEntity(
soundId: integer,
audioName: string,
entity: Entity,
audioRef: string,
isNetwork: boolean,
p5: any
)Usage
JavaScript
playSoundFromEntity(soundId, audioName, entity, audioRef, isNetwork, p5);Lua
playSoundFromEntity(soundId, audioName, entity, audioRef, isNetwork, p5)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
soundId | int | number | integer |
audioName | string | string | string |
entity | Entity | number | integer |
audioRef | string | string | string |
isNetwork | BOOL | boolean | boolean |
p5 | Any | any | any |
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.
All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/f2A7vTj0
No changes made in b678d.
https://gtaforums.com/topic/795622-audio-for-mods
Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
Reference
- Namespace
- Audio AUDIO
- In the game
void PLAY_SOUND_FROM_ENTITY(int soundId, const char* audioName, Entity entity, const char* audioRef, BOOL isNetwork, Any p5)- Hash
0xE65F427EB70AB1ED