Audio::playSoundFromCoord: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/eeFc5DiW<br><br>gtaforums.com/topic/795622-audio-for-mods
All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/eeFc5DiW<br><br>gtaforums.com/topic/795622-audio-for-mods
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">audio.playSoundFromCoord(soundId, audioName, x, y, z, audioRef, p6, p7, p8);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.audio.playSoundFromCoord(soundId, audioName, x, y, z, audioRef, p6, p7, p8);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''soundId:''' int
*'''soundId:''' int
Line 10: Line 10:
*'''audioRef:''' String
*'''audioRef:''' String
*'''p6:''' Boolean
*'''p6:''' Boolean
*'''p7:''' unknown (to be checked)
*'''p7:''' int
*'''p8:''' Boolean
*'''p8:''' Boolean
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
let pos = mp.players.local.position;
 
mp.game.audio.playSoundFromCoord(1, "CONFIRM_BEEP", pos.x, pos.y, pos.z, "HUD_MINI_GAME_SOUNDSET", false, 0, false);
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Audio_s_function_c}}
{{Audio_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 12:21, 31 January 2018

All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/eeFc5DiW

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

Syntax

mp.game.audio.playSoundFromCoord(soundId, audioName, x, y, z, audioRef, p6, p7, p8);

Required Arguments

  • soundId: int
  • audioName: String
  • x: float
  • y: float
  • z: float
  • audioRef: String
  • p6: Boolean
  • p7: int
  • p8: Boolean

Return value

  • Undefined

Example

let pos = mp.players.local.position;

mp.game.audio.playSoundFromCoord(1, "CONFIRM_BEEP", pos.x, pos.y, pos.z, "HUD_MINI_GAME_SOUNDSET", false, 0, false);

See also