Audio::freezeRadioStation
JavaScript
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