Audio::setRadioTrack: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
Line 1: Line 1:
Only found this one in the decompiled scripts:<br><br>AUDIO::SET_RADIO_TRACK('RADIO_03_HIPHOP_NEW', 'ARM1_RADIO_STARTS');<br>
{{ClientsideJsFunction}}
==Syntax==
{{JSContainer|
<syntaxhighlight lang="javascript">mp.game.audio.setRadioTrack(radioStation, radioTrack);</syntaxhighlight>
 
=== Required Arguments ===
This function allows you to set a specific track to play on a radio station, such as when players are in a vehicle.
*'''radioStation:''' String
 
*'''radioTrack:''' String
===Required Params===
*'''radioStation:''' {{RageType|string}} — the name of the radio station
*'''radioTrack:''' {{RageType|string}} — the name of the track to play
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Syntax==
<syntaxhighlight lang="javascript">
mp.game.audio.setRadioTrack(radioStation, radioTrack)
</syntaxhighlight>
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
// Set a track on a specific radio station
mp.game.audio.setRadioTrack('RADIO_03_HIPHOP_NEW', 'ARM1_RADIO_STARTS');
</syntaxhighlight>
</syntaxhighlight>
===Radio Stations===
* RADIO_01_CLASS_ROCK
* RADIO_02_POP
* RADIO_03_HIPHOP_NEW
* RADIO_04_PUNK
* RADIO_05_TALK_01
* RADIO_06_COUNTRY
* RADIO_07_DANCE_01
* RADIO_08_MEXICAN
* RADIO_09_HIPHOP_OLD
* RADIO_12_REGGAE
* RADIO_13_JAZZ
* RADIO_14_DANCE_02
* RADIO_15_MOTOWN
* RADIO_16_SILVERLAKE
* RADIO_17_FUNK
* RADIO_18_90S_ROCK
* RADIO_19_USER
===Example Radio Tracks===
* ARM1_RADIO_STARTS
* RAD1_TRACK01
* RAD2_TRACK02
* FUNK_TRACK03
* MEX1_TRACK01
}}
==See also==
==See also==
{{Audio_s_function_c}}
{{Audio_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:Audio API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 11:08, 2 November 2024

Client-Side
Function

 JavaScript



JavaScript Syntax


This function allows you to set a specific track to play on a radio station, such as when players are in a vehicle.

Required Params

  • radioStation: string — the name of the radio station
  • radioTrack: string — the name of the track to play

Return value

  • Undefined

Syntax

mp.game.audio.setRadioTrack(radioStation, radioTrack)

Example

// Set a track on a specific radio station
mp.game.audio.setRadioTrack('RADIO_03_HIPHOP_NEW', 'ARM1_RADIO_STARTS');

Radio Stations

  • RADIO_01_CLASS_ROCK
  • RADIO_02_POP
  • RADIO_03_HIPHOP_NEW
  • RADIO_04_PUNK
  • RADIO_05_TALK_01
  • RADIO_06_COUNTRY
  • RADIO_07_DANCE_01
  • RADIO_08_MEXICAN
  • RADIO_09_HIPHOP_OLD
  • RADIO_12_REGGAE
  • RADIO_13_JAZZ
  • RADIO_14_DANCE_02
  • RADIO_15_MOTOWN
  • RADIO_16_SILVERLAKE
  • RADIO_17_FUNK
  • RADIO_18_90S_ROCK
  • RADIO_19_USER

Example Radio Tracks

  • ARM1_RADIO_STARTS
  • RAD1_TRACK01
  • RAD2_TRACK02
  • FUNK_TRACK03
  • MEX1_TRACK01


See also