Stuyk / altv-athena

A Roleplay Framework for alt:V by Stuyk
https://athenaframework.com/
228 stars 149 forks source link

Add Stop audio #361

Closed jonasesser closed 2 years ago

github-actions[bot] commented 2 years ago

Click on command line instructions below for checkout information of this PR.

jonasesser commented 2 years ago

Reworked and added the option to play sounds instant and simultaneously. Example:

  1. Ring phone Athena.player.emit.sound2D(recipient, @plugins/sounds/myplugin/ringtone1.ogg, 0.2, 'gpPhoneRing');
  2. Airport Broadcast Athena.player.emit.sound2D(recipient, @plugins/sounds/myplugin/airport1.ogg, 0.2, 'gpAirport');
  3. Stop ringing Athena.player.emit.soundStop(recipient, 'gpPhoneRing');

Queued old functionality is as before: Athena.player.emit.sound2D(recipient, @plugins/sounds/myplugin/playnext.ogg);