Audio::freezeRadioStation: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{ClientsideJsFunction}}
{{JSContainer|


==Syntax==
The `freezeRadioStation` function allows you to lock a specified radio station to keep it playing even if the player changes vehicles. This can be helpful for scripted scenarios where you want to control the in-game music experience consistently.
<syntaxhighlight lang="javascript">audio.freezeRadioStation(radioStation);</syntaxhighlight>
 
=== Required Arguments ===
=== Required Params ===
*'''radioStation:''' String
* '''radioStation:''' {{RageType|String}} – The name of the radio station to freeze.
===Return value===
 
*'''Undefined'''
=== Return Value ===
==Example==
* '''Undefined''' – This function does not return a value.
 
== Syntax ==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
mp.game.audio.freezeRadioStation(radioStation);
</syntaxhighlight>
</syntaxhighlight>
==See also==
 
{{Audio_function_c}}
== Example ==
<syntaxhighlight lang="javascript">
// Example usage of freezeRadioStation
 
const radioStation = "RADIO_01_CLASS_ROCK"; // Set to the Classic Rock station
mp.game.audio.freezeRadioStation(radioStation); // Freeze the station to keep playing
mp.gui.chat.push("Radio station frozen: " + radioStation);
</syntaxhighlight>
 
== Available Radio Stations ==
Here are some of the available radio stations in GTA V:
* '''RADIO_01_CLASS_ROCK''' – Los Santos Rock Radio
* '''RADIO_02_POP''' – Non-Stop-Pop FM
* '''RADIO_03_HIPHOP_NEW''' – Radio Los Santos
* '''RADIO_04_PUNK''' – Channel X
* '''RADIO_05_TALK_01''' – West Coast Talk Radio
* '''RADIO_06_COUNTRY''' – Rebel Radio
* '''RADIO_07_DANCE''' – Soulwax FM
* '''RADIO_08_MEXICAN''' – East Los FM
* '''RADIO_09_HIPHOP_OLD''' – West Coast Classics
* '''RADIO_12_REGGAE''' – Blue Ark
* '''RADIO_13_JAZZ''' – Worldwide FM
* '''RADIO_14_DANCE_02''' – FlyLo FM
* '''RADIO_15_MOTOWN''' – The Lowdown 91.1
* '''RADIO_16_SILVERLAKE''' – Radio Mirror Park
* '''RADIO_17_FUNK''' – Space 103.2
 
== See Also ==
{{Audio_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:Audio API]]
}}

Latest revision as of 10:51, 2 November 2024

Client-Side
Function

 JavaScript



JavaScript Syntax


The `freezeRadioStation` function allows you to lock a specified radio station to keep it playing even if the player changes vehicles. This can be helpful for scripted scenarios where you want to control the in-game music experience consistently.

Required Params

  • radioStation: String – The name of the radio station to freeze.

Return Value

  • Undefined – This function does not return a value.

Syntax

mp.game.audio.freezeRadioStation(radioStation);

Example

// Example usage of freezeRadioStation

const radioStation = "RADIO_01_CLASS_ROCK"; // Set to the Classic Rock station
mp.game.audio.freezeRadioStation(radioStation); // Freeze the station to keep playing
mp.gui.chat.push("Radio station frozen: " + radioStation);

Available Radio Stations

Here are some of the available radio stations in GTA V:

  • RADIO_01_CLASS_ROCK – Los Santos Rock Radio
  • RADIO_02_POP – Non-Stop-Pop FM
  • RADIO_03_HIPHOP_NEW – Radio Los Santos
  • RADIO_04_PUNK – Channel X
  • RADIO_05_TALK_01 – West Coast Talk Radio
  • RADIO_06_COUNTRY – Rebel Radio
  • RADIO_07_DANCE – Soulwax FM
  • RADIO_08_MEXICAN – East Los FM
  • RADIO_09_HIPHOP_OLD – West Coast Classics
  • RADIO_12_REGGAE – Blue Ark
  • RADIO_13_JAZZ – Worldwide FM
  • RADIO_14_DANCE_02 – FlyLo FM
  • RADIO_15_MOTOWN – The Lowdown 91.1
  • RADIO_16_SILVERLAKE – Radio Mirror Park
  • RADIO_17_FUNK – Space 103.2

See Also