Audio::playSoundFrontend: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
list: pastebin.com/DCeRiaLJ<br><br>All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/0neZdsZ5
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">audio.playSoundFrontend(soundId, audioName, audioRef, p3);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.audio.playSoundFrontend(ID, SoundName, SoundSetName, instant);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''soundId:''' int
*'''ID:''' <font color="red"><b>int</b></font> (<b>Put -1 for sounds played once, use GET_SOUND_ID otherwise.</b>)
*'''audioName:''' String
*'''SoundName:''' <font color="green"><b>String</b></font>
*'''audioRef:''' String
*'''SoundSetName:''' <font color="green"><b>String</b></font>
*'''p3:''' Boolean
*'''instant:''' <font color="blue"><b>Boolean</b></font>
 
<b>WARNING: use different ID may crash the client.</b>
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
mp.game.audio.playSoundFrontend(-1, "Beep_Green", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Audio_function_c}}
{{Audio_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 11:01, 8 August 2020

Syntax

mp.game.audio.playSoundFrontend(ID, SoundName, SoundSetName, instant);

Required Arguments

  • ID: int (Put -1 for sounds played once, use GET_SOUND_ID otherwise.)
  • SoundName: String
  • SoundSetName: String
  • instant: Boolean

WARNING: use different ID may crash the client.

Return value

  • Undefined

Example

mp.game.audio.playSoundFrontend(-1, "Beep_Green", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);

See also