Skip to main content

Audio::playSoundFromEntity

All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/f2A7vTj0
No changes made in b678d.

gtaforums.com/topic/795622-audio-for-mods

Syntax​

mp.game.audio.playSoundFromEntity(soundId, audioName, entity, audioRef, p4, p5);

Required Arguments​

  • soundId: int
  • audioName: String
  • entity: Entity handle or object
  • audioRef: String
  • p4: Boolean
  • p5: unknown (to be checked)

Return value​

  • Undefined

Example​

function playerEnterVehicleHandler(vehicle) {
mp.game.audio.playSoundFromEntity(1, "CONFIRM_BEEP", vehicle.handle, "HUD_MINI_GAME_SOUNDSET", true, 0);
}

mp.events.add("playerEnterVehicle", playerEnterVehicleHandler);